feat: read-only Session Dashboard (agent-tty dashboard)#113
Merged
Conversation
A master-detail Ink TUI that lists Sessions and shows a continuously-updated, read-only Live View of the selected one, reconstructed by Event Log Follow (file-tail of events.jsonl -> libghostty-vt replayTo/snapshot) per ADR 0006. It reads the Event Log as the source of truth, never queries the live host, and never resizes the Session. - Deep modules (unit-tested): EventLogTailSource/SessionEventSource seam, LiveViewProjection (pure clip/pan/letterbox/overview), LiveViewFollower (coalescing, pin-on-exit, collected, bounded replay), and RendererReadiness plus a `dashboard` doctor capability. - Tab-toggled focus (list select vs Live View pan), `a` scope toggle (active default; all excludes destroyed), `z` block-glyph overview, `--all`/`--session`. - Requires the optional libghostty-vt renderer (no browser fallback); interactive-only (no --json), fails fast on a non-interactive terminal. - Moves react+ink to dependencies, adds @types/react (dev) and jsx to tsconfig; removes the throwaway proto/. Change-Id: I2b15108a1e7968f9eeeade63d672974111681a59 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
agent-tty dashboard: a read-only, interactive Session Dashboard — a master-detail Ink TUI that lists your Sessions and shows a continuously-updated Live View of the selected one. Watch what your agents are doing in their shells, e.g. in a tmux split.The Live View is produced by Event Log Follow: it tails the Session's append-only
events.jsonland replays it through the in-processlibghostty-vtrenderer (replayTo→snapshot). It reads the Event Log as the source of truth and never queries the live host, so it can't disturb a running Session and behaves identically for live and finished Sessions (ADR 0006).Closes #109.
Highlights
↑/↓j/kselect; Live View focused →↑/↓h/j/k/lpan.list);atoggles all (Active + Terminal, excludingdestroyed);--allsets the initial scope;--session <id>preselects.z). Never distorts/reflows; never resizes the Session.libghostty-vt(noghostty-webfallback). Fails fast with an actionable message when absent, anddoctornow reports adashboardreadiness capability.--json(a deliberate, documented deviation —list --jsonstill covers machine-readable listing); fails fast on a non-interactive terminal.Four deep modules (unit-tested)
SessionEventSource+EventLogTailSource— byte-offset tail seam: partial lines, multibyte split, truncation/rewrite, not-yet-created vs collected, ENOENT offset reset.LiveViewProjection— pure clip / pan (clamped) / letterbox / block-glyph overview, cursor flag, cells-or-text fallback.LiveViewFollower— accumulate →replayTo→snapshot, burst coalescing, pin-on-exit freeze + badge, collected precedence, bounded replay (trims applied events).RendererReadiness—libghostty-vtprobe → actionable error + thedashboarddoctor capability (skips, not fails, when the optional renderer is absent).Thin glue: session-list scope adapter (reuses
listSessions), the Ink shell, and thedashboardCLI command + non-TTY guard.Build / deps
react+inkmoved todependencies;@types/reactadded as a devDep;jsx: react-jsxadded totsconfig.@coder/libghostty-vt-noderemains an optional dependency. The gitignored throwawayproto/is removed.Verification
agent-tty snapshot(cells, visibleLines, cursor, alt-screen) via a hermetic event-log cross-check.Out of scope / follow-up
Input take-over, multi-session grid, busy/idle activity, scrollback/replay-scrubbing, a streaming subscribe RPC, and pixel zoom are deliberately deferred (see the PRD). Wide-character (CJK/emoji) cell alignment is a pre-existing limitation of the shared
SnapshotCellrepresentation (the dashboard still matchessnapshot) — tracked in #112.🤖 Generated with Claude Code