- 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>
- 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>
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>