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:
2026-11-03 19:45:43 +00:00
parent 35558fec07
commit 1b98877d88
26 changed files with 593 additions and 96 deletions
+1 -3
View File
@@ -6,8 +6,6 @@ import (
"strings"
"testing"
"github.com/coder/websocket/wsjson"
"git.a-wan.net/alan/pipelines/internal/protocol"
)
@@ -59,7 +57,7 @@ func exportFixture(t *testing.T, backend string) (*pagedChat, context.Context, f
writeChat(t, ctx, conn, message)
for {
var reply protocol.Message
if err := wsjson.Read(ctx, conn, &reply); err != nil {
if err := readTestFrame(ctx, conn, &reply); err != nil {
t.Fatalf("read reply to %s: %v", message.ID, err)
}
if reply.ID == message.ID {