Skip to content

The agent that grows with you

test(statusbar): cover the session readouts starting hidden

Brooklyn Nicholsonf7cfc6ecd318
diff --git a/apps/desktop/src/app/shell/statusbar-visibility.test.tsx b/apps/desktop/src/app/shell/statusbar-visibility.test.tsx
index cb26f286aa8..04defbe2947 100644
--- a/apps/desktop/src/app/shell/statusbar-visibility.test.tsx
+++ b/apps/desktop/src/app/shell/statusbar-visibility.test.tsx
@@ -96,4 +96,25 @@ describe('statusbar item visibility', () => {
expect(screen.getByText('Plugin thing')).toBeTruthy()
})
+
+ it('starts the per-turn session readouts hidden and restores them from the menu', async () => {
+ const statusbar = bar([
+ item('running-timer', 'Turn timer', { variant: 'text' }),
+ item('context-usage', 'Context meter', { variant: 'menu' }),
+ item('session-timer', 'Session timer', { variant: 'text' }),
+ item('gateway-health', 'Gateway')
+ ])
+
+ for (const label of ['Turn timer', 'Context meter', 'Session timer']) {
+ expect(screen.queryByText(label)).toBeNull()
+ }
+
+ openContextMenu(statusbar)
+
+ const row = await screen.findByRole('menuitemcheckbox', { name: 'Session timer' })
+ fireEvent.click(row)
+
+ expect($statusbarHiddenIds.get()).not.toContain('session-timer')
+ expect(within(statusbar).getByText('Session timer')).toBeTruthy()
+ })
})