Repository navigation
fix(sidebar): keep agent rows aligned with pane processes - #10066
joowon-jang wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughThe pull request adds explicit terminal-title identity matching, including aliases, boundary checks, Windows launcher handling, and canonical Braille-frame detection. Sidebar agent-row construction now incorporates pane foreground-agent evidence, filters stale or conflicting rows, and applies updated identity precedence. Foreground-agent entries are indexed and selected per worktree, wired through sidebar hooks, and propagated into dashboard snapshots, bucket counts, and popout refresh comparisons. Tests cover title attribution, selector memoization, row precedence, stale-state handling, and dashboard bucketing. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
🧹 Nitpick comments (1)
src/renderer/src/components/dashboard/build-dashboard-snapshot.ts (1)
115-118: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAvoid rebuilding the foreground-agent index once per worktree.
selectPaneForegroundAgentEntriesForWorktreerebuilds the complete worktree index on every call. Since this call is inside the worktree loop, snapshot construction reindexes all panes once per worktree. Add an all-worktrees selector/cache and read the current worktree’s entry from it once per snapshot.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6055445b-99dd-4fe7-b660-79948a9b3555
📒 Files selected for processing (17)
src/renderer/src/components/dashboard/build-dashboard-snapshot.test.tssrc/renderer/src/components/dashboard/build-dashboard-snapshot.tssrc/renderer/src/components/dashboard/useAgentBucketCounts.tssrc/renderer/src/components/dashboard/useDashboardPopoutBridge.test.tsxsrc/renderer/src/components/dashboard/useDashboardPopoutBridge.tssrc/renderer/src/components/sidebar/useWorktreeAgentRows.tssrc/renderer/src/components/sidebar/worktree-agent-row-evidence-precedence.test.tssrc/renderer/src/components/sidebar/worktree-agent-row-selectors.test.tssrc/renderer/src/components/sidebar/worktree-agent-row-selectors.tssrc/renderer/src/components/sidebar/worktree-agent-row-type.tssrc/renderer/src/components/sidebar/worktree-agent-rows.tssrc/renderer/src/components/sidebar/worktree-pane-foreground-index.tssrc/renderer/src/components/sidebar/worktree-title-derived-agent-rows.test.tssrc/renderer/src/components/sidebar/worktree-title-derived-agent-rows.tssrc/shared/explicit-agent-title-identity.tssrc/shared/terminal-title-agent-type.test.tssrc/shared/terminal-title-agent-type.ts
…te-sidebar-agent-icon # Conflicts: # src/renderer/src/components/dashboard/build-dashboard-snapshot.ts
Summary
Fixes #9848.
Root cause
The sidebar combined hook state, terminal titles, and launch metadata without a current per-pane process signal. Generic spinner and task titles could therefore be interpreted as another provider, stale hooks could keep loading and subagent rows alive after process exit, and old titles such as
Antigravitycould override a running Codex process.This change makes confirmed shell/process evidence authoritative over stale rows, keeps fresh hook state where it still owns the pane, and restricts title identity to explicit provider-owned frames.
Screenshots
No new UI surface or styling. This corrects the provider icon and loading state in the existing sidebar; before-state screenshots are available in #9848.
Testing
pnpm lint— changed-file Oxlint, React Doctor, formatting, and max-lines checks pass; the full command stops on the pre-existing unrelatedsrc/renderer/src/components/skills/skill-freshness-group.tsx:101switch-exhaustiveness errorpnpm typecheckpnpm test— 158 focused regression tests pass locally; an independent Claude review swept 1,002 files / 9,658 relevant tests successfullypnpm build—pnpm run build:desktoppasses; the native Swift build is unavailable in this environment because its installed SDK and compiler versions do not matchAI Review Report
An independent Claude reviewer was dispatched through Orca orchestration to inspect every changed and new file plus all consumers of the tightened title resolver and foreground-pane state.
The review checked:
.exe,.cmd,.bat, and.ps1launcher titlesThe first review found one existing-test regression:
mimo workingwas no longer recognized because the explicit identity aliases omitted the MiMo CLI token. Adding the narrowmimoalias fixed it without accepting path-like, superstring, fixture, or task-text false positives. A follow-up review reported no remaining blockers.Security Audit
Notes
ELI5
Sidebar agent rows could show the wrong agent or stay stuck after the shell returned. Orca now trusts live process evidence over stale titles, so icons, counts, and dashboard status match what is actually running.