Bug: cancelDesign can't cancel slot 2 when slot 1 is filled #225
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
The
cancelDesignaction incraftingStore.tshas inverted conditional logic. When both design slots are filled, only slot 1 is ever cancelled. Slot 2 can only be cancelled when slot 1 is empty. This creates a UX deadlock where a player with both slots filled can never cancel the second design without first completing or cancelling the first.Code Location
src/lib/game/stores/craftingStore.tslines 88-95:Impact
Medium. UX deadlock in crafting UI. Players with both design slots filled have no way to cancel the second design. The workaround is to cancel slot 1 first (losing that design progress) then cancel slot 2.
Fix Required
Add a parameter to specify which slot to cancel, or always cancel slot 2 when both are filled, or provide separate cancel buttons per slot. The UI component already has two separate progress bars, so the cancel action should target the correct slot.
Fixed: cancelDesign now accepts optional slot parameter (1 | 2). UI updated with cancel button for slot 2 and slot parameter for slot 1.