Skip to content

fix(client): preserve tab content across split panes - #2760

Merged
openai0229 merged 1 commit into
mainfrom
fix/workspace-split-pane-lifecycle
Aug 25, 2026
Merged

openai0229 merged 1 commit into
mainfrom
fix/workspace-split-pane-lifecycle

Conversation

@openai0229

Copy link
Copy Markdown
Contributor

Summary

  • mount workspace tab bodies once in a stable content layer keyed by tab ID
  • keep the recursive SplitPane tree responsible only for tab headers and measurable pane slots
  • position active tab bodies over their pane slots and synchronize geometry with ResizeObserver during split, collapse, and resize operations
  • preserve editor, result-view, and terminal component instances when tabs move between panes
  • keep copy-split semantics independent: only the new copy mounts while the source tab remains untouched
  • add focused tests for pane geometry and active tab-to-pane placement

Root cause

Workspace tab bodies were rendered inside each pane-specific Tabs component. Creating or collapsing a SplitPane changed their React parent hierarchy, which unmounted and remounted editors, query results, and terminals even when the tab IDs did not change. Batching the store update prevented an intermediate state but could not preserve component instances.

Validation

  • yarn test:workspace-split-lifecycle
  • yarn test:workspace-tab-drag
  • yarn test:terminal
  • yarn test:editor-close
  • yarn test:community-boundary
  • targeted ESLint and Stylelint
  • git diff --check
  • Community JCEF Webpack compilation and manual split/move/copy verification

Out of scope

The existing visual header flash when the last tab closes and a pane collapses is intentionally unchanged.

@openai0229
openai0229 requested a review from a team as a code owner August 25, 2026 06:53
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 25, 2026
@openai0229
openai0229 force-pushed the fix/workspace-split-pane-lifecycle branch from 93fc852 to 2ec8c08 Compare August 25, 2026 08:07
@openai0229
openai0229 merged commit 8381835 into main Aug 25, 2026
14 checks passed
@openai0229
openai0229 deleted the fix/workspace-split-pane-lifecycle branch August 25, 2026 08:15
@openai0229 openai0229 moved this from In Review to Done in Chat2DB Community Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant