Chat list activity: turn running and background tasks on every row, pushed to every connection
chat_sessions rows carry activity (turn_running, background_tasks, seq) from the hub's own state, and chat_activity is pushed to every connection when a session's turn starts or ends or its running background-task count changes. A room whose last viewer left stays observed while background tasks run, bounded by the unattended limits; a Claude Code process exit ends its tasks.
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/coder/websocket"
|
||||
"github.com/coder/websocket/wsjson"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/opencode"
|
||||
"git.a-wan.net/alan/pipelines/internal/protocol"
|
||||
@@ -273,7 +272,7 @@ func dialShellOutputWebsocket(t *testing.T, ctx context.Context, srv *httptest.S
|
||||
func readShellOutputMessage(t *testing.T, ctx context.Context, ws *websocket.Conn) protocol.Message {
|
||||
t.Helper()
|
||||
var message protocol.Message
|
||||
if err := wsjson.Read(ctx, ws, &message); err != nil {
|
||||
if err := readTestFrame(ctx, ws, &message); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return message
|
||||
|
||||
Reference in New Issue
Block a user