Repository navigation
fix(game): rematch focus, named position bar, still first load - #308
Merged
Merged
Conversation
- "Position: even" or "Position: Black ahead by 1.2", built from the score in the bar components, one rounding for the name and the drawn figure - drop the Level tooltip and the unused eval_level and eval_advantage keys in all 13 locales - unit test for the formatter, e2e for the phone bar and the desktop column
- the board resets its keyboard cursor to the centre on a rematch, and the live region stays empty until a key moves the cursor, so the last game cell is not read out - the offline page focuses the board once the new game is playable, and the Game over sheet hands focus to it instead of the removed button - raise the home preload budget by the 171 bytes this adds
- the canvas is out of flow until its first draw, so the 300x150 default box no longer jumps to the board when the script runs - e2e: no layout shift above 0.01 on a cold load at 1280x800
arrzdev
commented
Nov 9, 2026
arrzdev
left a comment
Owner
Author
There was a problem hiding this comment.
Approve. The bar figure and its name come from one tested rounding rule. Rematch focus is covered on both the sheet path and the Escape path, and the cold-load shift spec measures layout-shift entries directly. Green on top of main (the #307 axe checks included) and in the WebKit run.
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 and why
Three small accessibility and stability fixes on the offline game, found in an audit of keyboard, screen reader and desktop paths. Nothing looks different.
eval_levelandeval_advantagestrings are replaced in all 13 locales./offlineon desktop. The unpainted canvas is a 300x150 box that jumped to the board when the script ran (0.117 at 1280x800 in Chromium). It is now out of flow until its first draw.The home preload budget goes up by 293 bytes for the board's new keyboard reset and its separate live region.
How to verify
pnpm exec playwright test e2e/rematch-focus.spec.ts e2e/position-bar.spec.ts e2e/offline-load-shift.spec.ts e2e/phone-play-a11y.spec.ts e2e/offline-first-paint.spec.tspnpm --filter @repo/game exec vitest run src/utils/evaluation.test.tsUI quality gate
layout-shiftentries directly, since the helpers measure boxes after an action, not a page load)