Repository navigation
fix(ui): keep the connection badge live across pane switches - #40
Merged
Merged
Conversation
selectTarget reset `connected` on every selection. The terminal is keyed by PC, so a pane on the same PC keeps its connected socket, and the terminal reports only changes of its own state: it never reported again, and the header said "reconnecting" after every pane switch until the socket really dropped and came back. The reset now happens only when the PC changes, which mounts a new terminal that reports for itself. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Sep 25, 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
After you picked another pane on the same PC, the header's connection badge said reconnecting. It stayed that way until the socket actually dropped and came back. I found this while recording the README demo.
Cause:
selectTargetresetconnectedto false on every selection.PaneTerminalis keyed by PC, so a pane on the same PC keeps the same, still-connected socket.connectedstate (useEffect([connected])), so it never reported again.This dates back to the remote PCs change (1007c30).
Fix: reset the badge only when the PC changes. That mounts a new terminal, which reports its own state.
Testing
bun run typecheckpasses,bun testpasses 312/312, andbun run test:uipasses 7/7.🤖 Generated with Claude Code