Add Hotseat functionality#231
Draft
lordscarlet wants to merge 16 commits into
Draft
Conversation
Merge from YourDeveloperFriend
Merge changes from base
- Add hotseat column to Games table with migration - Add ownerId column to track game creator - Convert playerIds from INTEGER[] to TEXT[] to support both user IDs and string names - Update game creation flow to support hotseat mode with custom player names - Update username components to handle string player names without links - Add hotseat badges to game cards, active game headers, and final overview - Update undo permissions to allow hotseat game owner to undo actions - Update game visibility filters to include owner-based filtering - Hotseat games are automatically unlisted and prevent regular join/leave operations
- Simplified hotseat game test to avoid Selenium React state update issues - Test now verifies game creation and startup with default player names - Added longer wait times for buildTrack UI to appear (500ms) - Enhanced event dispatching with pointer events for better React integration - Hotseat test now passes successfully
- Fix .gitignore syntax error (missing newline) - Fix active player comparison using String() for type safety - Add null check for activePlayerId in kick endpoint - Improve deleteGame ownership logic for hotseat games - Remove redundant hotseat validation check
Contributor
Author
|
@YourDeveloperFriend I am really nervous about this one, for obvious reasons. I have it as a draft because it really could use someone pulling it down and testing with a better volume of data than I have (with a backup just in case, of course) |
Resolved conflicts: - .gitignore: keep both screenshots dir and seed script entries - .vscode/tasks.json: trivial whitespace conflict - awaiting_player.tsx: adopt main's useAwaitingGameIds refactor (callers already updated) - player_stats.tsx: keep main's expanded row UI, add typeof guard for hotseat string playerIds on LoginButton - e2e/create_game_test.ts: include main's map selector steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
player.playerId is number | string in hotseat games. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Overview
Adds hotseat (local multiplayer) game mode to support multiple players on a single device, and quicker development
Key Changes
hotseatandownerIdcolumns to the games table with migration supporting fresh database installsScreenshots
The following screenshots show the hotseat feature in action (captured at 1876×1200 resolution):
Shows the hotseat toggle and ability to add custom player names
Shows the game board during active hotseat play
Testing Notes
Recommendations for pre-merge testing:
The fresh database e2e tests pass without errors, confirming the migration and basic hotseat functionality work correctly on clean installs.
Closes #2