Repository navigation
perf: /play shows its dialog at first paint, and the game as soon as you choose - #329
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 2, 2026
/play showed nothing until the app had loaded, the router was ready and the dialog's code (a dynamic import in ModalContext) had arrived: ~2.3 s on the emulated phone. /play now renders the dialog itself, on the server too, without the fade and slide it has when opened from a button (ModalContainer's animateIn), and closes it through its new onClose. Until the app has started the dialog ignores taps (pointer-events), since a choice made before then would show but not be used. A static page reads its URL only once the router is ready, so a URL with a query (a challenge, a position to continue from) hides the server's default dialog until the dialog with its settings replaces it, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After choosing a side, /play/maia showed nothing while play/start_game created the game (~0.6 s on the backend). It now shows the game at once, its board at the starting position, with moves and logging waiting for the game's id (usePlayController, useVsMaiaController); Maia's moves already did. A new game (Play again) gets a new PlayMaia (gameKey) instead of PlayControllerContext's key on the id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/play/maia asked the backend for a game only once it had loaded and rendered: with the game now drawn at once, on the emulated phone that rendering pushed the request back and the board took moves ~0.35 s later than before. The setup dialog now sends start_game as the visitor chooses (startGameEarly), and /play/maia takes that request if its settings match (takeEarlyGame), or starts its own; if the early one fails it tries once more before /401. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashtonanderson
force-pushed
the
claude/perf-round-6
branch
from
November 3, 2026 06:22
bcf27da to
26f66d5
Compare
ashtonanderson
force-pushed
the
claude/perf-round-7
branch
from
November 3, 2026 06:22
9781b24 to
eeefeca
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Seventh round: /play shows its setup dialog at first paint, and a game appears the moment you choose a side. Stacked on #328 (
claude/perf-round-6); this PR's base is that branch. Details are inLOADING.md("Round 7").Changes
ModalContext) had arrived. Now /play renders the dialog itself, on the server too.ModalContainer'sanimateIn).pointer-events). A choice made before then would show on screen but not be used.play/start_gamecreated the game (~0.6 s on the backend).usePlayController,useVsMaiaController). Maia's moves already did, and the clocks start with the first move, as before.PlayMaia(gameKey) instead ofPlayControllerContext's key on the id.start_gameis sent as you choose (f3d1b7a).start_gameas you choose (startGameEarly), and /play/maia takes that request if its settings match (takeEarlyGame), or starts its own.Results (round 6 → this branch)
play_flow.mjsopens /play, chooses "Play as white" as soon as the dialog takes taps, and waits for the game. The phone is Chrome's 4x CPU throttling with 4G. 5 runs each, builds alternating.Testing
npm test(89, with main's),npx tsc --noEmitandnpm run lintpass, rebased on main after Capture PostHog web vitals again #330 and Track what visitors do, and stop losing events #332.modalTitleandforcedColorshows nothing until the app has read it, then its own title.start_gamecalls, on this branch as on round 6.Not done
/play/hb) still waits for its game as before.🤖 Generated with Claude Code