Repository navigation
Conversation
…ting panel When the floating workspace panel has focus, Cmd+1/2 and Ctrl+1/2 were incorrectly switching tabs in the main workspace behind the panel. The main process intercepted these shortcuts and sent IPC to the renderer without checking floating panel focus state. Now the main process skips jumpToWorktreeIndex/jumpToTabIndex dispatch when the floating terminal input is focused, letting the renderer's capture-phase handler route them to the floating panel's own tab switching logic. Co-Authored-By: Claude <[email protected]>
…close Two fixes for the floating workspace shortcut handler: 1. Intercept workspace.selectByIndex (Cmd+1/2 on macOS, Ctrl+1/2 on Windows/Linux) in the floating panel's capture handler so it switches tabs within the floating workspace instead of being a no-op after the main process skip. 2. When the active terminal tab has split panes, defer Cmd+W to the terminal pane keyboard handler instead of unconditionally closing the entire tab. The pane handler correctly closes only the focused pane and falls back to closing the tab when the last pane is removed. Co-Authored-By: Claude <[email protected]>
693b0e8 to
41371ad
Compare
📝 WalkthroughWalkthroughUpdated shortcut routing for floating panels. Focus is mirrored to the main process and reset across panel, renderer, navigation, and window lifecycle events. Main-process interception now excludes worktree and tab index jumps while floating terminal input or the floating panel is focused, with tests covering Digit1 variants. Floating-panel handling defers tab closure for focused split terminal panes and remaps workspace digit shortcuts to matching visible floating tabs. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6dcf9f4d-0ccd-40d3-b285-b4da4c64cd1a
📥 Commits
Reviewing files that changed from the base of the PR and between 381e81e and 693b0e86c47721ac4451c213820ef68db7a8b5e1.
📒 Files selected for processing (2)
src/main/window/createMainWindow.tssrc/renderer/src/components/floating-terminal/FloatingTerminalPanel.tsx
… focused Add a regression test that confirms jumpToWorktreeIndex and jumpToTabIndex IPC are not dispatched when the floating terminal input is focused, ensuring tab/workspace switch shortcuts route to the floating panel's renderer handler instead. Co-Authored-By: Claude <[email protected]>
…panel The previous fix only skipped main-process interception when the floating terminal xterm input was focused. When the tab bar or panel chrome held focus, floatingTerminalInputFocused remained false, so Cmd+1/Ctrl+1 were still intercepted and routed to the main workspace. Add a separate floatingPanelFocused IPC mirror that tracks focus anywhere inside the floating panel container. The main process now skips jumpToWorktreeIndex/jumpToTabIndex dispatch when either flag is set. Co-Authored-By: Claude <[email protected]>
Summary
What Changed
Main process (
createMainWindow.ts): SkipjumpToWorktreeIndex/jumpToTabIndexdispatch when the floating terminal input is focused, allowing the renderer's capture-phase handler to route them correctly.Floating panel (
FloatingTerminalPanel.tsx):workspace.selectByIndexin the capture handler to switch floating tabs.tab.closeto the terminal pane keyboard handler when the active terminal has split panes, so only the focused pane is closed.Test Plan
pnpm typecheckpassespnpm lintpassesPlatform Notes
The bug and fix apply equally to all platforms — only the key combinations differ (Cmd on macOS, Ctrl on Windows/Linux). No platform-specific code paths were introduced.
No visual changes.
AI Code Review Summary
terminalLayoutsByTabId) on Cmd+W in a focused floating terminal.🐦 @feelgom
🤖 Generated with Claude Code