Move live terminals between tabs and splits without restarting them
What problem does this solve?
Once a terminal is open in its own tab, there is no way to bring it next to another terminal without losing it. The only way to get a split is Mod+D, which spawns a brand new shell. If a dev server, a REPL, an SSH session or a long build is already running in tab B, I cannot put it beside tab A: I have to kill it and start again inside A's split.
The reverse is also missing: a pane inside a split can only be closed, never pulled back out to its own tab.
A smaller related papercut: a split tab's label only shows the active pane's name, so the label flips as focus moves ("azeroth" / "CasaFina-CRM") and split tabs are hard to tell apart at a glance.
Proposed solution
Keep the live session. Nothing is respawned, the PTY, scrollback and running process survive the move.
- Move to split: right click a terminal tab > "Move to split..." > pick a compatible destination tab > Left / Right / Top / Bottom. The source tab disappears and its pane joins the destination's split.
- Move pane to new tab: from the command palette ("Move pane to new tab", acts on the active pane) or from a split tab's context menu (pick which pane). The pane becomes its own tab right after the source.
- Split tab labels: when a terminal tab has 2+ panes and no custom title, the label lists every pane in tree order (
azeroth | CasaFina-CRM), active pane emphasized, others muted, full text in the tooltip. Custom titles still win.
MVP constraints: source tab must be a single pane; source and destination must be terminal tabs in the same space with matching blocks and private; combined panes capped by MAX_PANES_PER_TAB. No drag and drop yet.
Implementation note: sessions are keyed by leaf id, and the App-level effect disposes any leaf missing from every pane tree. Each move therefore removes and re-inserts the same leaf node inside a single setTabs update, so the leaf never leaves the live set and no close/dispose path runs.
Alternatives considered
- Re-creating the shell in the destination split: loses running processes and scrollback.
- tmux inside Terax: works, but duplicates what Terax splits already do natively.
- Prior art: tmux
join-pane/break-pane, and WezTerm'smove-pane-to-new-tab.
Are you willing to contribute the implementation?
Yes, I can do it. A draft implementation with tests is ready and will be linked as a draft PR for discussion.
Before submitting
- I searched existing issues and didn't find a duplicate
Source: crynta/terax-ai