Skip to content

fix(ui): keep the connection badge live across pane switches - #40

Merged
devswha merged 1 commit into
mainfrom
fix/connection-badge-on-switch
Sep 25, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/connection-badge-on-switch

Conversation

@devswha

@devswha devswha commented Sep 25, 2026

Copy link
Copy Markdown
Owner

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:

  • selectTarget reset connected to false on every selection.
  • PaneTerminal is keyed by PC, so a pane on the same PC keeps the same, still-connected socket.
  • The terminal reports only changes of its own connected state (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

  • Browser, desktop: open a pane, then click another pane on the same PC.
    • Before: the header read "reconnecting" and stayed that way.
    • After: it stays "live".
  • bun run typecheck passes, bun test passes 312/312, and bun run test:ui passes 7/7.

🤖 Generated with Claude Code

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]>
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