Repository navigation
New-thread keyboard shortcuts do nothing on the Usage page even though the sidebar shows them #23425
Description
What happened
When the Usage view is open, the left sidebar still shows the new-thread buttons with their keyboard shortcut hints (Shift+Cmd+N for a new thread in the current project, Shift+Cmd+O for a new thread). The buttons work when clicked, but neither shortcut does anything. After clicking "Back" at the bottom of the sidebar, the shortcuts work again.
If the sidebar shows a button with a shortcut hint, the shortcut should work wherever that hint is shown.
Diagnosis
The window keydown listener that handles chat.new, chat.newLocal and chat.newWithoutProject is ChatRouteGlobalShortcuts in apps/web/src/routes/_chat.tsx (line 34 at v0.1.1). It is mounted only by the _chat layout route.
/usage is a top-level route (apps/web/src/routes/usage.tsx) outside the _chat layout, so no listener for these commands is mounted while it is open. The sidebar (Sidebar.tsx / LegacySidebar.tsx) is rendered by AppSidebarLayout on every route and still renders the shortcut labels from shortcutLabelForCommand(keybindings, "chat.new" | "chat.newLocal"), so the hints are shown but the shortcuts are dead.
Clicking "Back" navigates into a _chat route, which mounts ChatRouteGlobalShortcuts, and the shortcuts start working.
The same probably applies to other routes outside _chat that render the sidebar (/settings/*, /projects/$projectKey), but I only confirmed this from reading the route layout, not in the app.
_chat.tsx on main still scopes these handlers to the chat layout, so the bug is not fixed in the current nightly.
A possible fix is to move the new-thread command handling out of _chat.tsx to a level that is mounted wherever the sidebar is shown (for example AppSidebarLayout, next to the existing sidebar.toggle listener in SidebarControl). Another option is to hide the shortcut hints on routes where the commands are not handled.
Steps to reproduce
- Open the T3 Code desktop app with at least one project.
- Open the Usage view.
- Note the sidebar shows the new-thread shortcut hints (Shift+Cmd+N / Shift+Cmd+O).
- Press Shift+Cmd+N or Shift+Cmd+O: nothing happens.
- Click the new-thread button in the sidebar: it works.
- Click "Back" at the bottom of the sidebar, then press Shift+Cmd+N: a new thread is created.
Version
Desktop app 0.1.1, local server 0.1.1 (triage CLI 0.1.1)
Environment
macOS (Darwin 27.0.0, arm64), desktop app (T3 Code Beta) against a local server, Node v26.8.2
Evidence
apps/web/src/routes/_chat.tsx:34 function ChatRouteGlobalShortcuts() { ... } // only mounted by the _chat layout
apps/web/src/routes/_chat.tsx:101 if (command === "chat.newLocal") { ... }
apps/web/src/routes/_chat.tsx:124 if (command === "chat.new") { ... }
apps/web/src/routes/usage.tsx createFileRoute("/usage") // outside _chat, no new-thread handler
apps/web/src/components/Sidebar.tsx:4551 shortcutLabelForCommand(keybindings, "chat.new") ... // label shown on all routesRelated issues
#21357 (Ctrl+U cannot toggle between Usage and the previous page, closed) involves the Usage route and shortcuts but is a different command. #9656 and #10548 concern Cmd+Shift+N on chat routes, not routes outside _chat.
Fix applied or workaround
None applied. Workaround: click "Back" (or any thread) before using the shortcut, or click the sidebar button.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity