Add private chat to multiplayer rooms

This commit is contained in:
2026-10-08 10:22:19 +05:00
parent 1307436e65
commit 36e8d11eb4
14 changed files with 810 additions and 4 deletions

View File

@@ -27,12 +27,23 @@ Room state refreshes every two seconds, or every five seconds in a hidden tab.
Unfinished rooms expire after 24 hours. Multiplayer results are separate from
the solo leaderboard.
Room chat is available to current players in the lobby, during rounds, and at
the final standings. Open **Chat** to send a plain-text message of up to 500
characters. A badge shows unread messages while it is collapsed. Messages
refresh every two seconds and the latest 100 are restored after a refresh.
Sending chat does not lock the guess controls or change the round clock.
Removed players, players who left, and invite visitors cannot read or send
messages. Closed rooms and rooms older than 24 hours cannot use chat.
Retries are deduplicated; each player can send at most one new message per
second and 30 per minute. Player names come from the room identity.
## Database and verification
Apply `supabase/migrations/20261007071259_multiplayer_rooms.sql` to a new database
before deploying the web update. It has already been applied to MineGeo's
configured Supabase project. Deployments continue through `npm run deploy`
without a Git-provider connection.
Chat additionally requires `supabase/migrations/20261007155622_multiplayer_chat.sql`.
- `npm test`: validation and existing regression checks.
- `npm run test:multiplayer`: isolated PostgreSQL state, permission, and scoring

View File

@@ -41,6 +41,7 @@ additional Supabase credentials.
Multiplayer uses the Supabase migration described in [multiplayer.md](multiplayer.md).
Apply that migration to a new database before deploying the multiplayer web files.
Room chat also requires `20261007155622_multiplayer_chat.sql` before the web update.
Map ZIP sharing requires `20261007145000_map_sharing.sql`. Imported maps stay
private and can be played without moderation; publication is blocked. See