Keep workflow runs across reloads and show concurrent runs as one stack
Run cards lived only in server memory, so a reload after the last run ended, or any restart, dropped them. Store them in the document's sidecar: ended runs stay until the next workflow starts in the document, and a run that was live when the room went away comes back stopped. Several runs can be live at once, so Chat now shows one stack of run rows instead of a card per run. Runs waiting on Decisions come first, then running, paused, and ended runs, newest first within each; more than three rows fold behind "more" without hiding a waiting run. Only the first waiting run, or else the newest live one, shows its stages, and any row opens on click. Each live or paused row has its own pause or resume control (chat:pause-run, chat:resume-run) through session.workflows, recorded in the transcript. Stored stages are capped at the twelve most recent, with earlier ones counted. A drawn ring replaces the text glyph for pending and paused work. Assistant-model: Claude Opus 5.5 Assistant-workflow: inline Assistant-verification: bun test passed: 1764 pass, 2 PostgreSQL skips, 0 fail, including sidecar round trip, run merging, per-run control, stage cap, and stack ordering and folding Assistant-verification: bun run types passed: all workspaces Assistant-verification: bun run ci passed: dprint, oxlint, tokens, type scale, Impeccable (no new findings) User-preference: A finished workflow's card stays until the next workflow run starts, including across reloads User-preference: Concurrent workflow runs show as one stack ordered by who needs attention, with per-run pause and resume beside Stop all Co-authored-by: Alex Lavaee <lavaman131@github.com>
Parent12aa7a2
16 files changed+708-136
StackedSplit