Skip to content

fix(sidebar): show unread emphasis in compact agent rows - #23327

Merged
nwparker merged 1 commit into
mainfrom
nwparker/publish-22870-09-26
Sep 27, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/publish-22870-09-26

Conversation

@nwparker

@nwparker nwparker commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​182 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​179
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8

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.

Before: unread A is muted
After: unread A is bold

Current-head external non-Git folder, before and after explicit row click:

Folder completion before click
Folder completion after click

Testing

  • Automated local rendered checks on macOS, with hidden Electron and disposable profiles.
  • Automated tests added/updated.

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.ts against 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-toplevel exits 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

  • Not applicable: no skill source is changed.

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

  • This PR is small and focused.
  • User before/after, mechanism and reuse rationale explained.
  • Before/after screenshots attached.
  • Self-reviewed for correctness, security and performance.
  • Cross-platform, SSH/remote and folder workspaces considered.
  • Independent source and evidence review completed with no findings.
  • Current-head CI is clear: 19 successful checks and 15 intentionally skipped. The initial unchanged Windows installer-query timeout passed on one targeted retry, including required verify. CodeRabbit could not review because its quota was exhausted; independent review and Pullfrog both completed without findings.

Reuse the existing per-pane acknowledgement age calculation in compact rows, preserving focused contrast and all-state behavior.

Co-authored-by: drakeo338 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 29884b33-9ae9-402c-a3d9-95d13a398e32

📥 Commits

Reviewing files that changed from the base of the PR and between 1d2c0e5 and 7f225fc.

📒 Files selected for processing (4)
  • src/renderer/src/components/sidebar/WorktreeCardAgents.acknowledgement-emphasis.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx

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.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Compact rows consume the existing unread map — WorktreeCardAgents.tsx now passes unvisitedByPaneKey[agent.paneKey] ?? false into CompactAgentRow, the same acknowledgement projection the full DashboardAgentRow already uses at line 269. No second unread policy is introduced.
  • Leading label emphasis — worktree-card-compact-agent-row.tsx adds an optional isUnvisited prop (default false) and applies font-semibold text-foreground for unvisited rows versus font-normal text-muted-foreground/90 for visited ones, with the focused lift preserved as isFocusedPane && !isUnvisited. cn/tailwind-merge resolves the visited+focused case to text-foreground exactly as before.
  • New rendered test — WorktreeCardAgents.acknowledgement-emphasis.test.tsx exercises the behaviour through the component with a mocked store: ack-age boundaries (ack < stateStartedAt, including stateStartedAt: 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.tsx compact expectations moved from text-muted-foreground/90 to font-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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

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