You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sidebar: bring back the Usage button on the main screen #7096
Usage was a place I checked many times a day to watch token spend and quota, and the one-click rail button was the reason it got checked at all
Going through Settings turns a glance into a detour: it swaps the whole surface, loses my current context, and I have to navigate back out
Nothing is wrong with the new /settings/usage page itself — the ask is only about how it is reached
Today
The main sidebar rail has Workspaces, Automations, Tasks, Pull Requests, Pages and Plugins. Usage sits behind Settings, or behind Cmd+Shift+U, which lands on Machine resources rather than Token usage.
Proposal
Put Usage back on the main sidebar rail alongside the other destinations, and keep the Settings entry as it is now. If the rail is meant to stay short, make it opt-in rather than removed — a toggle, or a pinnable item — so people who watch spend daily can keep it one click away. A dedicated hotkey that opens Token usage directly would also help.
This is a UX regression report, not a crash: 1.25.1 removed the Usage entry from the main sidebar rail (PR #6883, "fold Usage into Settings"), so the only ways in are Settings → Usage or the command palette. The reporter wants the rail button back, or an opt-in/pinnable version of it, plus a hotkey that lands on Token usage rather than Machine resources. I checked the code and every factual claim in the report holds: there is no Usage entry in the rail today, Cmd+Shift+U does deliberately go to Machine resources, and Settings is a full-window takeover rather than an overlay.
Affected code
The rail itself — apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx. It renders two parallel, hand-written lists (no shared item config):
collapsed rail: lines 235–528
expanded rail: lines 530–744
Both contain exactly New Workspace, Search, Workspaces (DashboardSidebarHeader.tsx:600), Automations (:619), Tasks (:649), Pull requests (:670), Pages (:693, gated on FEATURE_FLAGS.PAGES), Plugins (:719, gated on FEATURE_FLAGS.PLUGINS). No Usage entry in either branch — matching the report.
The intended replacement — apps/desktop/src/renderer/commandPalette/modules/resources/commands.tsx:18-36. The doc comment there states the design intent outright: it is "the direct, one-step way in, reopening whichever section … was visited last — same behavior the removed sidebar rail button had." It resolves the target via usageSectionPath(getUsageLastSection()) (settings/usage/utils/usageLastSection/usageLastSection.ts:6-30).
The hotkey — apps/desktop/src/renderer/hotkeys/registry.ts:973-988 defines CHECK_RESOURCES as meta+shift+u on Mac, and commandPalette/hooks/useCheckResourcesHotkey/useCheckResourcesHotkey.ts:17 hard-codes navigate({ to: "/settings/usage/resources" }).
Settings as a surface — routes/_authenticated/settings/layout.tsx:175 renders h-screen w-screen, i.e. it replaces the dashboard rather than overlaying it.
Assessment
Not a regression in the sense of a broken code path — this is the documented behavior of #6883, recorded in apps/marketing/content/changelog/2026-08-30-seventeen-languages-session-handoff.mdx:56. The report is a request to partially revert a deliberate IA decision. Three things in it are worth separating, because two are arguably defects and one is purely a product call:
Rail entry removed (product call). Working as designed; the palette command is the sanctioned substitute. Whether one-step-via-palette is an acceptable replacement for one-click-always-visible is the maintainers' call.
Cmd+Shift+U lands on Machine resources (defensible, but there is a real gap). The hotkey is named and labeled "Check Resources", so it is doing what it says. The gap is that there is no hotkey for Token usage at all: openUsageCommand (commands.tsx:18) has no hotkeyId, unlike checkResourcesCommand (commands.tsx:51). Anyone who learned Cmd+Shift+U as "the usage shortcut" now has no keyboard route to the token view.
"Loses my current context" (substantiated). The return path is originRoute in renderer/stores/settings-state.ts:51, an in-memory zustand value recorded at routes/_authenticated/layout.tsx:157-161. It stores location.pathname only — no search params — and defaults to /workspace. So Escape/back out of Settings returns to the path but drops route search state, and after a renderer reload while in Settings it drops you on /workspace regardless of where you came from.
Separate small finding, unrelated to the request but caused by the same PR: the comment at DashboardSidebarHeader.tsx:540-543 still explains that on Mac ZoomStable keeps "the collapse/nav icons and usage badge" at constant physical size. Nothing in that row renders a usage badge anymore — it holds SidebarToggle, NavigationControls, and TopBarPortsDropdown (:556-562). I grepped for UsageBadge/usage-badge/SidebarUsage across apps/desktop/src and found nothing. Stale comment worth deleting whichever way this issue goes.
Reproduction
Launch the desktop app on any route under the dashboard.
Inspect the sidebar rail (expanded and collapsed): Workspaces, Automations, Tasks, Pull requests, and — if the PostHog flags are on — Pages and Plugins. No Usage.
Press Cmd+Shift+U → lands on /settings/usage/resources (Machine resources pill selected), never /settings/usage.
Open the command palette and type "usage" → openUsageCommand fires and does honor the last-visited section, showing the two paths disagree.
For a unit-level guard, the section-resolution logic is already pure and testable without a renderer: getUsageLastSection/usageSectionPath in settings/usage/utils/usageLastSection/usageLastSection.ts can be driven directly from bun:test by seeding localStorage, so a fix that routes a new rail button (or hotkey) through usageSectionPath(getUsageLastSection()) can be asserted the same way the palette command behaves.
Suggested direction
Rail button. Add a Usage entry to both branches of DashboardSidebarHeader.tsx — the collapsed one near :443 and the expanded one near :719 — mirroring the Plugins block. Navigate with usageSectionPath(getUsageLastSection()) rather than a literal /settings/usage, so the rail and the palette agree. HiOutlineChartBar is already the Usage icon in both commands.tsx:22 and SettingsSidebar/GeneralSettings.tsx:121.
If it should be opt-in. Worth flagging before someone starts: there is no user-facing preference for rail contents today. Pages and Plugins gate on PostHog feature flags (DashboardSidebarHeader.tsx:163-165, :211), which is a rollout mechanism, not a user toggle. A "pin to sidebar" affordance therefore means new persisted state. A fixed-size singleton in localStorage — the same shape as usage-last-section-v1 — satisfies the persisted-renderer-state policy in apps/desktop/AGENTS.md (bounded, single key, no entity cardinality); anything per-entity would not.
Hotkey. Add an OPEN_USAGE entry to HOTKEYS_REGISTRY and set hotkeyId on openUsageCommand so the palette displays it. Note both obvious keys are taken on Mac: meta+shift+u by CHECK_RESOURCES (registry.ts:975) and meta+u by CHAT_ADD_ATTACHMENT (registry.ts:896).
If a spend number on the rail is wanted rather than just a button, be aware useHostUsageQuota is host-scoped and polls every 5 minutes with a host-side cache (useHostUsageQuota.ts:12,31, "faster polling gets the endpoint 429-blacklisted"). The rail spans projects/hosts, so which host's quota to display is an open question — the plain navigation button avoids that entirely and is the smaller change.
Activity
github-actions commentedon Sep 2, 2026
Summary
This is a UX regression report, not a crash: 1.25.1 removed the Usage entry from the main sidebar rail (PR #6883, "fold Usage into Settings"), so the only ways in are Settings → Usage or the command palette. The reporter wants the rail button back, or an opt-in/pinnable version of it, plus a hotkey that lands on Token usage rather than Machine resources. I checked the code and every factual claim in the report holds: there is no Usage entry in the rail today,
Cmd+Shift+Udoes deliberately go to Machine resources, and Settings is a full-window takeover rather than an overlay.Affected code
The rail itself —
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarHeader/DashboardSidebarHeader.tsx. It renders two parallel, hand-written lists (no shared item config):Both contain exactly New Workspace, Search, Workspaces (
DashboardSidebarHeader.tsx:600), Automations (:619), Tasks (:649), Pull requests (:670), Pages (:693, gated onFEATURE_FLAGS.PAGES), Plugins (:719, gated onFEATURE_FLAGS.PLUGINS). No Usage entry in either branch — matching the report.The intended replacement —
apps/desktop/src/renderer/commandPalette/modules/resources/commands.tsx:18-36. The doc comment there states the design intent outright: it is "the direct, one-step way in, reopening whichever section … was visited last — same behavior the removed sidebar rail button had." It resolves the target viausageSectionPath(getUsageLastSection())(settings/usage/utils/usageLastSection/usageLastSection.ts:6-30).The hotkey —
apps/desktop/src/renderer/hotkeys/registry.ts:973-988definesCHECK_RESOURCESasmeta+shift+uon Mac, andcommandPalette/hooks/useCheckResourcesHotkey/useCheckResourcesHotkey.ts:17hard-codesnavigate({ to: "/settings/usage/resources" }).Settings as a surface —
routes/_authenticated/settings/layout.tsx:175rendersh-screen w-screen, i.e. it replaces the dashboard rather than overlaying it.Assessment
Not a regression in the sense of a broken code path — this is the documented behavior of #6883, recorded in
apps/marketing/content/changelog/2026-08-30-seventeen-languages-session-handoff.mdx:56. The report is a request to partially revert a deliberate IA decision. Three things in it are worth separating, because two are arguably defects and one is purely a product call:Rail entry removed (product call). Working as designed; the palette command is the sanctioned substitute. Whether one-step-via-palette is an acceptable replacement for one-click-always-visible is the maintainers' call.
Cmd+Shift+Ulands on Machine resources (defensible, but there is a real gap). The hotkey is named and labeled "Check Resources", so it is doing what it says. The gap is that there is no hotkey for Token usage at all:openUsageCommand(commands.tsx:18) has nohotkeyId, unlikecheckResourcesCommand(commands.tsx:51). Anyone who learnedCmd+Shift+Uas "the usage shortcut" now has no keyboard route to the token view."Loses my current context" (substantiated). The return path is
originRouteinrenderer/stores/settings-state.ts:51, an in-memory zustand value recorded atroutes/_authenticated/layout.tsx:157-161. It storeslocation.pathnameonly — no search params — and defaults to/workspace. So Escape/back out of Settings returns to the path but drops route search state, and after a renderer reload while in Settings it drops you on/workspaceregardless of where you came from.Separate small finding, unrelated to the request but caused by the same PR: the comment at
DashboardSidebarHeader.tsx:540-543still explains that on MacZoomStablekeeps "the collapse/nav icons and usage badge" at constant physical size. Nothing in that row renders a usage badge anymore — it holdsSidebarToggle,NavigationControls, andTopBarPortsDropdown(:556-562). I grepped forUsageBadge/usage-badge/SidebarUsageacrossapps/desktop/srcand found nothing. Stale comment worth deleting whichever way this issue goes.Reproduction
Cmd+Shift+U→ lands on/settings/usage/resources(Machine resources pill selected), never/settings/usage.openUsageCommandfires and does honor the last-visited section, showing the two paths disagree.For a unit-level guard, the section-resolution logic is already pure and testable without a renderer:
getUsageLastSection/usageSectionPathinsettings/usage/utils/usageLastSection/usageLastSection.tscan be driven directly frombun:testby seedinglocalStorage, so a fix that routes a new rail button (or hotkey) throughusageSectionPath(getUsageLastSection())can be asserted the same way the palette command behaves.Suggested direction
Rail button. Add a Usage entry to both branches of
DashboardSidebarHeader.tsx— the collapsed one near:443and the expanded one near:719— mirroring the Plugins block. Navigate withusageSectionPath(getUsageLastSection())rather than a literal/settings/usage, so the rail and the palette agree.HiOutlineChartBaris already the Usage icon in bothcommands.tsx:22andSettingsSidebar/GeneralSettings.tsx:121.If it should be opt-in. Worth flagging before someone starts: there is no user-facing preference for rail contents today. Pages and Plugins gate on PostHog feature flags (
DashboardSidebarHeader.tsx:163-165,:211), which is a rollout mechanism, not a user toggle. A "pin to sidebar" affordance therefore means new persisted state. A fixed-size singleton in localStorage — the same shape asusage-last-section-v1— satisfies the persisted-renderer-state policy inapps/desktop/AGENTS.md(bounded, single key, no entity cardinality); anything per-entity would not.Hotkey. Add an
OPEN_USAGEentry toHOTKEYS_REGISTRYand sethotkeyIdonopenUsageCommandso the palette displays it. Note both obvious keys are taken on Mac:meta+shift+ubyCHECK_RESOURCES(registry.ts:975) andmeta+ubyCHAT_ADD_ATTACHMENT(registry.ts:896).If a spend number on the rail is wanted rather than just a button, be aware
useHostUsageQuotais host-scoped and polls every 5 minutes with a host-side cache (useHostUsageQuota.ts:12,31, "faster polling gets the endpoint 429-blacklisted"). The rail spans projects/hosts, so which host's quota to display is an open question — the plain navigation button avoids that entirely and is the smaller change.