fix: discipline stat bonuses not applied to max mana and other stats in reactive UI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s

Bug A: useMemo with empty deps in useGameDerived.ts — disciplineEffects
and clickMana were computed once on mount and never recomputed, so the
display always showed bonuses as 0. Fixed by subscribing to discipline
store state and passing disciplineEffects to computeClickMana().

Bug B: autoPaused disciplines excluded from computeDisciplineEffects —
when a discipline auto-paused due to insufficient mana drain, it lost
all its stat bonuses even though it remained active. Fixed by changing
the filter from !disc.autoPaused to !disc.paused, so auto-paused
disciplines keep their earned bonuses (they just stop gaining XP).

Added regression tests in discipline-effects-reactivity.test.ts.
This commit is contained in:
2026-06-15 10:58:44 +02:00
parent 9b559bb9f9
commit a45d38a9c9
6 changed files with 184 additions and 10 deletions
+8 -5
View File
@@ -1,11 +1,14 @@
# Circular Dependencies
Generated: 2026-06-14T19:56:38.228Z
Found: 4 circular chain(s) — these MUST be fixed before modifying involved files.
Generated: 2026-06-14T21:49:16.203Z
Found: 7 circular chain(s) — these MUST be fixed before modifying involved files.
1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts
2. 2) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
3. 3) stores/attunementStore.ts > stores/combatStore.ts > stores/combat-descent-actions.ts
4. 4) stores/attunementStore.ts > stores/combatStore.ts > stores/combat-descent-actions.ts > stores/non-combat-room-actions.ts
2. 2) stores/combatStore.ts > stores/combat-actions.ts > stores/combat-room-enchantments.ts > stores/craftingStore.ts
3. 3) stores/combatStore.ts > stores/combat-actions.ts > stores/combat-room-enchantments.ts > stores/craftingStore.ts > stores/crafting-equipment-tick.ts
4. 4) stores/combatStore.ts > stores/combat-actions.ts > stores/combat-room-enchantments.ts > stores/craftingStore.ts > stores/pipelines/equipment-crafting.ts
5. 5) stores/golem-combat-actions.ts > stores/golem-combat-helpers.ts
6. 6) stores/attunementStore.ts > stores/combatStore.ts > stores/combat-descent-actions.ts
7. 7) stores/attunementStore.ts > stores/combatStore.ts > stores/combat-descent-actions.ts > stores/non-combat-room-actions.ts
## How to fix
1. Identify which import in the chain can be extracted to a shared types/utils file.