Skip to content

feat(agent-status): show OSC 7501 program status in rows and tabs - #30262

Merged
nwparker merged 1 commit into
mainfrom
nwparker/osc7501-ui
Oct 19, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/osc7501-ui

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​704 $\color{#cf222e}{\Huge{\mathbf{−}}}$​23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​681
Prod 29 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​470 $\color{#cf222e}{\Huge{\mathbf{−}}}$​67 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​403

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:

  • Progress ring: when a program reports a percentage, the working spinner becomes a ring that fills clockwise, on the row and the tab. While the program is blocked, the ring keeps its progress and turns the attention colour. There's no number; the percentage is in the tooltip and accessible label.
  • Letter icons: non-agent programs show their first letter.
  • Message as preview: the program's own message shows as the row preview, and a failed program reads "Failed: ". A block the row's state doesn't show (sign-in after a hook-owned turn) raises attention.
  • Kept results: a finished program's result stays until the next keypress or command in that pane, as the protocol asks. Real agents behave exactly as before.

Mechanism:

  • Ring: AgentProgressRing is drawn by AgentStateDot when the shared resolveProgramStatusPresentation returns a progress value.
  • Tab progress: folded into the existing single tab-activity pass, so it follows the same staleness rules and pane as the tab's status dot.
  • Kept results: lib/program-status/result-retention.ts keeps the result through the command-finished drop and dismisses it on input or command start. It's forgotten when the pane or tab closes.
  • Colour token: the working colour is now the --agent-working token, 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:

  1. refactor: extract helpers that agent-status files need room for #30260 prep refactors
  2. feat(agent-status): read OSC 7501 program status beside hooks #30261 OSC 7501 core
  3. feat(agent-status): show OSC 7501 program status in rows and tabs #30262 (this PR) OSC 7501 UI

Linked Issue

N/A (maintainer change; no pre-existing issue)

Visual Proof

Before After
before-brew "?" icon, no message after-brew letter icon, "Installing updates"
before-done row vanishes on exit after-done "Done – Apply complete!" kept until the next key or command

Progress ring (row and tab; the % in the text is the program's own message):

Working Waiting for approval (keeps progress) Nearly done

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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Reduced motion: the ring jumps instead of easing.
  • Accessibility: the ring is a progressbar with one label.
  • Design tokens: no raw palette colours.
  • Remote and SSH panes: retention covers the parked SSH watcher too.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from 50020f8 to 5db014e Compare October 18, 2026 21:59
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from ec9cd23 to 79d1c12 Compare October 19, 2026 00:10
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch 2 times, most recently from 7e21c26 to 5b02fe3 Compare October 19, 2026 01:17
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch 2 times, most recently from 0c740d0 to 3ae43c1 Compare October 19, 2026 02:04
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from 5b02fe3 to 9a3b68c Compare October 19, 2026 02:04
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from 3ae43c1 to c2925bf Compare October 19, 2026 02:26
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch 2 times, most recently from 7dedc2d to d27ee18 Compare October 19, 2026 02:58
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from c2925bf to 1b37afa Compare October 19, 2026 02:58
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from d27ee18 to 4629c0a Compare October 19, 2026 03:10
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from 1b37afa to ccad120 Compare October 19, 2026 03:10
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from 4629c0a to bccb3ba Compare October 19, 2026 03:35
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from ccad120 to 1ef6bde Compare October 19, 2026 03:35
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from bccb3ba to 65c6617 Compare October 19, 2026 03:53
@nwparker
nwparker force-pushed the nwparker/osc7501-core branch from 1ef6bde to e922020 Compare October 19, 2026 03:53
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.
@nwparker
nwparker force-pushed the nwparker/osc7501-ui branch from 65c6617 to b562782 Compare October 19, 2026 05:16
@nwparker
nwparker changed the base branch from nwparker/osc7501-core to main October 19, 2026 05:16
@nwparker nwparker closed this Oct 19, 2026
@nwparker nwparker reopened this Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The change adds progress rings and program-status text to agent rows and terminal tabs. It retains eligible completed program results until qualifying input or a new command dismisses them. It also adds a shared agent-type icon and a working-state color token.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to b5627

Some interrupted results may remain visible until further input, and some blocked rows may omit the program’s explanation. These are narrow UI issues; merging is reasonable with owner acceptance or a follow-up fix.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 53.06% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 45 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding OSC 7501 program-status presentation in rows and tabs.
Description check Passed The description covers the required sections, user-facing behavior, implementation approach, rationale, visual proof, testing, compatibility considerations, and checklist. It also explains that no lin…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the required sections, user-facing behavior, implementation approach, rationale, visual proof, testing, compatibility considerations, and checklist. It also explains that no linked issue is required because this is a maintainer change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 53.06% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 49 functions across 45 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78116776-cd9f-4b9b-b430-9ea524890b45
📥 Commits

Reviewing files that changed from the base of the PR and between d45894c and b562782.

⛔ Files ignored due to path filters: 1
  • src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing: 46
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/AgentProgressRing.test.tsx
  • src/renderer/src/components/AgentProgressRing.tsx
  • src/renderer/src/components/AgentStateDot.test.ts
  • src/renderer/src/components/AgentStateDot.tsx
  • src/renderer/src/components/AgentWorkingSpinner.test.tsx
  • src/renderer/src/components/AgentWorkingSpinner.tsx
  • src/renderer/src/components/activity/activity-thread-detail-pane.tsx
  • src/renderer/src/components/activity/activity-thread-hover-card-summary.tsx
  • src/renderer/src/components/activity/activity-thread-row.tsx
  • src/renderer/src/components/cmd-j/palette-live-status.test.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx
  • src/renderer/src/components/dashboard-popout/AgentTerminalDialog.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRow.test.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRowToolStep.test.tsx
  • src/renderer/src/components/dashboard/DashboardAgentRowToolStep.tsx
  • src/renderer/src/components/editor/ReviewNotesSendMenuContent.tsx
  • src/renderer/src/components/sidebar/StatusIndicator.test.ts
  • src/renderer/src/components/sidebar/StatusIndicator.tsx
  • src/renderer/src/components/sidebar/WorktreeCardStatusSlot.test.tsx
  • src/renderer/src/components/sidebar/worktree-card-compact-agent-row-program-status.test.ts
  • src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
  • src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/tab-bar/TerminalTabLeadingIcon.tsx
  • src/renderer/src/components/tab-bar/tab-title-tooltip.test.tsx
  • src/renderer/src/components/tab-bar/terminal-tab-activity-status.ts
  • src/renderer/src/components/tab-bar/terminal-tab-program-progress.test.ts
  • src/renderer/src/components/tab-bar/use-terminal-tab-activity.ts
  • src/renderer/src/components/terminal-pane/parked-terminal-command-status.test.ts
  • src/renderer/src/components/terminal-pane/parked-terminal-command-status.ts
  • src/renderer/src/components/terminal-pane/pty-connection-command-finished-late-done.test.ts
  • src/renderer/src/components/terminal-pane/pty-connection/interrupt-input-intent.ts
  • src/renderer/src/components/terminal-pane/pty-connection/pane-agent-identity.ts
  • src/renderer/src/lib/agent-row-tool-preview.test.ts
  • src/renderer/src/lib/agent-row-tool-preview.ts
  • src/renderer/src/lib/agent-type-icon.test.tsx
  • src/renderer/src/lib/agent-type-icon.tsx
  • src/renderer/src/lib/agent-verdict-status-line.test.ts
  • src/renderer/src/lib/agent-verdict-status-line.ts
  • src/renderer/src/lib/program-status/agent-row-presentation.ts
  • src/renderer/src/lib/program-status/result-retention.test.ts
  • src/renderer/src/lib/program-status/result-retention.ts
  • src/renderer/src/lib/program-status/row.ts
  • src/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.

Comment on lines +343 to +347
(!showsTool && agent.entry.programStatus?.state === 'blocked'
? programStatusAttentionLine({
...(agent.entry.programStatus.kind ? { kind: agent.entry.programStatus.kind } : {}),
...(presentation.message ? { message: presentation.message } : {})
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Suggested change
(!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)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

@nwparker
nwparker merged commit f48123e into main Oct 19, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant