From 230297b43036a137ef4a65f5a273f4f144fb8fb3 Mon Sep 17 00:00:00 2001
From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Date: Fri, 19 Jun 2026 19:35:23 -0700
Subject: [PATCH] Improve unread workspace contrast in the sidebar (#5866)
---
.../sidebar/WorktreeCardAgents.test.tsx | 41 +++++++++++++++++++
.../worktree-card-compact-agent-row.tsx | 6 ++-
2 files changed, 45 insertions(+), 2 deletions(-)
diff --git a/src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx b/src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx
index c670db92280..f3195806907 100644
--- a/src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx
+++ b/src/renderer/src/components/sidebar/WorktreeCardAgents.test.tsx
@@ -205,6 +205,47 @@ describe('WorktreeCardAgents', () => {
expect(markup).not.toContain('data-testid="agent-row"')
})
+ it('dims non-focused compact agent row text', async () => {
+ mockAgentActivityDisplayMode = 'compact'
+ mockAgents = [
+ mockAgent({
+ agentType: 'codex',
+ startedAt: 1000,
+ prompt: 'Run tests',
+ lastAssistantMessage: 'Inspecting changes'
+ })
+ ]
+ const { default: WorktreeCardAgents } = await import('./WorktreeCardAgents')
+
+ const markup = renderToStaticMarkup()
+
+ expect(markup).toContain('Run tests')
+ expect(markup).toContain(' - Inspecting changes')
+ expect(markup).not.toContain('data-focused-agent-pane="true"')
+ expect(markup).not.toContain('Run tests')
+ })
+
+ it('keeps focused compact agent row text legible', async () => {
+ mockAgentActivityDisplayMode = 'compact'
+ mockFocusedAgentPaneKey = 'tab-1:1'
+ mockAgents = [
+ mockAgent({
+ agentType: 'codex',
+ startedAt: 1000,
+ prompt: 'Focused prompt',
+ lastAssistantMessage: 'Reading output'
+ })
+ ]
+ const { default: WorktreeCardAgents } = await import('./WorktreeCardAgents')
+
+ const markup = renderToStaticMarkup()
+
+ expect(markup).toContain('data-focused-agent-pane="true"')
+ expect(markup).toContain('Focused prompt')
+ expect(markup).toContain(' - Reading output')
+ expect(markup).not.toContain('Focused prompt')
+ })
+
it('marks only the focused agent row', async () => {
mockAgentActivityDisplayMode = 'full'
mockFocusedAgentPaneKey = 'tab-1:2'
diff --git a/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx b/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
index e865b354117..88eab356c61 100644
--- a/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
@@ -199,9 +199,11 @@ export const CompactAgentRow = React.memo(function CompactAgentRow({
{/* Why: the selected-row fill is strong enough to wash out the dimmed
prompt/secondary text, so lift both toward full foreground when focused. */}
- {primary}
+
+ {primary}
+
{secondary && (
-
+
{' '}
- {secondary}