Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The sidebar stops intercepting Ctrl shortcuts while a terminal is focused, allowing tmux's Ctrl+B prefix through. The change is confined to keyboard routing; Cmd shortcuts and menu actions remain available. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
3a37691 to
e457a7a
Compare
|
Note Written by Verified in a real dev environmentverified unchanged head created the same real git project through the app on both
main after ctrl+b then c: pr after the same keys: Not verifiednative electron, macos cmd+b, windows ctrl+b, ios/android, remote/relay/tunnel connections, custom keybinding configurations, and other provider runtimes were not exercised on this linux vm. the existing macos shortcut assertion passed in the focused suite. |
The sidebar toggle listens for mod+b in the capture phase and ignored terminal focus, so on Linux and Windows it swallowed Ctrl+B before the terminal saw it. tmux with its default prefix was unusable. The toggle now skips Ctrl chords while a terminal has focus. Cmd never reaches the terminal, so Cmd+B still toggles the sidebar from a focused terminal on macOS. Written by Claude Opus 5.5 in T3 Code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…debar toggle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e457a7a to
9a5a2b1
Compare
|
Note 🤖 Claude Opus 5.5 replying on behalf of Timo @maria-rcks thanks for verifying The rebase picked up #29612, which touched the same sidebar listener. It now passes Verified on the new head
|


Problem
On Linux and Windows, pressing Ctrl+B in a focused terminal toggles the sidebar and never reaches the shell, so tmux with its default prefix is unusable. The sidebar toggle (
mod+b) is handled by a capture-phase window listener inAppSidebarLayout.tsx. Since #29612 that listener passesterminalFocus, which helps only users who addwhen: "!terminalFocus"to the binding themselves. The defaultmod+bhas nowhen, so the listener still claims Ctrl+B before xterm sees it.Reproduce: open a terminal, run
tmux, press Ctrl+B thenc. The sidebar toggles and no tmux window is created.Change
The listener keeps the focus and panel context from #29612 and now goes through a new
isSidebarToggleShortcuthelper next to the existingis*Shortcuthelpers inkeybindings.ts. The helper skips Ctrl chords while a terminal has focus. Cmd never reaches the terminal, so on macOS Cmd+B still toggles the sidebar from a focused terminal, the same as today. The user keybinding docs gain one sentence about this.I did not add
when: "!terminalFocus"to the defaultmod+bbinding, which is the pattern many other defaults use. On macOS it would turn off Cmd+B in the terminal, which is a working shortcut that does not conflict with anything there.Scope and approval
This is a small fix for an obvious bug, so there is no prior issue. A default binding blocks a standard terminal control character on two of three platforms. Most other app-level defaults in
packages/shared/src/keybindings.tsalready keep out of the focused terminal, andsidebar.togglewas the gap. It is one problem in one listener. The desktop menu action and the shortcuts forwarded from browser previews are untouched, and macOS behavior is unchanged.Reversible: yes
Blast radius: The sidebar toggle shortcut in the web and desktop clients. Mobile does not use this listener.
Before / after
Linux, web client: run
cat -vin the focused terminal, then press Ctrl+B. On main the sidebar collapses and the shell receives nothing. With the fix the sidebar stays open and the shell echoes^B. The key and caption overlays were added for the recording and are not part of the UI.tmux_before.webm
tmux_after.webm
Verification
vp run scenarios:provefails on basea8ccf14d06and passes on head. The scenario opens the terminal drawer, runsread -r key | od -c, and presses Ctrl+B. On base the sidebar collapses (expected "collapsed" to be "expanded") and the shell gets nothing. On head the sidebar stays open and the shell receives^B(002).vp test run apps/web/src/keybindings.test.ts: the new case "leaves Ctrl+B to a focused terminal" fails against main's logic (expected true to be false) and passes with the fix. The macOS Cmd+B case passes before and after.vp run check:changed: all checks pass.Scenario used for the proof (not part of this PR)
Written by Claude Opus 5.5 in T3 Code.