-
Notifications
You must be signed in to change notification settings - Fork 1
Improve UX #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve UX #18
Conversation
…move visualizer blob
There was a problem hiding this 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
storySelectedevent without immediately starting the game - Added new backend endpoints
selectStoryandstopGameto 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.
czerwiukk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit, lgtm
Uh oh!
There was an error while loading. Please reload this page.