Repository navigation
fix: stop two windows taking one terminal session from each other - #87
Merged
LukeGus merged 1 commit intoNov 16, 2026
Merged
Conversation
|
AI review | Looks safe to merge The PR fixes a reconnection loop where multiple browser tabs fighting for the same terminal session would continuously steal it from each other. The change stops the displaced tab from auto-reconnecting, shows a clear error message, and closes the socket, which is safe and correctly addresses the reported bug. Reviewed 10d51b1. AI can be wrong, a maintainer still decides. Comment |
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.
Fixes Termix-SSH/Termix#1850
Open tabs sync across devices, so a second browser opens the same terminal tab with the same
tabInstanceId. The server hands the live session to the newest socket and sendssessionTakenOverto the old one. The old window then calledconnectToHostright away and took the session back, the other window did the same, and the two kept taking it from each other.A window that gets
sessionTakenOvernow stops there. It shows "This session was opened in another window or tab." with the usual Retry button, doesn't reconnect on its own, and closes its socket so it can no longer write into a session another window owns. Retry takes the session back on purpose. The server already keeps the session when that old socket closes, because another owner is attached.This doesn't show one session in both windows at once, which is what the reporter expected. That needs a decision on shared size and input, so it's left for later.
Test:
tests/frontend/terminal/session-taken-over.test.tsruns the message branch and checks it doesn't reconnect. It fails without the change.