Repository navigation
fix(terminal): keep side panels bound after splitting into an empty group - #381
Merged
GOODBOY008 merged 3 commits intoDec 2, 2026
Merged
Conversation
…roup SPLIT_GROUP activates a new group with no tabs, which made activeConnection null and blanked the file browser and monitor panels. Fall back to the last tab that owned a real connection, resolved against live state so its status stays current. Dashboard and local-shell tabs are not tracked. Fixes GOODBOY008#375
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
Fixes #375. Splitting the terminal activates a brand-new group with no tabs (
SPLIT_GROUP), which madeactiveConnectionnulland left the file browser / monitor panels blank until the user opened a tab in the new pane.TerminalGroupProvidernow keeps the id of the last tab that owned a real connection and uses it as theactiveConnectionfallback when the active group is empty. The fallback is resolved against live state, so its status/host/name stay current. Dashboard and local-shell tabs are not tracked, and an actually closed tab yields no fallback.Test plan
npx tsc --noEmit— passes.npx eslint src/lib/terminal-group-context.tsx— 0 errors (only pre-existing type/fast-refresh warnings).npx vitest run src/__tests__/terminal-group-context.property.test.ts src/__tests__/terminal-group-reducer.test.ts— 70 passed.