Skip to content

Lobby: typing a room code no longer reconnects or fills browser history - #68

Merged
BPMData merged 2 commits into
mainfrom
claude/project-thread-380vka
Nov 24, 2026
Merged

BPMData merged 2 commits into
mainfrom
claude/project-thread-380vka

Conversation

@BPMData

@BPMData BPMData commented Nov 24, 2026

Copy link
Copy Markdown
Owner

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 new liveRoomId in src/App.tsx. It copies effectiveRoomId only 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.ts types 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

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>
@BPMData
BPMData merged commit de55f67 into main Nov 24, 2026
2 checks passed
@BPMData
BPMData deleted the claude/project-thread-380vka branch November 24, 2026 18:16
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.

2 participants