Skip to content

fix: preview close — layout-aware split collapse + focus restore - #65

Merged
aterrylu merged 1 commit into
mainfrom
terry/fix-close-preview
Mar 25, 2026
Merged

fix: preview close — layout-aware split collapse + focus restore#65
aterrylu merged 1 commit into
mainfrom
terry/fix-close-preview

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

closePreview now removes the preview leaf from the layout (split pane case) or falls back to last session (dedicated tab case). Previously left ghost leaves in the layout tree.

closePreview now handles two cases properly:

1. Split pane: removes the preview's leaf from the layout tree.
   Sibling pane expands to fill the space. Group state synced.

2. Dedicated tab (single leaf): switches to the last active session
   instead of always picking sessions[0].

Previously closePreview only removed from previewPanes/paneOrder
arrays but never touched the layout tree, leaving ghost leaves.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aterrylu
aterrylu merged commit 98476bf into main Mar 25, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/fix-close-preview branch March 25, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant