feat: at-a-glance agent status (blocked / working / done)#366
Open
frarredondo wants to merge 1 commit into
Open
feat: at-a-glance agent status (blocked / working / done)#366frarredondo wants to merge 1 commit into
frarredondo wants to merge 1 commit into
Conversation
Classify each agent pane from its live terminal screen, OSC title, and PTY activity into blocked / working / idle, debounced, and surface it on the sidebar session rows, the pane tabs, and the Pane Chat entry. Roll up per session (blocked > working > idle); a pane that finishes unseen reads as done. - pure manifest detection engine + Claude/Codex/generic rule sets (unit tested) - OSC title/progress capture in TerminalStateEmulator - AgentStatusMonitor: screen + PTY-activity arbitration with debounce, wired into terminalPanelManager on a 500ms poll, emits panel:agentStatus - panelStore keeps per-panel status keyed by sessionId; one shared rollup used by the store getter and the useAgentStatus hook - session-row accent bar (amber sweep), dot+spinner on tabs and Pane Chat - README Status Cues row updated Closes dcouple#365
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.
Summary
What. Every agent pane now reports a live status (blocked, working, or done) on the sidebar session rows, the pane tabs, and the Pane Chat entry, so a screen full of parallel agents reads in one glance instead of opening each one.
Why. The old indicator was binary (active/idle), so "waiting on your approval", "still thinking", and "finished a while ago" all looked the same. The one thing you actually want to spot, which pane is blocked on you, was invisible. See #365.
How. Each agent pane is classified continuously from three signals its terminal already produces: the live screen snapshot, the OSC window title, and whether PTY bytes are still flowing. A small state machine arbitrates those into blocked / working / idle, with debounce so spinner gaps and startup don't cause flicker. Panel states roll up per session (blocked wins, then working, then idle) and render with distinct colors. A session that finishes while you are looking elsewhere shows as "done" until you open it. Plain shell panes get no badge.
Built test first, so the detection rules, the arbitration, and the rollup all have unit tests.
What changed
Backend (main):
TerminalStateEmulatornow also captures the OSC window title and progress, which is where the CLIs encode spinner and "action required" state.AgentStatusMonitorcombines the screen classification with recent PTY activity (the working authority) and debounces working to idle plus a short startup grace. It runs on a 500ms poll insideterminalPanelManagerand emits a newpanel:agentStatusIPC event. Only agent panes register; plain shells never do.Frontend:
panelStoretracks each panel's status along with the sessionId from the event, and one shared rollup helper is used by both the store getter and theuseAgentStatushook, so background sessions and Pane Chat light up without their panels being loaded.status-workingsweep animation.Docs:
Visual overview
No asset yet. State to visual mapping:
Verification
Run on current head of the branch:
pnpm typecheckpnpm lintno-console/require-imports)mainagentStatus + emulator)pnpm --filter frontend testpnpm --filter main test(full)The 4 failures are the
better-sqlite3-multiple-ciphersnative-arch DB tests that fail under the ambient Node here, an environment artifact unrelated to this change (same set noted in #363).Manual tests
Non-goals
Residual risks
Closes #365