feat(desktop): add Ctrl+Tab / Ctrl+Shift+Tab to cycle tabs — no tab-switching shortcut exists
Summary
There is no keyboard shortcut to switch between tabs. Ctrl+Tab / Ctrl+Shift+Tab — the
near-universal convention — do nothing, and no alternative binding exists. Switching tabs
requires the mouse.
Current state
frontend/src/shared/shortcuts.ts is the shortcuts registry that powers the Keyboard Shortcuts
settings modal. AppShortcutId (line 21) and APP_SHORTCUTS (48-110) enumerate every command:
new-session, new-shell-terminal, close-shell-terminal, keyboard-shortcuts,
command-palette, open-settings, toggle-sidebar, open-project, previous-session,
next-session, toggle-inspector, focus-terminal
No next-tab / previous-tab id exists. Nothing is broken or being swallowed — there is
simply nothing registered to hit.
Two existing bindings look related but are not:
previous-session/next-session(⌥⌘↑ / ⌥⌘↓ on macOS, Ctrl+PageUp / Ctrl+PageDown elsewhere —shortcuts.ts:144-147) route between sessions in the sidebar (frontend/src/renderer/routes/_shell.tsx:196-218), and return early when there is no scoped project. They do not cycle the tab strip.Cmd+1..9(shortcuts.ts:137) selects projects, not tabs.
The tab strips themselves are at frontend/src/renderer/components/CenterPane.tsx:217-245
(session pane: one permanent SessionPaneTab plus one ShellTerminalTab per shell) and
frontend/src/renderer/components/ShellTerminalsView.tsx:87-108 (standalone terminals).
The only keyboard path into the tab strip today is roving focus, and only while a tab button
already has DOM focus — frontend/src/renderer/lib/terminal-tabs.ts:7-9:
if (!(event.target instanceof HTMLElement) || event.target.getAttribute("role") !== "tab") return;
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
In normal use the terminal has focus, so arrow keys go to the shell and there is no keyboard route to the tabs at all.
Request
Add next-tab / previous-tab to APP_SHORTCUTS, defaulting to Ctrl+Tab / Ctrl+Shift+Tab,
cycling the active tab strip.
Two implementation notes that should make this straightforward
- Terminal focus is not an obstacle. Shortcuts are matched in the main process via
before-input-event(frontend/src/main/app-shortcuts.ts:69-103) and dispatched over IPC (channels atapp-shortcuts.ts:44-53). That runs before the renderer, so the binding fires even while xterm has focus. This matters becauseattachCustomKeyEventHandler(frontend/src/renderer/components/XtermTerminal.tsx:489-538) returnstruefor Tab — xterm would otherwise consume it and write\tto the PTY. Ctrl+Tabis already a legal binding.shortcutBindingValidationError(shortcuts.ts:191-224) does not reject it, so no validator changes are needed.
Renderer-side handlers for existing shortcuts live at _shell.tsx:515-532 and :592-599 and
are the natural place to add the tab-cycling handler.
Environment
- macOS (darwin 23.6.0), AO desktop app
- Repo at
3934bc86a
Hi! I'm interested in working on this issue. Could you please assign it to me? Thanks!
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @somewherelostt here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
Closing as already implemented by merged PR #3658 (merge commit 24185b150). Current main retains both configurable shortcuts in the registry, Electron dispatch, and preload bridge, with wraparound handlers for session tabs, standalone shell tabs, and ChatWorkspace tabs. The current full frontend suite is green, including the tab-cycling coverage. No work described by this issue remains.