Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: add tests for collapsed navigation rail and sidebar navigation

Steven Enamakele3f61359ea1e
diff --git a/app/src/components/layout/shell/CollapsedNavRail.test.tsx b/app/src/components/layout/shell/CollapsedNavRail.test.tsx
index 972aca890f..a0f18cd14b 100644
--- a/app/src/components/layout/shell/CollapsedNavRail.test.tsx
+++ b/app/src/components/layout/shell/CollapsedNavRail.test.tsx
@@ -26,7 +26,6 @@ describe('CollapsedNavRail', () => {
'nav.home',
'shortcuts.title',
'nav.chat',
- 'nav.human',
'nav.brain',
'nav.flows',
'nav.connections',
@@ -35,6 +34,10 @@ describe('CollapsedNavRail', () => {
}
// The wallet shortcut was removed from the rail.
expect(screen.queryByRole('button', { name: 'nav.wallet' })).not.toBeInTheDocument();
+ // Human is reached from the chat composer's idle button, not a nav row.
+ expect(screen.queryByRole('button', { name: 'nav.human' })).not.toBeInTheDocument();
+ // Rewards is cloud-gated; this store has no resolved cloud session.
+ expect(screen.queryByRole('button', { name: 'nav.rewards' })).not.toBeInTheDocument();
});
it('renders rail icons as sidebar menu primitives', () => {
diff --git a/app/src/components/layout/shell/SidebarNav.test.tsx b/app/src/components/layout/shell/SidebarNav.test.tsx
index 3f743e39a4..2e5dabe363 100644
--- a/app/src/components/layout/shell/SidebarNav.test.tsx
+++ b/app/src/components/layout/shell/SidebarNav.test.tsx
@@ -38,20 +38,20 @@ describe('SidebarNav active matching', () => {
expect(tabButton('Workflows')).not.toHaveAttribute('aria-current');
});
- it('gives the active tab a neutral fill that lifts off the chrome, not an accent tint', () => {
+ it('gives the active tab the accent fill, not a neutral surface lift', () => {
renderWithProviders(<SidebarNav />, { initialEntries: ['/chat'] });
const active = tabButton('Chat');
- // The sidebar sits on the themed chrome layer, which already carries the
- // theme's hue — so selection is a neutral surface lift plus weight. Tinting
- // the pill on top of a tinted chrome stacks two colours and reads as noise.
- expect(active.className).toContain('bg-surface/70');
+ // The accent is the only colour in this column, which is what makes it
+ // legible as selection rather than decoration. This was a neutral
+ // `bg-surface/70` while the chrome was a themed WebGL mesh; the flat
+ // default backdrop left a neutral pill with nothing to lift against.
+ expect(active.className).toContain('bg-primary-500');
expect(active.className).toContain('font-semibold');
- expect(active.className).not.toContain('bg-primary');
expect(active.className).not.toContain(RAW_WHITE_FILL);
// Inactive tabs carry no active fill.
- expect(tabButton('Human').className).not.toContain('bg-surface/70');
+ expect(tabButton('Workflows').className).not.toContain('bg-primary-500');
});
it('renders rows as sidebar menu primitives, not bare buttons', () => {