Skip to content

Conversation

@Gawor270
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 10, 2025 15:19
@linear
Copy link

linear bot commented Dec 10, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a room player limit feature for the Deep Sea Stories application. The implementation adds a maximum capacity of 4 players per room, with proper error handling when attempting to join a full room, and a UI indicator showing current player count against the limit.

Key Changes

  • Introduces a ROOM_PLAYERS_LIMIT constant (set to 4) shared across backend and frontend
  • Implements server-side validation that prevents additional players from joining full rooms
  • Adds a visual player count indicator component showing "X/4" players in the game view

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/common/src/constants.ts Defines the new ROOM_PLAYERS_LIMIT constant (4 players)
packages/common/src/index.ts Exports the room limit constant for cross-package usage
packages/backend/src/domain/errors.ts Adds GameRoomFullError class and removes unused error definitions
packages/backend/src/game/room.ts Implements player limit check in addPlayer method before peer creation
packages/backend/src/controllers/peers.ts Catches room full errors and converts them to user-facing TRPC errors
packages/backend/src/controllers/stories.ts Removes unused FailedToStartStoryError import and usage
packages/web/src/components/PlayerCountIndicator.tsx New component displaying current player count vs limit with icon
packages/web/src/views/GameView.tsx Calculates player count and renders the indicator component in the UI
packages/web/src/views/JoinView.tsx Adds error handling to display user-friendly messages for room capacity errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AHGIJMKLKKZNPJKQR AHGIJMKLKKZNPJKQR self-requested a review December 11, 2025 11:30
Copy link
Member

@AHGIJMKLKKZNPJKQR AHGIJMKLKKZNPJKQR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When someone leaves (e.g. by closing their browser tab), they don't release their slot, effectively making the room limit 3

@Gawor270 Gawor270 merged commit 09b5dac into main Dec 12, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants