2.2 KiB
2.2 KiB
Sub-Task 1 Progress: Spire UI Fixes
Status: Completed
Completed Steps
- Read and understand SpireModeUI, SpireTab component code
- Fix floor health reactivity (Bug 1) - SpireTab uses useGameStore directly in tabs version
- Fix Climb Down button behavior (Bug 2) - Added climbDownFloor function, modified exitSpireMode to only work at floor 1
- Redesign SpireTab as Spire Stats view (Bug 3) - Removed Current Floor stat, added Enter Spire Mode button
- Move ClimbSpireButton to SpireTab (normal mode) - Added Enter Spire Mode button to SpireTab
- Move activity log from SpireTab to SpireModeUI in page.tsx (Bug 3)
- Test all changes - Build successful
- Commit and push changes
Commit Hash
Notes
Bug 1: Floor Health Reactivity
- The tabs/SpireTab.tsx receives store as prop from page.tsx
- The component accesses store.floorHP and store.floorMaxHP directly
- Zustand store provides reactive updates automatically
- Build succeeds - verification needed in browser
Bug 2: Climb Down Button
- Added
climbDownFloorfunction to store.ts that climbs down one floor at a time - Modified
exitSpireModeto only work when at floor 1 (bottom) - Updated page.tsx SpireModeUI to use climbDownFloor for "Climb Down" button
- Added "Exit Spire" button that only appears when at floor 1
- Shows "Reach floor 1 to exit" message when above floor 1
Bug 3: SpireTab Redesign
- Redesigned SpireTab as "Spire Stats" view when not in simpleMode
- Removed "Current Floor" card from normal mode view
- Added "Enter Spire Mode" button to SpireTab (normal mode)
- Activity log moved from SpireTab to SpireModeUI in page.tsx
- In simpleMode (Spire Mode), the Current Floor card is still shown with HP bar
Testing Checklist
- Build succeeds
- Floor health updates reactively when casting spells (needs browser testing)
- Climb Down button climbs one floor at a time (needs browser testing)
- Exit Spire only works at floor 1 (needs browser testing)
- SpireTab shows Spire Stats in normal mode (needs browser testing)
- Activity log shows in SpireModeUI (needs browser testing)
- Enter Spire Mode button works (needs browser testing)