Repository navigation
Split-screen tab groups with canonical group/item model - #520
Merged
Merged
Conversation
…ile fix - Capture per-leaf PTY IDs in layout snapshots so multi-pane terminals re-attach each pane to its own shell instead of all panes racing onto the single tab-level ptyId. - Three-priority reattach strategy: snapshot PTY (verified live) > eager buffer handle (startup reconnect) > tab-level fallback. - Promote first surviving tab as activeTabId when transient tabs are dropped during hydration, preventing blank restored groups. - Prefer non-empty groups when selecting the active group after restore. - Guard unmount cleanup to only preserve PTYs when the terminal tab still exists in store, preventing leaked backend shells. - Fix onPinFile in TabGroupPanel to use the unified tab UUID (second parameter) instead of the file path, which was silently no-oping. - Extract shared helpers to tabs-helpers.ts and add test coverage.
The handleRestartCodexPane callback was missing effectiveVisibleRef and restoredPtyIdByPaneId after those fields were added to PtyConnectionDeps.
The tab-level ptyId fallback in connectPanePty had no guard against multi-pane scenarios. When a user split a pane, the new pane reattached to the original pane's PTY instead of spawning a fresh shell, replacing the original pane's data handler in the singleton dispatcher. Add a pane count check so the fallback only fires for single-pane tabs.
brennanb2025
force-pushed
the
brennanb2025/splitscreen-md-terminal
branch
from
April 12, 2026 07:56
8c32d95 to
556a28a
Compare
heyramzi
added a commit
to heyramzi/orca
that referenced
this pull request
Apr 12, 2026
The split-screen tab groups PR (stablyai#520) changed Terminal.tsx to render TabGroupSplitLayout only for the active worktree. When switching worktrees, React unmounts the previous TabGroupPanel and all its TerminalPane children, triggering the useEffect cleanup that destroys PaneManagers, PTY transports, and kills terminal processes. This made every worktree switch kill running Claude Code / Codex sessions. Render TabGroupSplitLayout for ALL mounted worktrees and toggle visibility with CSS (hidden class) instead of conditional rendering. This matches the pattern the old rendering path used before stablyai#520, where all worktrees were always mounted with absolute positioning and display toggling. Terminal components stay in the React tree across worktree switches, preserving PTY connections and scrollback. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
5 tasks
This was referenced Apr 12, 2026
brennanb2025
added a commit
that referenced
this pull request
Apr 12, 2026
This reverts commit 839d871.
2 tasks
brennanb2025
added a commit
that referenced
this pull request
Apr 12, 2026
Reapplies the fixes from #542 which were reverted in #546 as part of the #520 revert chain. - Replace single-value initialTabCreationGuardRef with a Set so closing the last tab no longer auto-spawns a replacement terminal - Upgrade all stopPropagation to stopImmediatePropagation as defense-in-depth against duplicate window-level keydown handlers The focusedGroupId change from #542 is omitted because it targeted TabGroupSplitLayout from #520, which remains reverted. The current code already gates isActive on isVisible, providing the same protection.
4 tasks done
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-lands split-screen tab groups (originally PR #393, reverted in PR #403) with a fundamentally revised architecture. The previous attempt overlaid groups on top of multiple competing tab authorities (terminal, editor, browser slices), requiring constant cross-slice synchronization that broke tab switching. This implementation uses a canonical group/item model where
TabsSliceowns tab membership, order, and per-group activation, while domain slices retain only content/runtime state.What's included
Core tab group architecture
TabGroupPanelandTabGroupSplitLayoutcomponents for rendering split groupsTabGroupLayoutNodetree for split layout with split/focus/close/move actionsTerminal split-group support
TerminalSliceEditor split-group support
Browser split-group support
Hydration fixes
tabs-helpers.tsBug fixes
onPinFileinTabGroupPanelto use unified tab UUID instead of file path (was silently no-oping)tab-group-layout-ops.ts,tabs-bulk-actions.ts,tabs-split-actions.ts) from the reverted PR fix: prevent terminal reset when splitting tab groups #393Test plan
pnpm testpasses for tabs, tabs-hydration, tabs-helpers, and editor test suites