Add a TUI sidebar listing other active sessions - #498
Conversation
Implementation Plan — Issue 497 (TUI sidebar listing other active sessions)ProblemTerminal TUI sessions have no way to see what their parallel dreb sessions are doing. Today the only fleet view is the web dashboard, and nothing distinguishes a live session from a dead one. This plan adds (a) a per-session liveness registry so live sessions are discoverable, and (b) a sidebar in the interactive TUI that lists the other live sessions with project, model, status, and last activity. User-driven constraints (this planning request)
Both constraints shape the design below (see "Key design decisions" 1 and 2). Architecture — two logical stages, one PRThe feature decomposes cleanly; both stages land in this PR as two commits so the diff stays reviewable (per CONTRIBUTING.md). Stage 1 — Liveness registry (net-new prerequisite). Nothing today marks a session as live. Each interactive session writes a small state file at startup, heartbeats it on a timer, and removes it on clean exit. A reader reaps stale entries (dead pid or expired heartbeat). Independently useful and unit-testable. Stage 2 — Sidebar UI (consumer). A persistent, non-capturing, right-anchored TUI overlay that reads the registry on a short interval, renders the live sessions (excluding self) with a status glyph, and is toggled by a keybinding. Deliverables
Key design decisions (with rationale + evidence)1. Width is a fixed bounded column count, not a percentage. 2. Status is composed, not read from one flag. There is no single source of truth for status in interactive mode — the signals are scattered.
3. Liveness = heartbeat + stale reaping (self-healing). The writer updates 4. Overlay is 5. Deterministic ordering. Per AGENTS.md: sort by project path (cwd) alphabetical, then 6. Self-exclusion. The reader excludes the entry whose Files to create or modifyCreate
Modify
Testing approach (mandatory)
Acceptance criteria
Risks and open questions
Plan created by mach6 |
|
Closing as mis-scoped: the sessions sidebar belongs in the dashboard, not the TUI. The TUI implementation has been removed from this branch (only the per-session liveness registry under |
Closes #497
Add a TUI sidebar to the main session view listing other active dreb sessions on the machine, with a per-session liveness registry as the prerequisite.
Implementation plan posted as a comment below.