🐛 Fix(frontend): default game selection to nonw when creating a lobby - #51
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
The incomplete-draft “Continue lobby” flow can now submit an empty gameId with no in-UI way to recover if the draft lacks a game, leading to a hard failure when resuming.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the lobby-creation dialog so that a game is not implicitly selected by default (instead, users must explicitly choose a game unless the dialog is invoked with a preselected gameId).
Changes:
- Removed the automatic fallback to the first catalog game (
games[0]?.id) when computing the currently selected game. - Removed the same fallback when submitting a “continue incomplete lobby” (paid draft resume) request.
File summaries
| File | Description |
|---|---|
| components/lobbies/create-lobby-dialog.tsx | Removes default game fallbacks during lobby creation/resume so game selection is explicit. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
205
to
+206
| gameId: | ||
| incompleteDraft.gameId || selectedGame || games[0]?.id || "", | ||
| incompleteDraft.gameId || selectedGame || "", |
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.
No description provided.