fix: better error messages when game has not been configured - #259
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Some generated recommendations are invalid for shipping or fail to use a platform already encoded in the command.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Centralizes richer no-game errors and replaces invalid bare wizard recommendations with platform-specific commands.
Changes:
- Adds shared error messaging, suggestions, documentation reference, and tests.
- Reuses centralized wizard commands across status and list output.
- Routes game-related commands through the shared error helper.
File summaries
| File | Description |
|---|---|
test/utils/errors.test.ts |
Tests no-game suggestions and reference URL. |
src/utils/errors.ts |
Builds centralized no-game errors. |
src/constants/index.ts |
Exports command constants. |
src/constants/commands.ts |
Defines wizard, create, and documentation constants. |
src/commands/status.tsx |
Lists platform-specific wizard steps. |
src/commands/game/status.tsx |
Uses the centralized error. |
src/commands/game/ship.tsx |
Uses the centralized error. |
src/commands/game/list.tsx |
Reuses wizard command constants. |
src/baseCommands/baseGameCommand.ts |
Centralizes missing-game handling. |
src/baseCommands/baseCommand.ts |
Adds command-aware no-game reporting. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot - i have pushed fixes for both of the open feedback points |
Reviewed — commit c90ffda addresses both open feedback points: |
|
There's another scenario we might want to resolve, running the ship command when we have a godot and shipthis config but the platforms are not configured: david@sal9000:/tmp/t/godot$ st game ship
Error: No Android or iOS configuration found. Please run `shipthis game wizard android` or `shipthis game wizard ios` to configure your game.we can clean this up |
|
That has been updated to show like this: david@sal9000:/tmp/t/fresh$ st game ship
Error: This game has no Android or iOS configuration.
Set up a platform with:
shipthis game wizard android
shipthis game wizard ios
david@sal9000:/tmp/t/fresh$
@copilot - can u review again |
... Reviewed — commit 72bb246 looks good. It reuses |
This is to resolve #252
What's changed
getNoGameErrorwhich builds one of the more rich oclif errors with suggestions etc with testsshipthis game statusand other commands viagetGameandbaseGameCommandWIZARD_COMMANDSreused in other commands e.ggame listOutput
Also updated when there are no configured platforms for the
shipcommand:I have manually tested all the affected commands