Repository navigation
fix(sidebar): settle acknowledged completions to idle - #20927
peeyush-ciridae wants to merge 5 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe sidebar now computes a pane-specific display state for each agent. Unvisited completions remain Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The sidebar’s acknowledged-completion presentation remains consistent across rows, summaries, and worktree status, with no actionable merge risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — one scope question and one coverage nit.
Reviewed changes
- New
worktreeAgentDisplayState(worktree-card-agent-display-state.ts) —interruptedwins first, non-donedelegates toagentRowDotState, anddonefolds through the shareddashboardCardDisplayState, so an unvisited completion staysdoneand an acknowledged one settles toidle. - Display state threaded through the sidebar —
WorktreeCardAgentsderivesdisplayStateByPaneKeyfrom the existingunvisitedByPaneKeymemo and passes it to full rows, compact rows, and the compact summary. - Optional display map on the summary builders —
summarizeAgents,buildSummaryAgentGroups, andsummarizeAgentIdentitiesaccept a per-pane map and fall back to raw dot state when absent. DashboardAgentRowgains an optionaldisplayStatethat overrides the leading dot and the no-prompt label fallback while leavingagent.stateuntouched; no dashboard call site passes it.- New unit test covering unvisited-done, acknowledged-done (raw state unchanged), and interrupted preservation.
ℹ️ Worktree-level status dot can still read Done for the same acknowledged completion
The change settles the inline agent row to idle, but the worktree card's own status indicator is derived from hasLiveDone/hasRetainedDone and ignores the acknowledgement map. A worktree whose only agent has been acknowledged will therefore show Idle in the agent row while its card status dot stays green Done — a contradiction that did not exist before this PR, when both read Done.
Technical details
# Worktree status lane vs. per-row display state
## Affected sites
- `src/renderer/src/components/sidebar/worktree-agent-activity-summary.ts:245` — `applyLiveAgentState` sets `hasLiveDone` for any fresh `done` entry, with no acknowledgement input.
- `src/renderer/src/lib/worktree-status.ts:218` — `hasLiveDone || hasRetainedDone` resolves the worktree status to `done`.
- `src/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsx:144` — renders that status in the card's leading lane, directly above the inline agent list whose row now reads idle.
## Required outcome
- Decide whether the worktree status lane should follow the per-row settlement to `idle`, or stay `done` until the worktree is marked read.
## Open questions for the human
- Is the worktree-level `done` intentionally independent of the per-pane acknowledgement? The dashboard's equivalent bucket already folds acknowledged completions to `idle`, so the lane is now the only surface that keeps saying `Done`.ℹ️ Nitpicks
- The only test for the new behavior is the pure-function unit test;
WorktreeCardAgents.test.tsxmocksDashboardAgentRow, so nothing exercises thedisplayStateByPaneKeyplumbing through full rows, compact rows, or the compact summary. An integration assertion that an acknowledgeddonerow rendersidle(and an unvisited one rendersdone) would pin the wiring, not just the fold.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Addressed the automated review feedback in
Validation: 6 focused test files / 62 tests passed, renderer typecheck passed, changed-code quality reported zero new findings, and formatting passed. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the one commit added since the prior pullfrog review (aaf51f1), which resolves both points from that review.
- Worktree completion flags are now acknowledgement-aware —
hasLiveDoneandhasRetainedDoneare only set whileacknowledgedAt < stateStartedAt, so an acknowledged completion settles the worktree status lane instead of leaving it greendoneabove an idle row. - Acknowledgement wired into the summary cache —
acknowledgedAgentsByPaneKeyjoinsAgentActivityInput, the module-level cache key, andWorktreeActivityStatusState, so an acknowledgement invalidates and rebuilds the cached index while structurally equal summaries keep their references. - Integration coverage added — rendered tests pin the full-row display-state map, the acknowledged compact row/summary labels, and the live and retained worktree-status transitions, closing the prior coverage gap.
Verified: the acknowledgement map is replaced immutably, so the cache identity check genuinely fires; stateStartedAt is always a real clock for live and retained rows, so the strict < matches the dashboard's unseen; and interrupted/working rows stay ungated. Focused suite (6 files, 62 tests) passes locally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Final review cleanup is in
The prior validation remains green: 6 focused files / 62 tests, renderer typecheck, changed-code quality, and formatting. |

ELI5
A completed agent should say Done until you have seen it. After you visit it, both the agent row and the worktree card settle back to their quiet state instead of continuing to report Done forever.
What Changed
done.Why
OpenCode can correctly finish a turn and remain in the terminal
donestate. Orca should preserve that completion signal until the user sees it, then present the reusable session as idle. Previously, the row remained Done indefinitely; after the initial patch, the row could become Idle while the worktree-level status still said Done. This change makes both surfaces follow the same acknowledgement boundary.Linked Issue
Fixes #20940.
Related to #10130, which separately documents the expected reusable Codex behavior of remaining visible as Idle after completion. This PR does not claim to fix that issue's SSH row-retention path.
Visual Proof
N/A — this is a transient status transition that requires a live agent completion and acknowledgement. The accessible rendered labels and card status transition are covered by deterministic component tests instead of a static screenshot.
Testing
Verified on macOS development tooling:
Manual UI testing was not performed; the transition is exercised through rendered component integration tests for full, compact, summary, live, and retained paths.
AI Disclosure
OpenAI Codex was used to inspect the status lifecycle, implement the change, add tests, and review the diff.
Review
Please focus on the acknowledgement comparison (
acknowledgedAt < stateStartedAt) and the worktree summary cache invalidation when acknowledgement state changes.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (focused tests, direct typecheck, formatting, and changed-code quality passed; full build was not run)