Repository navigation
Conversation
…e-pane-to-new-tab # Conflicts: # src/renderer/src/components/terminal-pane/TerminalContextMenu.test.tsx
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (19)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds a “Move Pane to New Tab” action to terminal and native-chat context menus. The action resolves a slot after the source tab and detaches the selected pane there. The change adds translations and unit tests for the menu and slot resolver. An end-to-end test checks tab placement, activation, pane count, and continued PTY output. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The move-to-new-tab change is mergeable after normal checks; the reported tab-placement concern does not affect a supported workflow. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 13 files. (6 skipped: 6 unsupported.)
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 |



ELI5
When a terminal tab is split into several panes, you can now right-click a pane and choose Move Pane to New Tab. That pane becomes its own tab, and whatever was running in it keeps running.
What Changed
Before: the only way to turn a split pane into its own tab was to drag a small
···handle at the top edge of the pane onto the tab bar. Most people never find that handle.After: the pane right-click menu has Move Pane to New Tab, directly under Expand Pane. It shows only when the tab has more than one pane. The menu in chat view has the same item.
Mechanism: the menu action calls the existing
detachTerminalPaneToTab, the same function the drag-and-drop uses. Both paths now go through one shared helper inuse-terminal-pane-close-actions.ts. The only new logic isresolveTerminalPaneDetachSlotAfterSource, which finds the source tab's group and the slot directly after it.Why
Dragging a pane out to a new tab was already supported but hard to find. A menu item sits next to related actions (split, expand, close), so you can find it there and it works with keyboard navigation of the menu. Reusing the detach code means the menu path behaves exactly like the drag: the process keeps running, PTY ownership moves to the new tab, and SSH panes need no special handling. The new tab goes right after the source tab, not at the end of the strip, so it stays close to the tab it came from. No keyboard shortcut was added.
Linked Issue
No existing issue. I searched for one and found only #4623 (detachable panes into separate windows), which is a different feature.
Visual Proof
Before/after screenshots of the right-click menu and the resulting new tab are in this comment. Outside contributors can't attach files to the PR description.
Testing
New Playwright test
tests/e2e/terminal-pane-move-to-new-tab.spec.ts: it splits a terminal, right-clicks the active pane, and chooses Move Pane to New Tab. It then checks that the source tab has one pane left, the new tab sits directly after the source tab and is active, and the new tab holds the moved pane's original PTY. Last, it echoes a marker through that PTY to show the process is still alive. It passed on macOS in a hidden window.Unit tests:
nullwhen the group can't be found.pnpm tc:webandpnpm run check:code-quality:changedpass.Tested on macOS only.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Pi using
claude-opus-5.5(via GitHub Copilot), with human direction and review.Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)