diff --git a/src/renderer/src/components/sidebar/SidebarHeader.tsx b/src/renderer/src/components/sidebar/SidebarHeader.tsx index 3195e76cbc0..5c854e5c5d0 100644 --- a/src/renderer/src/components/sidebar/SidebarHeader.tsx +++ b/src/renderer/src/components/sidebar/SidebarHeader.tsx @@ -84,22 +84,23 @@ const SidebarHeader = React.memo(function SidebarHeader({ variant="ghost" size="icon-xs" className={cn( - 'text-muted-foreground', - agentsViewActive && 'bg-primary/15 text-primary hover:bg-primary/20' + 'w-8 text-muted-foreground', + agentsViewActive && + 'bg-foreground/10 text-foreground hover:bg-foreground/15 dark:hover:bg-foreground/15' )} aria-label={activityLabel} aria-pressed={agentsViewActive} aria-describedby={activityBadgeId} onClick={() => setSidebarBody?.(agentsViewActive ? 'workspaces' : 'agents')} > - - + + - + {counts.attention > 0 ? ( ) : ( @@ -111,7 +112,7 @@ const SidebarHeader = React.memo(function SidebarHeader({ /> )} - + { + }, testInfo) => { await waitForSessionReady(orcaPage) const worktreeId = await waitForActiveWorktree(orcaPage) await orcaPage.evaluate( @@ -245,6 +246,20 @@ for (const theme of ['dark', 'light'] as const) { name: sidebarBody === 'agents' ? 'Turn off activity view' : 'View activity', exact: true }) + await expect(button).toHaveAttribute('aria-pressed', String(sidebarBody === 'agents')) + await orcaPage.mouse.move(0, 0) + const background = await button.evaluate( + (element) => getComputedStyle(element).backgroundColor + ) + if (sidebarBody === 'agents') { + expect(background, 'The selected activity control must retain a visible fill').not.toBe( + 'rgba(0, 0, 0, 0)' + ) + } else { + expect(background, 'The inactive activity control must stay unfilled').toBe( + 'rgba(0, 0, 0, 0)' + ) + } for (const { state, count } of CASES) { await test.step(`${sidebarBody}: ${state} ${count}`, async () => { await seedActivity(orcaPage, worktreeId, state, count) @@ -257,6 +272,7 @@ for (const theme of ['dark', 'light'] as const) { ) }) } + await button.screenshot({ path: testInfo.outputPath(`${theme}-${sidebarBody}.png`) }) } }) }