fix: SpireTab refresh - cast bar, mana costs, full-screen mode, exit button
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m14s

This commit is contained in:
2026-05-08 14:57:35 +02:00
parent d496dd241b
commit d1c90cd544
13 changed files with 655 additions and 520 deletions
+47
View File
@@ -0,0 +1,47 @@
# TASKS: SpireTab Refresh & Casting Fixes
## Task 1: Fix Cast Bar Not Updating
- [ ] 1.1 Check `SpireTab.tsx` for `castProgress` subscription from `useCombatStore`
- [ ] 1.2 Verify `combat-actions.ts` updates `castProgress` in `processCombatTick()`
- [ ] 1.3 Fix Zustand subscription if `castProgress` not updating
- [ ] 1.4 Test: `castProgress` changes during combat ticks
## Task 2: Fix Casting Not Costing Mana
- [ ] 2.1 Audit `combat-actions.ts` for `deductSpellCost()` call
- [ ] 2.2 Verify `canAffordSpellCost()` checked before casting
- [ ] 2.3 Ensure `rawMana`/`elements` state updates after cast
- [ ] 2.4 Test: Mana decreases when spells cast
## Task 3: Make SpireTab Full-Screen (No Study/Crafting)
- [ ] 3.1 Remove study progress components when `simpleMode=true`
- [ ] 3.2 Remove crafting progress components when `simpleMode=true`
- [ ] 3.3 Add "Climb Down to Exit" button in `FloorControls.tsx` or `SpireTab.tsx`
- [ ] 3.4 Button calls `exitSpireMode()` from `combatStore`
- [ ] 3.5 Test: Study/crafting not rendered in spire mode
## Task 4: Refresh SpireTab Layout
- [ ] 4.1 Reorganize `SpireTab.tsx` sections: Header → Combat → Controls → Log
- [ ] 4.2 Remove redundant elements (duplicated stats, etc.)
- [ ] 4.3 Improve visual hierarchy with consistent card layouts
- [ ] 4.4 Test: Layout renders cleanly without clutter
## Task 5: Enforce Modular Stores Only
- [ ] 5.1 Audit imports in `SpireTab.tsx`, `combat-actions.ts`, `combatStore.ts`
- [ ] 5.2 Replace any `@/lib/game/store` or `@/lib/game/store-modules` imports
- [ ] 5.3 Verify all use `src/lib/game/stores/` or `src/lib/game/utils/`
- [ ] 5.4 Test: Zero legacy imports in modified files
## Task 6: Add Regression Tests
- [ ] 6.1 Create `src/lib/game/stores/__tests__/spire-tab-refresh.test.ts`
- [ ] 6.2 Test cast progress updates (acceptance criterion #1)
- [ ] 6.3 Test mana costs deducted (acceptance criterion #2)
- [ ] 6.4 Test no study in spire (acceptance criterion #3)
- [ ] 6.5 Test climb down to exit (acceptance criterion #4)
- [ ] 6.6 Run `npm run test` to verify all pass
## Task 7: Commit & Push
- [ ] 7.1 Run `npm run lint` to check code style
- [ ] 7.2 Run pre-commit checks (auto on commit)
- [ ] 7.3 Commit with message: "fix: SpireTab refresh, cast bar, mana costs, full-screen mode"
- [ ] 7.4 Push to origin/master
- [ ] 7.5 Update task list to completed