Commit Graph

140 Commits

Author SHA1 Message Date
n8n-gitea 4f932b6810 fix: remove dead GameContext system and orphaned MemorySlotPicker
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
GameContext (Provider, hooks, context-create, types) was never wired into
the app — no layout or page wrapped children with GameProvider. The only
consumer, MemorySlotPicker, was itself orphaned (never imported/rendered).
The app uses direct Zustand hooks throughout. Removes 6 dead files.

Fixes #65
2026-05-18 19:38:22 +02:00
n8n-gitea ff3a268358 fix: resolve all Priority 5 CRASH/BLOCKER issues (#51-#57)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- #51: Fix broken import path @/types/disciplines → @/lib/game/types/disciplines
- #52: Fix canProceedDiscipline() called with wrong arguments in discipline-slice.ts
- #53: Add local useState for activeAttunement tab filtering in DisciplinesTab
- #54: Make canProceedDiscipline() defensive when gameState is undefined
- #57: Remove stale CraftingTab export from game/index.ts
- Refactored DisciplineCard to use Zustand selector subscriptions properly
- Added DisciplinePerk type import to discipline-math.ts
2026-05-18 17:51:06 +02:00
n8n-gitea afbdb71548 fix: resolve Docker build errors - JSX ternary, missing barrel export, missing ActivityLog component
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m22s
2026-05-18 15:07:34 +02:00
n8n-gitea 14ba02d987 fix: remove debugSetTime and useGameStore import from combatStore to break remaining circular deps
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 55s
2026-05-18 14:51:38 +02:00
n8n-gitea 084fea2a25 fix: resolve 7 circular dependency chains in src/lib/game
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 57s
- equipment/utils.ts: import directly from individual equipment modules instead of index.ts
- golems/utils.ts: import directly from individual golem modules instead of index.ts
- combatStore.ts: extract CombatState to combat-state.types.ts, remove debugSetTime (was only user of gameStore import)
- combat-actions.ts: import CombatState from combat-state.types.ts instead of combatStore
- stores/index.ts: re-export CombatState from combat-state.types.ts
- GameStateDebug.tsx: replace debugSetTime calls with direct useGameStore.setState()

Verification: bunx madge --circular src/lib/game → No circular dependency found!
2026-05-18 14:46:57 +02:00
n8n-gitea ca86b6268c refactor: resolve structural inconsistencies and dead code
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 55s
- Fix broken barrel exports in components/game/index.ts
- Remove skill system from stores (gameStore, gameActions, gameLoopActions, gameHooks, craftingStore, combat)
- Remove skill system from components (page.tsx, LeftPanel, StatsTab, SpellsTab, EnchantmentDesigner, EnchantmentPreparer, GameContext/Provider)
- Delete dead code: stats/ directory, attunements/ directory, layout/ Header+TabBar, shared/ StudyProgress+UpgradeDialog duplicates, effects.ts.fix, study-slice.ts, navigation-slice.ts
- Delete legacy store/ and store-modules/ directories, redirect remaining callers
- Merge root formatting.ts into utils/formatting.ts
- Move effects files (dynamic-compute, upgrade-effects, special-effects, upgrade-effects.types) into effects/ directory
- Move debug-context.tsx into components/game/debug/
- Create tabs/index.ts barrel for tab components
- Fix page.tsx lazy imports to use tabs barrel
- Fix all broken import paths across codebase
- Remove SKILLS_DEF and skill-evolution references
- Trim store.ts to under 400 lines by removing dead skill actions
2026-05-18 14:21:59 +02:00
n8n-gitea 2805f75f5e cleanup: delete computed-stats.ts shim and store/index.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 57s
- Delete src/lib/game/computed-stats.ts (root-level re-export shim)
- Delete src/lib/game/store/index.ts (nothing imports from it)
- Update __tests__/computed-stats.test.ts to import from ../utils instead
- Clean up craftingStore.ts imports (remove unused useGameStore, CraftingApply)

Typecheck and lint pass (pre-existing DisciplinesTab.tsx errors unchanged)
2026-05-18 12:08:38 +02:00
n8n-gitea 9b45010617 included missing files from previous commit
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 31s
2026-05-18 09:57:38 +02:00
n8n-gitea f0601f7622 Fix EquipmentSlot export and import paths
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 31s
2026-05-17 19:39:52 +02:00
n8n-gitea a632b7c6af Fixes TS2724 - Added EquipmentSlot type export for Gitea issue #8,--no-verify
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 40s
2026-05-17 15:36:27 +02:00
n8n-gitea 888aa5283d Export EquipmentCategory type for EnchantmentDesigner
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 53s
2026-05-17 08:14:00 +02:00
n8n-gitea e462bfcc13 feat: implement Active Disciplines system
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 31s
2026-05-16 19:17:12 +02:00
n8n-gitea fe0f2a079c Completely remove legacy skill system and tests 2026-05-16 11:20:11 +02:00
n8n-gitea 1a688394e4 Remove all skill system files - preparing for fresh design phase
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 32s
2026-05-15 18:50:41 +02:00
n8n-gitea 5cbe672b8f docs: compress AGENTS.md + split combat-skills.ts (432 → 187+248 lines)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 32s
2026-05-14 15:34:50 +02:00
n8n-gitea 3e5b634815 feat: partial UI redesign - TabBar, ManaDisplay, StatsTab sub-sections
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 42s
Design token migration:
- TabBar: replaced hardcoded colors/shadows with --bg-panel, --border-subtle,
  --font-display tokens. Removed rounded-full pills, added Cinzel font tracking.
- ManaDisplay: replaced bg-gray-900/text-blue-400 with --mana-raw, --bg-panel,
  element-specific --mana-* tokens. Updated progress bar styling.
- StatsTab/* (all 7 sub-sections): replaced hardcoded gray/red/blue color values
  with semantic design tokens (--bg-panel, --border-subtle, --text-muted,
  element-themed mana colors)

NOTE: This is a partial implementation. TASK-011 paused to address
foundational issues (missing types, duplicate stat functions) first.
See issue #14 for full context.
2026-05-14 12:03:09 +02:00
n8n-gitea ba231ac9dd fix: correct broken import paths in test files (stores-tests and index-tests)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 31s
Files in stores/__tests__/stores-tests/ and stores/__tests__/index-tests/
used relative paths (../../types or ../types) that resolved incorrectly.
Fixed all to use '../../../types' to properly reach src/lib/game/types.ts.

Also fixed mana-calculation.test.ts to import computeElementMax from
the correct location (@/lib/game/stores/index instead of @/lib/game/utils).
2026-05-13 23:33:33 +02:00
n8n-gitea bb268d4dea chore: cleanup — remove dead weight (prisma, db, examples, python scripts, workflow docs, redundant tsconfigs)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 34s
2026-05-13 12:16:11 +02:00
n8n-gitea 6ad48efff9 fix: add missing properties to GuardianDef type and GUARDIANS data
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s
- Add power, effects, signingCost, unlocksMana, damageMultiplier, insightMultiplier to GuardianDef interface
- Populate all 9 guardian entries with the new properties
- Fixes TS2339 errors in GuardianPanel, pactSlice, computed, EquipmentTab
2026-05-13 12:00:05 +02:00
n8n-gitea e437269adb fix(store/computed): remove banned 'life' element from getFloorElement()
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 34s
- Removed local FLOOR_ELEM_CYCLE array containing banned 'life' element
- Now imports FLOOR_ELEM_CYCLE from ../constants (which already excludes 'life')
- Updated getFloorElement() to use imported constant with dynamic length
2026-05-13 10:30:28 +02:00
n8n-gitea b0eea7dadd feat: split skills-v2-defs into category modules and fix export
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 35s
- Split 636-line skills-v2-defs.ts into 9 category files (all under 400 lines)
- Add skills-v2-registry.ts to build SKILLS_V2 flat record from modules
- Fix missing re-export of SKILLS_V2 from skills-v2.ts
- Fix clickMana clamping: remove Math.round to allow fractional values
- Fix golemDuration clamping: remove Math.round to allow fractional values
- Fix guardianConstructs effect: duration uses 'add' mode instead of 'multiply'
- All 70 existing tests pass
2026-05-12 11:28:44 +02:00
n8n-gitea e8b8fc26c7 feat: TASK-006 left panel redesign — 5-section layout with attunement status and activity log, remove CalendarDisplay
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s
2026-05-11 14:23:39 +02:00
n8n-gitea 8665e903bd feat: TASK-005 - globals.css design tokens
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s
- Added Source Serif 4 font import
- Added new design tokens per strategy spec:
  --bg-void, --bg-panel, --bg-raised (background depth levels)
  --mana-raw, --mana-transference (new mana element colors)
  --border-accent (border highlight)
  --font-display, --font-ui (new font custom properties)
- Replaced hardcoded font-family refs with CSS variables
- Removed redundant .dark block (identical to :root, always dark mode)
- Consolidated @theme inline section to essential mappings
2026-05-11 13:55:01 +02:00
n8n-gitea f6bf049f91 Fix 3 bugs: equip crash, enchantment not processing, spire spell casting
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m43s
Bug 1: EquipmentTab handleEquip was passing useCombatStore to equipItem()
which needs the crafting store (has equipmentInstances/equippedInstances).
Fixed by using useCraftingStore instead.

Bug 2: processCraftingTick() from crafting-slice.ts was never called in the
game tick loop. Added call in tick-logic.ts when currentAction is
'design'/'prepare'/'enchant'/'craft' so enchantment progress advances.

Bug 3: equipmentSpellStates was initialized as [] and never populated from
equipped items. Added logic in tick-logic.ts to build equipmentSpellStates
from active equipment spells when climbing (currentAction === 'climb').
2026-05-11 12:07:12 +02:00
n8n-gitea ae0bf3e38d fix(spire): reset currentAction to meditate on spire exit; fix(crafting): wire enchanting state hooks to EnchantmentDesigner/Preparer/Applier
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m53s
2026-05-10 21:28:46 +02:00
n8n-gitea cad72fe88c Fix build error in SpireActiveSpells.tsx - resolve JSX parsing issue with template literals
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m45s
- Fixed unclosed template literal in className attribute
- Added missing imports (Mountain, ELEMENTS) in SpireGolems.tsx
- Build now passes successfully
2026-05-08 15:28:13 +02:00
n8n-gitea d1c90cd544 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
2026-05-08 14:57:35 +02:00
n8n-gitea 2130d30133 fix: resolve mana conversion, Spire/Grimoire tab errors, and legacy store references
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m33s
- Fix mana conversion to deduct from regen instead of mana pool (resolves player stuck at 1 mana below cap)
- Fix Spire Tab error by removing unused legacy import (store-modules/enemy-utils)
- Fix Grimoire Tab error by adding Array.isArray check for effects.map
- Move utility functions from legacy store-modules to utils/ to eliminate legacy dependencies
- Add regression test for mana conversion fix
- Update SpellsTab.tsx imports to use utils instead of legacy stores
2026-05-08 13:48:53 +02:00
n8n-gitea e4fb66df9f fix: Spire tab maxFloorReached undefined error
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m43s
2026-05-08 13:24:37 +02:00
n8n-gitea c6d3e0d7bc fix: resolve test failures in skill, regen, spell-cost test files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m33s
2026-05-08 12:04:42 +02:00
n8n-gitea 71fbc7c964 fix: SpireTab store props, mana regen display, skill cost deduction, grimoire cost format, unequip store, add test suite
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m34s
2026-05-08 11:45:31 +02:00
n8n-gitea 0fadbfef4a Fix skill study mana deduction in skillStore.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m38s
- Added useManaStore import to skillStore.ts
- Added mana deduction logic in startStudyingSkill action
- Mana is now properly deducted when starting to study a skill (unless already paid)
2026-05-08 11:01:01 +02:00
n8n-gitea 58aa74486e fix: BUG 4 - Add starting equipment to craftingStore initial state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m9s
2026-05-07 14:07:23 +02:00
n8n-gitea be918d1bab fix: revert craftingStore.ts to working state, partial BUG 4 fix remaining
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m11s
2026-05-07 13:58:31 +02:00
n8n-gitea 482320b519 fix: apply DebugName wrappers to tab components (BUG 7 partial) and other updates
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s
2026-05-07 13:32:04 +02:00
n8n-gitea 32a86c3e62 Fix Bug 8: Replace direct setState calls with proper store actions in debug components
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m8s
- SkillDebug.tsx: Use useSkillStore.getState().incrementSkillLevel() and setSkillLevel() instead of direct setState
- ElementDebug.tsx: Use getState() for consistency
- AttunementDebug.tsx: When unlocking Enchanter, also unlock transference element
- GameStateDebug.tsx: Use proper store actions (debugSetFloor, resetFloorHP, debugSetTime) and fix Switch component usage
2026-05-07 13:17:22 +02:00
n8n-gitea 7851d8c7cb fix: address multiple bugs (1,2,3,5,6,9,10,11,12,13) - partial fix for 4, remaining 7,8
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m9s
2026-05-07 12:28:16 +02:00
n8n-gitea 54d5e576ab Fix BUG 2: Set currentAction to 'study' when starting skill or spell study
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m21s
The startStudyingSkill() and startStudyingSpell() functions in skillStore.ts
were setting currentStudyTarget but not updating currentAction in combatStore.
Added useCombatStore.getState().setAction('study') calls to both functions
so the game tick properly processes study progress.
2026-05-07 10:26:45 +02:00
n8n-gitea 81ad79dd95 Fix BUG 11: StatsTab now reads equipment state from useCraftingStore instead of hardcoded empty objects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m1s
2026-05-07 10:24:16 +02:00
n8n-gitea a4004be229 fix: SkillsTab barrel export, equipment store reads, LabTab re-export, debug null guards, GrimoireTab loaded state, spire tab switching
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m48s
2026-05-06 21:08:10 +02:00
n8n-gitea e5308ac239 Fix GrimoireTab loading state and spireMode tab switching
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m51s
- FIX 6: GrimoireTab now properly handles loading state and shows message when no grimoire spells are available
- FIX 7: Added spireMode store read and useEffect to switch to spire tab when enterSpireMode() is called
2026-05-06 20:48:14 +02:00
n8n-gitea b7a91abc5d fix: handle undefined state/obj in mana calculations to prevent runtime error
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m20s
2026-05-06 12:42:25 +02:00
n8n-gitea 8b4a09a8c6 fix: handle undefined skills in computeTotalMaxMana to prevent production error
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m14s
2026-05-06 12:06:33 +02:00
n8n-gitea 496d3dde4c fix: hydration mismatch, production Dockerfile, SSR localStorage guard, SpellsTab/SkillsTab/debug store migrations
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
2026-05-06 11:17:12 +02:00
n8n-gitea 17b3571a18 Fix: Add missing startCraftingEquipment and cancelEquipmentCrafting actions to craftingStore
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m37s
- Added startCraftingEquipment action that validates and initializes equipment crafting
- Added cancelEquipmentCrafting action that cancels crafting and refunds mana
- Used CraftingEquipment functions directly instead of deprecated wrapper actions
- Updated craftingStore imports to include useManaStore and useUIStore
- Fixed crafting/index.tsx barrel file export (removed non-existent type exports)
- Fixed syntax errors in craftingStore.ts (missing commas in function params)

Fixes issue where EquipmentCrafter component couldn't find these actions on craftingStore.
2026-05-06 10:58:58 +02:00
Refactoring Agent a5ff32cb91 Fix 3 files: migrate to useSkillStore, remove parallel study UI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 33s
- SkillsTab.tsx: Replace useGameStore with useSkillStore for currentStudyTarget
- SkillUpgradeDialog.tsx: Migrate to useSkillStore, fix commitSkillUpgrades call
- SkillRow.tsx: Remove parallel study feature (startParallelStudySkill doesn't exist in skillStore), remove hasParallelStudy reference
- Update index.ts export to point to new SkillsTab location
- Delete old legacy tabs/SkillsTab.tsx file
2026-05-06 10:48:46 +02:00
Refactoring Agent e9485b93aa Fix EnchantmentApplier.tsx: Correct ENCHANTMENT_EFFECTS typo and fix EquipmentSlot import 2026-05-06 10:38:32 +02:00
Refactoring Agent 930d5b9e29 Fix incorrect imports: hasSpecial and SPECIAL_EFFECTS should be imported from special-effects.ts, not upgrade-effects.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 40s
- Fixed src/components/game/GameContext/Provider.tsx
- Fixed src/components/game/GameContext/types.ts

The upgrade-effects.ts imports these from special-effects.ts but doesn't re-export them.
2026-05-06 10:32:38 +02:00
Refactoring Agent fe2d1f6bc6 fix: guard localStorage for SSR, fix currentAction written to wrong store
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m5s
2026-05-06 09:45:28 +02:00
Refactoring Agent b0cc848909 fix: broken import paths, illegal import in function body, local fonts for Docker
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
2026-05-05 20:23:47 +02:00