Skip to content

Conversation

@Gawor270
Copy link
Member

@Gawor270 Gawor270 commented Nov 3, 2025

  • Added two-step game selection flow, first users select story which is upadated on the backend and then they can start a game with selected story
  • Added new backend endpoints selectStory and stopGame to support the two-step workflow
  • Updated UI to show conditional buttons based on game state (Choose Story → Start Game/Cancel)
  • Make starting another game possible after ending current one
  • Display message when user tries to enter empty username
  • Fix invisible items in device selection list

Copilot AI review requested due to automatic review settings November 3, 2025 15:46
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 PR separates story selection from game starting into a two-step workflow. Players now select a scenario first, then explicitly start the game, with the ability to cancel an active game.

  • Refactored story selection to emit a storySelected event without immediately starting the game
  • Added new backend endpoints selectStory and stopGame to support the two-step workflow
  • Updated UI to show conditional buttons based on game state (Choose Story → Start Game/Cancel)

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
deep-sea-stories/packages/web/src/views/GameView.tsx Extracted userName from localPeer metadata and passed it to RoomControls
deep-sea-stories/packages/web/src/components/StorySelectionPanel.tsx Changed to call selectStory mutation instead of startStory, removed DialogDescription import, updated button and toast messaging
deep-sea-stories/packages/web/src/components/RoomControls.tsx Added state management for story selection and game lifecycle, implemented handlers for starting and cancelling games, conditional UI based on game state
deep-sea-stories/packages/web/src/components/AgentPanel.tsx Added rendering for storySelected events, removed agent visualizer image display, removed unused import
deep-sea-stories/packages/common/src/events.ts Added StorySelectedEvent type to the events union
deep-sea-stories/packages/backend/src/schemas.ts Split startStoryInputSchema into selectStoryInputSchema and startStoryInputSchema, added stopGameInputSchema
deep-sea-stories/packages/backend/src/router.ts Added selectStory and stopGame endpoints to the router
deep-sea-stories/packages/backend/src/controllers/stories.ts Refactored startStory into selectStory (sets story without starting) and startStory (starts previously selected story), added stopGame handler

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

@Gawor270 Gawor270 requested a review from czerwiukk November 5, 2025 10:27
Copy link
Member

@czerwiukk czerwiukk left a comment

Choose a reason for hiding this comment

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

one nit, lgtm

@Gawor270 Gawor270 merged commit 2379f4e into main Nov 6, 2025
1 check 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.

4 participants