Repository navigation
fix(sidebar): show unread emphasis in compact agent rows - #23327
Conversation
Reuse the existing per-pane acknowledgement age calculation in compact rows, preserving focused contrast and all-state behavior. Co-authored-by: drakeo338 <[email protected]>
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
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 new issues found.
Reviewed changes
- Compact rows consume the existing unread map —
WorktreeCardAgents.tsxnow passesunvisitedByPaneKey[agent.paneKey] ?? falseintoCompactAgentRow, the same acknowledgement projection the fullDashboardAgentRowalready uses at line 269. No second unread policy is introduced. - Leading label emphasis —
worktree-card-compact-agent-row.tsxadds an optionalisUnvisitedprop (defaultfalse) and appliesfont-semibold text-foregroundfor unvisited rows versusfont-normal text-muted-foreground/90for visited ones, with the focused lift preserved asisFocusedPane && !isUnvisited.cn/tailwind-merge resolves the visited+focused case totext-foregroundexactly as before. - New rendered test —
WorktreeCardAgents.acknowledgement-emphasis.test.tsxexercises the behaviour through the component with a mocked store: ack-age boundaries (ack < stateStartedAt, includingstateStartedAt: 0), A/B isolation, every agent state, focused contrast, monitoring/interrupted text, and same-state output vs a newer timestamp. - Existing assertions updated —
WorktreeCardAgents.test.tsxcompact expectations moved fromtext-muted-foreground/90tofont-semibold text-foreground, matching the new default.
I ran the two affected suites (vitest run): 46 passed. The new assertions are meaningful — without the production change the leading span would lack font-semibold/font-normal, so the tests fail. I found no correctness, security, or platform issues; the change is presentation-only and reads the execution-host acknowledgement state rather than writing it.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Compact agent rows now stay bold when they have newer activity you have not opened, matching the full view.
What Changed
Pass the existing per-pane acknowledgement result into compact rows and use it for the leading text weight and foreground color. Opening A returns A to normal weight without acknowledging B; focused text remains readable.
Why
The full view already computes this state. Reusing it avoids a second unread policy and preserves the existing behavior for every agent state, including working and completed rows.
Linked Issue
Addresses #22857. Based on the narrow proposal in #22870; its author is co-attributed. This leaves the broader badge changes in #22899 out of scope.
Visual Proof
Before and after below show the same unread A and acknowledged B using the preserved historical source behavior. These are hidden Electron captures with Playwright default focus emulation disabled; they are not native-focus evidence.
Current-head external non-Git folder, before and after explicit row click:
Testing
106 focused tests pass, including acknowledgement age, A/B isolation, activation, retained rows, child rows and cleanup. Ran installed Vitest with
--config config/vitest.config.tsagainst the affected sidebar, activation and acknowledgement suites; renderer types (tsc --noEmit -p config/tsconfig.tc.web.json), changed-code quality, and a fresh Electron Vite build pass.Fresh current-main rendered proof uses a real external folder where
git rev-parse --show-toplevelexits 128: two responsive shell panes, hook completion, bold row, exact pane click, normal weight and completion-marker clearing. All 39 sampled native-window states were hidden and unfocused.Review
Self-review found no execution-authority, persistence, remote-wire or platform-specific change. Independent review of this exact head found no issues, independently replayed the 106 focused tests and inspected the corrected external-folder runtime evidence. Pullfrog also found no new issues on the same head.
Agent skill upstream boundary
Notes
This only changes presentation; the existing hook/store authority and acknowledgement policy remain. No native-focus/automatic acknowledgement, real remote unread clearing, orchestration-child acceptance, local native Windows/Linux/WSL or mixed-version runtime proof is claimed. Historical focus-emulated captures are excluded. Local checks were focused; all eight CI test shards, static analysis, typecheck, packaging and required verify passed. Windows CI also passed packaged PTY capability and CLI smoke checks.
Checklist