Repository navigation
feat(agent-status): show OSC 7501 program status in rows and tabs - #30262
Conversation
50020f8 to
5db014e
Compare
ec9cd23 to
79d1c12
Compare
7e21c26 to
5b02fe3
Compare
0c740d0 to
3ae43c1
Compare
5b02fe3 to
9a3b68c
Compare
3ae43c1 to
c2925bf
Compare
7dedc2d to
d27ee18
Compare
c2925bf to
1b37afa
Compare
d27ee18 to
4629c0a
Compare
1b37afa to
ccad120
Compare
4629c0a to
bccb3ba
Compare
ccad120 to
1ef6bde
Compare
bccb3ba to
65c6617
Compare
1ef6bde to
e922020
Compare
Builds on the program-status core: - A determinate progress ring replaces the working spinner when a program reports progress (rows and tabs; percent only in tooltip/aria), in the attention tone while blocked. The working color becomes the --agent-working token. - Non-agent programs (brew, terraform, …) get their first letter as icon. - The program's own one-line message shows as the row preview, a failed program reads "Failed: <message>", and a block such as sign-in that the row's state does not show raises attention. - A finished program's result outlives its exit until the next keypress or command in that pane, as the protocol asks; real agents are unchanged.
65c6617 to
b562782
Compare
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
78116776-cd9f-4b9b-b430-9ea524890b45
⛔ Files ignored due to path filters: 1
src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snapis excluded by!**/*.snap
📒 Files selected for processing: 46
src/renderer/src/assets/main.csssrc/renderer/src/components/AgentProgressRing.test.tsxsrc/renderer/src/components/AgentProgressRing.tsxsrc/renderer/src/components/AgentStateDot.test.tssrc/renderer/src/components/AgentStateDot.tsxsrc/renderer/src/components/AgentWorkingSpinner.test.tsxsrc/renderer/src/components/AgentWorkingSpinner.tsxsrc/renderer/src/components/activity/activity-thread-detail-pane.tsxsrc/renderer/src/components/activity/activity-thread-hover-card-summary.tsxsrc/renderer/src/components/activity/activity-thread-row.tsxsrc/renderer/src/components/cmd-j/palette-live-status.test.tsxsrc/renderer/src/components/dashboard-popout/AgentKanbanCard.tsxsrc/renderer/src/components/dashboard-popout/AgentTerminalDialog.tsxsrc/renderer/src/components/dashboard/DashboardAgentRow.test.tsxsrc/renderer/src/components/dashboard/DashboardAgentRow.tsxsrc/renderer/src/components/dashboard/DashboardAgentRowToolStep.test.tsxsrc/renderer/src/components/dashboard/DashboardAgentRowToolStep.tsxsrc/renderer/src/components/editor/ReviewNotesSendMenuContent.tsxsrc/renderer/src/components/sidebar/StatusIndicator.test.tssrc/renderer/src/components/sidebar/StatusIndicator.tsxsrc/renderer/src/components/sidebar/WorktreeCardStatusSlot.test.tsxsrc/renderer/src/components/sidebar/worktree-card-compact-agent-row-program-status.test.tssrc/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsxsrc/renderer/src/components/sidebar/worktree-card-compact-agents.tsxsrc/renderer/src/components/tab-bar/SortableTab.tsxsrc/renderer/src/components/tab-bar/TerminalTabLeadingIcon.tsxsrc/renderer/src/components/tab-bar/tab-title-tooltip.test.tsxsrc/renderer/src/components/tab-bar/terminal-tab-activity-status.tssrc/renderer/src/components/tab-bar/terminal-tab-program-progress.test.tssrc/renderer/src/components/tab-bar/use-terminal-tab-activity.tssrc/renderer/src/components/terminal-pane/parked-terminal-command-status.test.tssrc/renderer/src/components/terminal-pane/parked-terminal-command-status.tssrc/renderer/src/components/terminal-pane/pty-connection-command-finished-late-done.test.tssrc/renderer/src/components/terminal-pane/pty-connection/interrupt-input-intent.tssrc/renderer/src/components/terminal-pane/pty-connection/pane-agent-identity.tssrc/renderer/src/lib/agent-row-tool-preview.test.tssrc/renderer/src/lib/agent-row-tool-preview.tssrc/renderer/src/lib/agent-type-icon.test.tsxsrc/renderer/src/lib/agent-type-icon.tsxsrc/renderer/src/lib/agent-verdict-status-line.test.tssrc/renderer/src/lib/agent-verdict-status-line.tssrc/renderer/src/lib/program-status/agent-row-presentation.tssrc/renderer/src/lib/program-status/result-retention.test.tssrc/renderer/src/lib/program-status/result-retention.tssrc/renderer/src/lib/program-status/row.tssrc/shared/program-status/presentation.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
| (!showsTool && agent.entry.programStatus?.state === 'blocked' | ||
| ? programStatusAttentionLine({ | ||
| ...(agent.entry.programStatus.kind ? { kind: agent.entry.programStatus.kind } : {}), | ||
| ...(presentation.message ? { message: presentation.message } : {}) | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use the facet's own message in the blocked-row fallback.
This branch runs only when the row state is blocked and no tool line renders. The code still reads presentation.message. resolveProgramStatusPresentation leaves message unset when entry.toolName is non-empty, because a structured tool preview takes priority. A hook-owned blocked row can still carry a toolName, for example Bash from an earlier step. In that case the row shows only Sign-in required and drops the program's message, such as Session expired. No tool preview competes with the message here, so that priority rule does not apply. The attention branch at Line 341 already uses facet.message without that gate.
🐛 Proposed fix
--- "a/src/renderer/src/components/dashboard/DashboardAgentRow.tsx"
+++ "b/src/renderer/src/components/dashboard/DashboardAgentRow.tsx"
@@ -340,12 +340,14 @@
stoppingLabel ??
(presentation.attention ? programStatusAttentionLine(presentation.attention) : null) ??
// A blocked row (auth) shows no tool line, so the program's block stands in for it.
(!showsTool && agent.entry.programStatus?.state === 'blocked'
? programStatusAttentionLine({
...(agent.entry.programStatus.kind ? { kind: agent.entry.programStatus.kind } : {}),
- ...(presentation.message ? { message: presentation.message } : {})
+ ...(agent.entry.programStatus.message
+ ? { message: agent.entry.programStatus.message }
+ : {})
})
: null)
}
/>
<DashboardAgentRowMessage📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| (!showsTool && agent.entry.programStatus?.state === 'blocked' | |
| ? programStatusAttentionLine({ | |
| ...(agent.entry.programStatus.kind ? { kind: agent.entry.programStatus.kind } : {}), | |
| ...(presentation.message ? { message: presentation.message } : {}) | |
| }) | |
| (!showsTool && agent.entry.programStatus?.state === 'blocked' | |
| ? programStatusAttentionLine({ | |
| ...(agent.entry.programStatus.kind ? { kind: agent.entry.programStatus.kind } : {}), | |
| ...(agent.entry.programStatus.message | |
| ? { message: agent.entry.programStatus.message } | |
| : {}) | |
| }) |
|
|
||
| /** A finished program's result the command-finished drop keeps (not an interrupted program's). */ | ||
| export function isRetainedProgramResult(entry: ProgramStatusRowSource): boolean { | ||
| if (entry.state !== 'done' || entry.sessionBoundary === true || !isProgramStatusRow(entry)) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Exclude interrupted program results from retention.
If an interrupted done row still carries a done or error program facet, this predicate retains it. sessionBoundary does not identify interruptions. The command-finished handlers then keep the interrupted result until another input or command. Check entry.interrupted here, and test an interrupted row without a session boundary.
ELI5
Shows what OSC 7501 programs report: a ring that fills as work progresses, a letter icon for programs like brew, the program's own message, and a finished result that stays until you come back to the pane.
What Changed
Before: the core PR gives programs a status row, but with Orca's agent styling: a "?" icon, no message, and a row that vanishes the moment the program exits.
After:
Mechanism:
AgentProgressRingis drawn byAgentStateDotwhen the sharedresolveProgramStatusPresentationreturns a progress value.lib/program-status/result-retention.tskeeps the result through the command-finished drop and dismisses it on input or command start. It's forgotten when the pane or tab closes.--agent-workingtoken, and the existing spinner uses it too.Why
The ring replaces the spinner rather than sitting beside it, so a row stays one glyph wide and the fill is the only readout. A visible number felt noisy next to the row's own text.
Keeping results only for non-agent OSC 7501 rows matches the spec without touching how agent rows clear today.
Stack:
Linked Issue
N/A (maintainer change; no pre-existing issue)
Visual Proof
Progress ring (row and tab; the % in the text is the program's own message):
Sign-in block reported by a program:
Testing
I manually tested these changes locally
Automated tests added/updated
Live (macOS): a background Orca dev build driven over CDP, with scripted terraform and brew programs. Progress, approval, sign-in, kept results and keypress dismissal all confirmed.
New tests: progress ring and label, state-dot tones, tab progress, row presentation, tool preview (program vs. agent), verdict line, result retention and letter icons.
Static checks: typecheck and lint are clean.
AI Disclosure
Review
Agent skill upstream boundary
Notes
progressbarwith one label.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)