Production view refactor#167
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84549d22e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const qty = e.shiftKey ? 5 : 1; | ||
| onAdd(row.itemType, row.designId, row.targetType, qty); |
There was a problem hiding this comment.
Disallow bulk-add quantity for planetary scanners
This click handler applies the Shift-based quantity=5 multiplier to every palette row, including planetary_scanner. That produces add_production_item commands with itemType="planetary_scanner" and quantity>1, which the backend command model rejects (planetary_scanner must be exactly 1), so users can stage an invalid queue and hit submit errors from the new production UI path.
Useful? React with 👍 / 👎.
| const [selectedPlanetId, setSelectedPlanetId] = useState<string | null>( | ||
| () => initialPlanetId ?? sortedOwnedPlanets[0]?.id ?? null, | ||
| ); |
There was a problem hiding this comment.
Validate initial planet selection against owned planets
The workspace initialises selectedPlanetId from initialPlanetId without checking whether that ID is in ownedPlanets. If the user opens Production while an unowned planet is selected, selectedPlanet resolves to null and the centre/palette panes show the empty-state message even though owned planets exist, which is a broken first-load flow for this screen.
Useful? React with 👍 / 👎.
No description provided.