fix(remote): the rooms browser asks your name before seating you - #16
Open
sevensrig wants to merge 4 commits into
Open
fix(remote): the rooms browser asks your name before seating you#16sevensrig wants to merge 4 commits into
sevensrig wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What was wrong
Joining from the rooms browser had a name field, but it was on the previous page. You'd land on
/online, head straight for "browse open rooms", pick a room — and only find out you were "Player 2" once the draft had already started, with nothing anywhere to edit it.Digging into it, the "it technically works if you fill the field first" path didn't actually work either.
rememberNameonly ran insidecreate()andjoin(), so typing a name on/onlineand then pressing "browse open rooms" arrived at the room list with nothing saved — the one path the saved name exists for. Every rooms-browser join was anonymous, filled-in field or not.The fix
The invite-link flow already solved this properly, so the prompt became a shared component —
NamePrompt.svelte— and both nameless ways into a room now run it:FOODS · $20 · 3 SLOTS). A remembered name still joins in one tap and is never asked again.Nothing is claimed on the server until the form is submitted, so losing the race for the last seat lands back on the prompt with the name still typed rather than at a dead end.
Two deliberate calls worth flagging:
rememberNamenow fires on the browse control on the way out of/online, which is what makes the one-tap path real.Riding along
BROWSE OPEN ROOMS. As a text link under the code field it read as fine print rather than the second real way into a game. It's yellow.app.csscarried rules like "Green, and never red: red reads as stop or delete" and "yellow is Player 2's identity" as comments on the tokens. Those were blocking ordinary styling choices, so the prescriptive parts are removed — the tokens themselves (--p1,--p2,--money) are wired up exactly as before, just no longer described as reservations. The accessibility rule stays: an accent has to carry black text at 4.5:1.mainmerged in cleanly, no conflicts.Verified
npm run checkgreen on the merged state — 0 typecheck errors,deno checkclean on the Edge Functions, lint and format clean, 204 tests: 124 unit, 46 component, 34 E2E.New coverage:
NamePrompt— submit gating on empty and whitespace names, the busy state, the name surviving a refused join, and an axe scan. This is the first/onlinescreen with component-level coverage; the rest of remote play needs two live devices and a server, but an isolated form doesn't.remote.spec.ts— a nameless rooms-browser join (asserting the host's lobby is untouched until submit, plus an axe scan of the new screen) and the remembered-name one-tap path. Both assert both boards read "Alex" and that "Player 2" appears zero times.Docker was up for the run, so the remote specs genuinely executed rather than skipping. Room creation is now eight rooms per suite run, still inside the 20/minute limit.
Fixes #12
🤖 Generated with Claude Code