Scibble Assignment#150
Open
everest-vetta wants to merge 12 commits into
Open
Conversation
- Add host tracking on room creation (isHost on Participant, hostId on Room) - Display Host badge on lobby, game screen, and scoreboard - Reject empty/invalid room codes with clear error message on join - Add client-side and server-side validation for room codes - Add Spec Kit infrastructure (extensions, scripts, templates) - Add feature specs for 001-host-tracking and 002-join-validation
- All spec artifacts for feature 002 generated (spec, plan, tasks, research, data-model, contracts, quickstart) - Implementation already complete from earlier work
- Added 2 isolation tests proving rooms are fully independent - Each room has its own participants; joining one room never affects another - All 11 backend tests / 2 frontend tests passing
Feature 004: Auto lobby polling every 2s with auto-navigate to game on status change and to home on 404. Feature 005: Host-only Start Game button with 2-player minimum. Uses hostId from backend RoomSnapshot for robust host identification.
- Player name validation: trim on both pages, reject empty names with inline errors, validate on backend via Zod trim().min(1) - Game start endpoint (POST /:code/start) transitions room to drawing, assigns host as round-1 drawer, selects word via (round-1) % words.length - Secret word visible only to drawer via toRoomSnapshot viewer filtering (viewerParticipantId === currentDrawerId) - GamePage shows round number, Drawer badge, Drawing/Guessing status, and secret word to drawer only - Fix race condition: setRoomSnapshot now guards against stale poll responses by comparing currentRound before overwriting
…d next word - Interactive drawing canvas (single black pen, HTML Canvas API) - Guess submission with frontend+backend validation (trim, reject empty, case-insensitive compare) - Scoring: only first correct guesser earns 100pts, subsequent get 0 - per-guess pointsAwarded field for accurate display (not cumulative score) - Clear Canvas button (drawer only, resets strokes) - Next Word button (drawer only, advances round preserving cumulative scores) - Auto-polling on game page with 404 redirect - Comprehensive spec/docs for all gameplay interaction features
Add result room status showing correct word, final scores, and guess history after drawer ends the game. Add host-only restart returning everyone to lobby with participants preserved and all round state cleared. Fix toRoomSnapshot to expose secretWord to all players in result state. Add FR-008 status guards to canvas/nextWord endpoints.
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.
Summary
Contributor