Repository navigation
Lobby: typing a room code no longer reconnects or fills browser history - #68
Merged
Merged
Conversation
The socket, the address bar and the tab title followed the lobby's Room Code box, so every letter typed closed and reopened the server connection and changed the URL and title, which Chrome records as a history entry per letter (#t, #tu, #tur...). No room was joined or created: the lobby socket never sends join-room. They now follow the room you're in (liveRoomId), which only moves when you join or switch rooms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Room Code box starts with "main" at /, so typing landed in front of it
("typed-…main"). Clear it first, as a person would.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Before: typing a room code on the welcome screen updated the address bar and tab title on every letter. Chrome records each change as a history entry (
#t,#tu,#tur…#turkeyday). Each letter also closed and reopened the connection to the server.After: while you type, the address, title and connection stay put. They move to the room only when you join, or when you switch rooms from inside one.
No room was joined or created per letter. The lobby's connection never sends
join-room, so the server only saw a stream of empty connections.How: the socket, URL and title used to follow
effectiveRoomId, which is the Room Code box. They now follow a newliveRoomIdinsrc/App.tsx. It copieseffectiveRoomIdonly while you're joined, so it changes on join or on a room switch, never while you type in the lobby. Joining a room other than the one the socket is on reconnects and joins on connect, the same path a room switch already used.Test:
e2e/classroom.spec.tstypes a room code letter by letter in the lobby. It checks that the URL and title don't change and that no new socket.io connection is made, then that joining moves both to the room. Lint, the 300 unit tests and the server import check pass locally.Generated by Claude Code