- each player gets a reconnectToken; room:create/join return it
- new room:rejoin event: re-attaches the existing player (by id+token) to the
new socket, broadcasts player:rejoined + room:state, and resyncs the current
round to that socket (engine.resync re-emits round:start with their view)
- client persists the session (roomCode/playerId/token/name) in localStorage;
bootstraps the store from it and auto-rejoins on every socket connect;
clears it on reset/quit or failed rejoin
Verified e2e: wrong token rejected, correct token re-attaches (player present
+ connected).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- settings carry `categories` (empty = all); quiz/image pool filters by category
(DB + in-code bank), threaded through prepareQuizForRoom/loadGroup/loadQuizPool
- public GET /api/categories lists available categories
- lobby: category chips (Toutes + each), shown when quiz/images is active
- shared: RoomSettings.categories + UpdateSettingsPayload
Verified e2e: /api/categories returns the list; filtering by ["Pokémon"] serves
only Pokémon questions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- shared: RoundRecap (+ scorers); game:end carries recap[]
- server: GameRound.recap(ctx) per mode (quiz: prompt + correct answer +
image; blindtest: "title — artist" + addedBy + links); engine accumulates a
history per round (with that round's scorers from the score deltas) and sends
it at game:end
- client: GameEndView shows a collapsible "Récapitulatif des manches" — each
round's label, answer, media thumbnail (image/youtube) and who scored
- engine test dummy round implements recap
Verified e2e: game:end recap lists every round with answer + scorers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- image_reveal display: larger, object-contain (whole image up to 58vh), no crop
- image prompt optional in back-office (defaults to "Qui est-ce ?"), overridable
- mixed mode reworked: select "Mixte" then toggle sub-modes (Quiz/Images/
Blindtest). Blindtest sub-mode locked under 3 players; mixed itself no longer
needs 3. Server quiz pool formats derived from gameType + mixedModes.
shared: MixMode + RoomSettings.mixedModes (default quiz+image).
- DB: prompt uniqueness is now a partial index (excludes image_reveal) + unique
index on image_url; lets many images share the generic prompt, dedup by URL.
- seed: db:seed:images pulls Pokémon (PokéAPI) as image_reveal questions with
official artwork (remote URL) + FR/EN accepted answers; idempotent by image_url.
Verified: migration applied, Pokémon seed inserts FR+EN, image mode serves only
image_reveal, all checks green (23 tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- game:end now carries the played blindtest tracks (title/artist/youtubeId/
url/submittedByName); the end screen lists them as cards with a YouTube
open link so players can recover/export the songs
- who_added vote no longer lets you pick yourself (filtered out)
- home page: animated halo, floating geek emojis, springy gradient title,
hover/tap on buttons (Framer Motion) + Lucide icons
- lobby settings get Lucide icons (game type, quiz, blindtest mode, tracks,
start)
Verified e2e: game:end includes the track list with links.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restructure onboarding (option B):
- home is just Create / Join (code) — no name field
- name is chosen in the room: room:create/join no longer require a name;
new player:setName event. Nameless players are hidden from the snapshot
(players/scores/submissions) and excluded from eligible voters and the
3-player blindtest gate until they pick a pseudo.
- PseudoScreen with live DiceBear avatar preview gates RoomPage until set
- /join/:code auto-joins then redirects to the room (seamless invite links)
- RoomCode gains a "copier le lien" button (origin/join/CODE)
Verified e2e: nameless players excluded from the room until setName.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Return to lobby (replay without recreating the room):
- lobby:return (host): reset to lobby, scores to 0, keep players + tracks
- client: end screen has "Rejouer" (host) + "Quitter"; store clears transient
game state whenever the room goes back to lobby
Contributor has nothing to input:
- round:start carries a private `mine: true` to the contributor only (via
RoundStart.secretPlayerId targeted emit); they're excluded from eligible
voters. Client shows a "fais-les se tromper" card instead of the vote form.
Editable track submission:
- submitTrack ack returns trackId + youtubeId; new blindtest:removeTrack
- lobby shows submitted tracks as cards (YouTube thumbnail + title) with delete
Verified e2e (3 players): add/remove, private mine flag, return-to-lobby reset.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mixed mode (default):
- gameType is now mixed | quiz | blindtest, default "mixed"; the lobby
interleaves quiz + blindtest rounds so modes alternate
- lobby reworked: 3-way game-type switch, quiz count and/or blindtest config
+ track submission shown per selected type
Free-text quiz questions:
- quiz supports the `free` format (e.g. maths) alongside mcq/truefalse:
payload without choices, {text} vote, tolerant matching on acceptedAnswers
- shared QuizQuestionPayload.choices optional; reveal truth carries answer
- match util moved to game/match.ts (shared by quiz + blindtest)
- repo/seed include free + acceptedAnswers; in-code bank gains free questions
- client quiz view renders a text input for free questions
Mode-aware transitions:
- RoundTransition themed per mode (colors/label/emoji); announces the mode
on change (quiz <-> blindtest), lighter teaser within the same mode
- custom media buckets per mode: assets/transitions/{quiz,blindtest}/ + shared
- store tracks roundModeChanged
Verified e2e: mixed game alternates quiz/blindtest to completion; free-text
scoring covered by tests (22 pass).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Server (option 2 — don't eat answer time):
- engine: leadMs prep delay (default 1600ms) before the clock starts; the
round timer now fires at lead + duration, and scoring uses the post-lead
start so the speed bonus spans the full answer window
- shared: round:start carries startsAt (answers begin) alongside endsAt
- engine test passes leadMs:0
Client:
- Countdown shows the full duration (no ticking) until startsAt, then counts
down — so the WarioWare transition plays in full without stealing time
- store/ActiveRound carry startsAt
Custom transition media:
- RoundTransition auto-loads any gif/webp/apng/png/avif dropped in
src/assets/transitions/ (import.meta.glob), plays one at random per round,
falls back to the Framer animation when none are present
- README documenting how to add animations
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- voteAck now carries `voted` (playerIds who validated) — never their answer,
so no leak; the count/total stay for the progress text
- PlayerCards show a green "Prêt" check for players who answered and a
pulsing "en attente" dot for those who haven't, during in_round only
- score stays visible on the cards alongside the status
- engine test updated for the new voteAck shape
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>