Skip to content

fix(sidebar): mark unvisited finished agent rows with unread badge and bold text - #22899

Draft
pinhaum wants to merge 1 commit into
stablyai:mainfrom
pinhaum:fix/sidebar-agent-row-unread-indicator
Draft

pinhaum wants to merge 1 commit into
stablyai:mainfrom
pinhaum:fix/sidebar-agent-row-unread-indicator

Conversation

@pinhaum

@pinhaum pinhaum commented Sep 25, 2026

Copy link
Copy Markdown

ELI5

When several agents run in one workspace and one finishes, the workspace lights up its bell, but nothing on the agent rows tells you which agent finished. This PR makes the finished-but-unseen agent's row stand out, so you can go straight to it.

What Changed

Before: in the default "compact" agent display, a row for an agent that just finished looked exactly like a row that finished hours ago: same green check, same muted text. Only the workspace bell changed, so with two or more agents you had to open each one to find the new result.

After: until you visit it, a finished agent's row is shown in bold with a small amber unread dot on its status icon. It is the same dot the workspace card already uses for unread. Rows that are working or waiting for input stay bold but get no dot, because their spinner or question icon already asks for attention.

Mechanism: the sidebar already works out, for every agent row, whether you have seen its latest turn (acknowledgedAt < stateStartedAt). Only the full-mode row (DashboardAgentRow) received that value. The compact row (CompactAgentRow), which is the default display mode, never did, so the emphasis was lost. This PR:

  • passes the unvisited flag to CompactAgentRow and bolds its label, matching full mode;
  • adds a shared UnreadAlertBadge (pulled out of WorktreeCardStatusSlot) and overlays it on the state icon of unvisited rows in both modes, gated by showsAgentRowUnreadBadge so only settled states (done, failed, interrupted, idle) get the dot;
  • adds an --unread-alert theme token for the badge color. It is the same amber as before, so the badge no longer uses a raw palette class.

Why

The data was already correct: the store held the turn as done and unread. The gap was only in what the compact row rendered, so the fix is in the renderer and changes nothing about how acknowledgement works.

I considered replacing the green check with the amber dot. I rejected it because the state icon and the unread dot mean different things: done and failed would look identical until visited. Overlaying the dot keeps both, and it matches how the workspace card already shows unread. Leaving the dot off active states mirrors the workspace status slot, which also hides it for working and needs-attention.

Linked Issue

Fixes #22857

Visual Proof

Before/after screenshots attached below.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Reproduced on Linux (Hyprland/Wayland) in a dev build: two agents in one workspace, started a task in one, stayed on another terminal until it finished. Read the renderer store over CDP and confirmed the finished turn was done, unacknowledged and unread while its row rendered muted. After the fix, the same row renders bold with the badge; visited rows stay muted.

  • New tests: worktree-card-compact-agent-row.unvisited.test.tsx (bold and badge when unvisited; bold without badge while working; muted when visited), WorktreeCardAgents.compact-unvisited.test.tsx (the card passes the flag to compact rows) and a DashboardAgentRow case for the badge gating. The shared store mock in WorktreeCardAgents.test.tsx now acknowledges its fixture agent, since its compact contrast tests only passed before because compact rows ignored the unvisited flag.

  • pnpm test (sidebar and dashboard suites), pnpm typecheck, pnpm lint and check:code-quality:changed pass locally. pnpm build was not run locally; CI covers it.

  • Not tested on macOS or Windows. The change is renderer-only markup and CSS with no platform branches.

AI Disclosure

Investigation, implementation and tests were done with Claude Code (Claude Opus 5.5) and reviewed by me.

Review

  • Cross-platform: renderer-only markup and CSS; no platform checks, shortcuts or paths involved.
  • SSH/remote/local: no change to where agent status comes from or how it is acknowledged; the row reads the same unvisited value that full mode already used, so remote workspaces behave the same.
  • Agents and integrations: provider-neutral; the badge keys only off the shared row state vocabulary.
  • Performance: no new subscriptions; the unvisited map was already computed per card, and this only renders one extra span for unvisited settled rows.
  • UI: reuses the existing workspace unread dot and theme tokens; the design-system lint passes.
  • Security: none affected.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Only the sidebar's inline agent rows change. The collapsed "N agents" summary pill still does not show which agent is unread; that could be a follow-up.

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)

…d bold text

Compact agent rows never received the unvisited flag, so a finished agent looked identical to older done agents. Bold unvisited rows in compact mode and overlay the workspace unread badge on settled (done/failed/interrupted/idle) rows in both modes.

Fixes stablyai#22857
nwparker added a commit that referenced this pull request Sep 27, 2026
Show unread emphasis in compact workspace rows using the existing pane acknowledgment state.

Based on drakeo338’s bounded PR #22870. pinhaum reported #22857 and proposed the broader #22899 variant; the local candidate preserves the existing acknowledgement policy.

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

This branch has not been deployed

No deployments
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.

[Bug]: Sidebar agent rows don't mark a finished agent the user hasn't seen (compact mode)

1 participant