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>
Revert the DJ change: the DJ is again a neutral player (never the track's
contributor), broadcast to all and counted as an eligible voter (votes blind).
The contributor is a normal voter whose vote never scores on their own track;
they only earn the who_added/mixed misdirection bonus (+50 per wrong guess).
- engine: restore single round:start broadcast + DJ-included eligible voters
- blindtest-round: restore neutral pickDj; contributor may vote (ignored in
scoring) so the round can still end on "all voted"
- client: DJ controls + everyone (DJ included) votes; reveal message simplified
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- DJ is now the track's contributor (controls their own song); their identity
is sent only to them so "who added" stays non-trivial. The contributor
doesn't vote and is excluded from the eligible-voters count.
- Scoring: the contributor earns nothing except in who_added/mixed, where they
get a misdirection bonus (50) per player who guesses the wrong adder.
- Blindtest (and mixed) require >= 3 connected players: lobby disables the
options with a hint, and game:start rejects with NEED_THREE.
- Player card is now 16:9 and full width — the video banner shows at reveal;
DJ gets a seek bar (current/duration) to jump anywhere, plus play/pause/restart.
- Mixed game order is shuffled (no predictable quiz/blindtest alternation).
Verified e2e (3 players): guard rejects at 2, DJ id hidden from others,
misdirection scoring correct. 23 tests pass.
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>
- Drizzle (postgres-js) setup: schema (quiz_category, quiz_question,
quiz_played, game_history), client (nullable — no DATABASE_URL → null),
drizzle.config, initial migration, migrate script
- Open Trivia DB seed: curated geek categories, mcq + truefalse, base64
decode (incl. type/difficulty), 1 req/5s rate limit, idempotent
(prompt unique); also seeds the FR in-code bank as source 'manual'
- quiz wired to the DB: per-room pool preloaded at game start (loadQuizPool
excludes already-played), records quiz_played for cross-session
anti-repeat; falls back to the in-code bank when no DB
- docker-compose for local Postgres; db:* scripts; DATABASE_URL in env
Roadmap V1 step 5. Verified against a real Postgres: migrate + seed (270
OpenTDB + 10 manual), DB-backed game serves OpenTDB questions and fills
quiz_played; no-DB fallback still serves the in-code bank.
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>