Fixed all seven playtest defects: nothing now sits under the status… #17
Loading…
Reference in a new issue
No description provided.
Delete branch "osf/189-ux-and-visual-review-21-tasks-from"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was done
How to review
git checkout osf/189-ux-and-visual-review-21-tasks-from && npm install.npm test— all Vitest lanes (shared rules, server, client) should pass.npx playwright test --config packages/client/e2e/playwright.config.ts— it builds the client, starts a seeded zero-delay server, and drives a full game through the app's test surface; it should pass (installs its browser on first run if needed).SCRATCH_SEED=7 npm run dev, open http://127.0.0.1:3000, create a game, fill the seats with bots, and start — you should see the bid chips, the labelled trump badge, the trick caption before each sweep, and the round-end panel holding the next deal.packages/client/src/components/Table.tsxandpackages/client/src/styles.css— the stable table geometry, the round-end panel, and the seat layout live there.Code review
Reviewed the run's code against the four delta specs (game-bots, game-lobby, game-pwa, game-table) and the base game-rules spec. Fixed four bugs: the end screen counted over-bid rounds as hits (the game scratches on over-bid as well as under-bid), a reload/reconnect in the game-over state left the player stuck on the table because the final round summary never opened, the service worker's precache omitted the manifest's icon.svg, and a non-creator saw 'Accept rematch' before the creator offered because bots auto-accept at game-over. Verified the two scenarios left untested on purpose (drag-to-table, vibrate) hold against the code, and that no generated artifacts are committed. All 254 tests and the typecheck pass.
Fixed before the commit
packages/client/src/components/EndScreen.tsx:42: roundStatsFor counted a bid as 'hit' when tricks won >= bid, but the game scratches on over-bid as well as under-bid (game-rules/Round scoring), so an over-bid round was shown as a hit and extended the best run. Fixed to won === bid and added an over-bid round to the per-player colour-line test.packages/client/src/components/Table.tsx:602: On reload or reconnect in the game-over state the final round summary never opened: the state-diff effect needs a previous view and the event batch is null on rejoin, so App held the winner screen back forever and the player was stuck on the table. Added a mount-time effect that opens the final summary when the view is game-over with history.packages/client/public/sw.js:25: The service worker's SHELL precache list omitted /icons/icon.svg, which the manifest lists as an icon; the spec requires the precache to include every manifest icon. Added it and extended the precache test to assert every manifest icon src is in SHELL.packages/client/src/components/EndScreen.tsx:112: offerExists was room.rematchAccepted.length > 0, but the server auto-accepts every bot at game-over, so in any room with a bot a non-creator saw 'Accept rematch' before the creator offered, violating game-table/Rematch label. Fixed to check the creator's id (added creatorId to RoomView and set it in the server's roomView) and added a bot-auto-accept regression test.Tests
94 of 115 scenarios of
ux-and-visual-review-21-tasks-from-deskt-4qt8qyhave a tagged test. No test carries thespec:tag of these:game-bots/A full table of bots plays to completiongame-bots/A game with one bot plays to completiongame-bots/All players see the same pacinggame-bots/Disconnected humans keep the safe fallbackgame-table/Consistent card designgame-table/Deal animationgame-table/Dealer forbidden bid showngame-table/No card clipped at the bottomgame-table/Play and trick sweepgame-table/Rematch offeredgame-table/Scratch effectgame-table/Sole winner shownLeft untested on purpose:
game-table/Drag to table plays: The drop handler maps dnd-kit's drop event (over = the table's centre zone) to the same onPlay the play-button and tap tests already exercise (they assert the card is played); its only logic is 'drop on the table zone + legal card -> onPlay', a direct mapping of the drop event, so a dedicated test would restate it, and the drag detection itself is dnd-kit's behaviour.game-table/Vibrate where supported: navigator.vibrate is a device haptic side effect; asserting that it fires would require a mock-only assertion (banned), and the guard ('vibrate' in navigator) is a trivial environment check. On a device without vibrate the pulse is the fallback cue, and that is covered by the game-table/Pulse on turn test.The test lint found, in the run's tests on the last check:
Recorded, not decided
packages/client/src/pwa.test.ts:108B11 indeclares viewport-fit=cover in the viewport meta: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/pwa.test.ts:131B11 inrequests a black-translucent status bar for standalone: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/pwa.test.ts:174B11 insizes the app to the dynamic viewport height with a 100vh fallback: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/styles.test.ts:81B11 inuses the full screen width and wraps to two rows only if a single row cannot: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/styles.test.ts:101B11 inopens a larger gap between suits than within a suit: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/styles.test.ts:125B11 instyles the bottom strip as the table rail: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/styles.test.ts:154B11 inloads no third-party font service: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/client/src/styles.test.ts:161B11 inuses tabular numerals for the scores: every assertion is on the text of a file the test reads; it passes whether or not that text takes effectpackages/server/src/seed.test.ts:107B6 indeals identical round 1 and round 2 for the same seed, differently for another: test has no// spec: <capability>/<scenario>tag, on itself, its describe or its file's toppackages/shared/src/settings.test.ts:32B6 inkeeps the provided fields and defaults only the missing ones: test has no// spec: <capability>/<scenario>tag, on itself, its describe or its file's toppackages/shared/src/settings.test.ts:40B6 inrejects unknown values field by field instead of passing them through: test has no// spec: <capability>/<scenario>tag, on itself, its describe or its file's toppackages/shared/src/settings.test.ts:56B6 ingives the same sequence for the same seed and a different one for another: test has no// spec: <capability>/<scenario>tag, on itself, its describe or its file's topBraid run
ux-and-visual-review-21-tasks-from-deskt-4qt8qy(37 steps, 1 retried).forgejo/workflows,.gitea/workflowsor.github/workflows); what only CI tests went unverifiedOpened by Braid.