Merge pull request #72442 from NousResearch/bb/statusbar-session-prefs

feat(statusbar): hide the per-turn session readouts by default
This commit is contained in:
brooklyn! 2026-07-26 23:07:08 -05:00 committed by GitHub
commit 443ce196f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 1 deletions

View file

@ -493,6 +493,7 @@ export function useStatusbarItems({
id: 'running-timer',
label: copy.turnRunning,
title: copy.currentTurnElapsed,
toggleLabel: copy.toggleRunningTimer,
variant: 'text'
},
{
@ -511,6 +512,7 @@ export function useStatusbarItems({
/>
),
title: copy.openContextUsage,
toggleLabel: copy.toggleContextUsage,
variant: 'menu'
},
{
@ -519,6 +521,7 @@ export function useStatusbarItems({
id: 'session-timer',
label: copy.session,
title: copy.runtimeSessionElapsed,
toggleLabel: copy.toggleSessionTimer,
variant: 'text'
},
{

View file

@ -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()
})
})

View file

@ -2430,6 +2430,9 @@ export const en: Translations = {
toggleApprovalMode: 'Approvals',
toggleBackendVersion: 'Backend version',
toggleCommandCenter: 'Command Center',
toggleContextUsage: 'Context meter',
toggleRunningTimer: 'Turn timer',
toggleSessionTimer: 'Session timer',
toggleTerminal: 'Terminal',
toggleVersion: 'Version & updates',
toggleWorkspace: 'Workspace',

View file

@ -2036,6 +2036,9 @@ export interface Translations {
toggleApprovalMode: string
toggleBackendVersion: string
toggleCommandCenter: string
toggleContextUsage: string
toggleRunningTimer: string
toggleSessionTimer: string
toggleTerminal: string
toggleVersion: string
toggleWorkspace: string

View file

@ -2606,6 +2606,9 @@ export const zh: Translations = {
toggleApprovalMode: '审批',
toggleBackendVersion: '后端版本',
toggleCommandCenter: '命令中心',
toggleContextUsage: '上下文用量',
toggleRunningTimer: '回合计时',
toggleSessionTimer: '会话计时',
toggleTerminal: '终端',
toggleVersion: '版本与更新',
toggleWorkspace: '工作区',

View file

@ -5,11 +5,16 @@ const STATUSBAR_HIDDEN_STORAGE_KEY = 'hermes.desktop.statusbarHidden'
// Items the bar hides until the user turns them on from its context menu. The
// bar's job is to answer "is the backend healthy, where am I, what's it doing" —
// route shortcuts (cron/webhooks/agents), the terminal toggle, and the approval
// pill are navigation, not status, so they start out of the way.
// pill are navigation, not status, so they start out of the way. The per-turn
// session readouts (running/session timers, context meter) are diagnostics most
// users don't watch, so they start hidden too and the bar stays quiet mid-turn.
export const STATUSBAR_HIDDEN_BY_DEFAULT: readonly string[] = [
'agents',
'approval-mode',
'context-usage',
'cron',
'running-timer',
'session-timer',
'terminal',
'webhooks'
]