Commit Graph

58 Commits

Author SHA1 Message Date
Refactoring Agent 3db7e07302 fix: migrate equipment and enchantment state to modular stores, fix EnchantmentDesigner
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
2026-05-05 13:25:19 +02:00
Refactoring Agent dc1aad3700 Fix LeftPanel.tsx to use modular stores instead of legacy useGameStore
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Added useCraftingStore import for crafting progress fields
- Changed spireMode/enterSpireMode to useCombatStore
- Changed currentStudyTarget to useSkillStore
- Changed crafting progress fields to useCraftingStore
- Added useCraftingStore export to stores/index.ts
- Kept useGameStore only for gatherMana, day, hour
2026-05-05 11:10:33 +02:00
Refactoring Agent bb8edaf57a fix: complete remaining tab migrations, fix LeftPanel ghost fields, remove backup files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m42s
2026-05-04 16:52:43 +02:00
Refactoring Agent 837d963b63 fix: split SpireTab.tsx to 395 lines, remove require() imports, import from data modules; complete store migration
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 30m15s
2026-05-04 13:36:10 +02:00
Refactoring Agent 0eabd604b0 fix: Object.values null safety + Docker dev build
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Change Dockerfile to use development build (better error messages)
- Add || {} fallbacks to all Object.values() calls accessing state
- Fixes "Cannot convert undefined or null to object" browser error during SSR/hydration
- Verified TypeScript compilation and Next.js build successful

Files modified:
- Dockerfile
- src/app/page.tsx
- src/components/game/tabs/StatsTab.tsx
- src/components/game/StatsTab/LoopStatsSection.tsx
- src/components/game/StatsTab/ElementStatsSection.tsx
- src/components/game/tabs/AttunementsTab.tsx
- src/components/game/tabs/GolemancyTab.tsx
- src/lib/game/effects.ts
- src/lib/game/utils/combat-utils.ts
- src/lib/game/crafting-loot.ts
- src/components/game/LootInventory/LootInventoryDisplay.tsx
- src/components/game/LootInventory/index.tsx
- src/components/game/crafting/EnchantmentDesigner/utils.ts
2026-05-04 11:03:11 +02:00
Refactoring Agent 98ab975fb9 Update documentation after refactoring: AGENTS.md, GAME_BRIEFING.md, skills.md
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m28s
- Updated AGENTS.md to include store/ directory and clarify store architecture
- Updated GAME_BRIEFING.md Code Architecture section with store/ and legacy store info
- Updated skills.md with skill state management information
- Includes other refactoring changes (store hooks, component updates, etc.)
2026-05-04 09:49:13 +02:00
Refactoring Agent ca07719456 fix: update StatsTab, DebugTab and all child components to use modular stores
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m42s
- Updated StatsTab to use hooks directly (useSkillStore, usePrestigeStore, etc.)
- Updated DebugTab to use hooks directly
- Updated all debug child components (GameStateDebug, SkillDebug, AttunementDebug, etc.)
- Updated all stats child components (ManaStatsSection, CombatStatsSection, etc.)
- Fixed UpgradeEffectsSection.tsx syntax errors
- Updated page.tsx to not pass store prop to StatsTab and DebugTab
- All components now use modular stores directly instead of receiving store prop
2026-05-02 23:43:49 +02:00
Refactoring Agent d5cbc9faff Fix build errors: update imports and re-exports
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m45s
- Fixed equipment/index.ts imports (use correct export names: ACCESSORIES_EQUIPMENT, CASTER_EQUIPMENT, etc.)
- Fixed page.tsx: added lazy, Suspense imports from react
- Fixed page.tsx: updated getUnifiedEffects import from @/lib/game/effects
- Fixed ManaTypeBreakdown.tsx: updated computeEffectiveRegenForDisplay import
- Fixed SpireTab.tsx: updated getEnemyName import from enemy-utils
- Fixed LeftPanel.tsx: updated getUnifiedEffects import from @/lib/game/effects
- Build now succeeds with all tabs working
2026-05-02 18:36:36 +02:00
Refactoring Agent d2d28887b1 Refactor large files into modular components
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m9s
- Refactored page.tsx (613→252 lines) with GameOverScreen and LeftPanel extracted
- Refactored StatsTab.tsx (584→92 lines) with section components
- Refactored SkillsTab.tsx (434→54 lines) with sub-components
- Created modular structure for GameContext, LootInventory, and other components
- All extracted components organized into feature directories
2026-05-02 17:35:03 +02:00
Refactoring Agent c9ae2576f4 fix: SLOT_NAMES export and refactor: split crafting-slice.ts into modules
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m51s
2026-05-02 10:59:36 +02:00
Refactoring Agent dc38445225 refactor: extract components from SpireTab.tsx to reduce below 400 lines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m11s
2026-05-01 17:02:32 +02:00
Refactoring Agent f0ab3ca3ce refactor: extract components from SkillsTab.tsx to reduce below 400 lines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m10s
2026-05-01 16:41:29 +02:00
Refactoring Agent 03815f27ee feat: add prestige system and skill upgrades with comprehensive documentation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 5m57s
2026-05-01 15:18:09 +02:00
Refactoring Agent c8a01acda3 Fix Task 9: Climb/Descend Controls
1. Fixed exitSpireMode in store.ts to allow exit at any floor for re-entry resume
2. Removed floor restriction on Exit Spire button in page.tsx
3. Updated descend button label to use currentAction for 'Climbing' status
2026-04-29 10:39:11 +02:00
Refactoring Agent 6f0b86d4d7 Fix Task6: Remove duplicate SpireTab.tsx and verify swarm mode
- Deleted old src/components/game/SpireTab.tsx (duplicate of tabs/SpireTab.tsx)
- Verified SWARM_CONFIG: 15% chance, 3-6 enemies at 40% HP
- Verified UI in tabs/SpireTab.tsx correctly renders each swarm enemy individually
- Verified generateSwarmEnemies() and generateRoomType() logic is correct
2026-04-28 15:23:30 +02:00
Refactoring Agent 984459200b Task 10(2f): Add Activity Log to SpireModeUI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 20m15s
- Added ActivityLogEntry type to game types
- Added activityLog state to GameState interface
- Added addActivityLogEntry helper function in store.ts
- Added addActivityLog action to GameStore
- Hooked into combat events: damage_dealt, enemy_defeated, floor_cleared, floor_transition
- Hooked into special effects: dodge, armor_proc, special_effect (First Strike, Combo Master, etc.)
- Hooked into golem attacks and puzzle solving
- Updated SpireTab (tabs/SpireTab.tsx) to display activity log with colored entries
- Latest entries first, scrollable list with event type-based styling
2026-04-28 13:50:01 +02:00
Refactoring Agent 8aacc2c88e Fix Spire Mode floor rendering and swarm floors (Tasks 5 & 6)
- Added enemy naming system with getEnemyName() function
- Updated EnemyState type to include name field
- Updated generateSwarmEnemies() and generateFloorState() to assign enemy names
- Fixed SpireTab.tsx (both versions) to display:
  - Floor type (Combat/Swarm/Speed/Guardian/Puzzle) with icons
  - Named enemies based on element and floor tier
  - Special floor properties (armor %, dodge chance)
  - Multiple enemies for swarm floors with individual HP bars
- Added ROOM_TYPE_LABELS to constants for display
- Verified floor type generation logic works correctly
- Build succeeds with npm run build
2026-04-28 13:36:16 +02:00
Refactoring Agent 7056dc04d6 Fix Spire Mode UI issues: HP bar live updates and casting progress overflow
Task 7 (2c): HP Bar Live Updates
- Sync floorHP state with enemy HP after damage is applied
- This ensures the HP bar updates in real-time as damage lands
- Applied fix in main spell casting, equipment spell processing, and golem attacks

Task 8 (2d): Casting Progress Overflow
- Reset castProgress to 0 when mana is insufficient (instead of keeping accumulated progress)
- Added similar fix for equipment spell casting progress
- Prevents progress bar from showing >100% when out of mana

Files modified:
- src/lib/game/store.ts (added floorHP sync and progress reset logic)
- src/components/game/SpireTab.tsx (UI component using store state)
- src/components/game/tabs/SpireTab.tsx (UI component using store state)
2026-04-28 13:24:30 +02:00
Refactoring Agent 33c5a49577 Fix missing ENCHANT_SPEED_TIERS definition (Sub-Task 7 fix)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 5m42s
2026-04-27 13:36:22 +02:00
Refactoring Agent eeb1e3c784 SkillsTab Modifications (Bugs 9,11,12,13)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s
2026-04-27 13:26:02 +02:00
Refactoring Agent ebb9d15e9e Deduct mana conversion rates from raw regen (Bug 10)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m35s
- Added getTotalAttunementConversionDrain function to calculate total conversion drain
- Updated computeRegen to include attunement regen bonus
- Added computeEffectiveRegenForDisplay function for UI display
- Added conversionDrains to GameState to track per-attunement drain
- Updated tick function to track and persist conversion drains
- Build passes successfully
2026-04-27 12:25:17 +02:00
Refactoring Agent 8261baab54 Consolidate disenchanting into CraftingTab Prepare step (Bug 8)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m32s
- Add 'tags' field to EquipmentInstance type
- Modify Prepare step to show warning and different button text when item has enchantments
- Consolidate disenchanting into Prepare step (remove separate disenchant UI)
- After successful preparation, item receives 'Ready for Enchantment' tag
- Modify Apply step to only allow applying enchantments to items tagged 'Ready for Enchantment'
- Update subtask_6_progress.md and todo.md to mark Sub-Task 6 as completed
2026-04-27 12:21:14 +02:00
Refactoring Agent 35c69809a1 Fix Sub-Task 1: Spire UI Fixes (Bugs 1, 2, 3)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 5m12s
- Bug 1: Floor health display now reactive (uses Zustand store properly)
- Bug 2: Climb Down button now climbs floor-by-floor, exit only at floor 1
- Bug 3: Redesigned SpireTab as Spire Stats view, moved Enter Spire Mode button to SpireTab, moved activity log to SpireModeUI

Changes:
- Added climbDownFloor() action to store.ts
- Modified exitSpireMode() to only work at floor 1
- Updated SpireTab.tsx: removed Current Floor stat, added Enter Spire Mode button
- Updated page.tsx: Climb Down climbs one floor, added Exit Spire button at floor 1, moved activity log to SpireModeUI
2026-04-27 11:15:54 +02:00
Refactoring Agent 2696f76069 Update documentation for Sub-Task 3 completion
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 6m8s
- Marked Sub-Task 3 as completed in todo.md
- Updated subtask_3_progress.md with completion status and notes
2026-04-27 10:58:10 +02:00
Refactoring Agent 313aa334a9 Task 2: ActionButtons rework - remove manual selection, auto-transition to Meditate 2026-04-26 18:49:50 +02:00
Refactoring Agent c2dd846f63 Task 2: System Integrity - Fix Show Component Names for all components 2026-04-26 16:22:01 +02:00
Refactoring Agent c8baea4346 Task 2: Crafting - disable Prepare for non-enchanted items, limit Design to owned gear types 2026-04-26 15:42:32 +02:00
Refactoring Agent 9bf6e911f4 Task 2: Fix Combat UI Casting Bar progress animation 2026-04-26 15:16:19 +02:00
Refactoring Agent 50ce70efdd Task 2: SpireTab Overhaul - add Climb the Spire button, implement Spire Mode with exit condition 2026-04-26 13:44:45 +02:00
Refactoring Agent f61ed00ac1 FIX: Skill perks multiplier values (Deep Basin + others) - fix 0.20 to 1.20 for +20% effects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m46s
2026-04-26 00:30:02 +02:00
Refactoring Agent 2355be66e9 Task 2: StatsTab - Lock Fire/Water/Air/Earth at start, only Transference unlocked 2026-04-25 19:42:25 +02:00
Refactoring Agent 5e0bee8820 Task 2: Equipment System - support 2-handed weapons, staves block offhand slot
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m40s
2026-04-25 19:24:23 +02:00
Refactoring Agent 65b0f961e5 Task 2 progress: Remove Transference from LootTab essence list, delete Ascension skills
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m41s
2026-04-25 19:09:40 +02:00
Refactoring Agent f2d046c9e2 Fix: Persist paidStudySkills in skill store
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m1s
2026-04-25 10:50:03 +02:00
Refactoring Agent 77f181b4a1 Phase 4: Enchanting special effects (6) 2026-04-25 09:53:48 +02:00
Refactoring Agent 8d1d328c3f Phase 4: Element special effects (4) 2026-04-25 09:19:15 +02:00
Refactoring Agent 0f0b800e60 Phase 4: Study effects (remaining 6) 2026-04-24 18:32:15 +02:00
Refactoring Agent c8cabf3e4b Phase 4: Study effects (first 6) 2026-04-24 18:12:53 +02:00
Refactoring Agent edfc6f11c0 Phase 4: Combat special effects 2026-04-24 17:02:42 +02:00
Refactoring Agent 75a43c7209 Phase 4: Mana Well effects (remaining 7) 2026-04-24 16:37:55 +02:00
Refactoring Agent 132a4e6a72 Phase 4: Mana Well effects (1st 7) 2026-04-24 16:17:50 +02:00
Refactoring Agent 6e3b867e7d Phase 4: Mana Flow effects 2026-04-24 15:52:14 +02:00
Refactoring Agent d6b85d6367 Phase 3: Split DebugTab.tsx into functional components
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m17s
2026-04-24 14:12:52 +02:00
Refactoring Agent 23d0a129c1 Phase 3: Split utils.ts by responsibility
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m49s
2026-04-24 13:45:12 +02:00
Unknown b3291c3b5e Phase 3: Split computed-stats.ts by responsibility 2026-04-24 13:20:10 +02:00
Unknown c46981d81b Phase 3: Split enchantment-effects.ts into category files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m48s
2026-04-24 12:56:14 +02:00
Unknown f8520e15b8 Phase 3: Split constants.ts into domain-specific files 2026-04-24 12:38:47 +02:00
Unknown eb81ccb5aa Phase 3: Split types.ts into domain-specific files 2026-04-24 12:23:11 +02:00
Unknown 8995a31527 Phase 4: Add missing EXECUTIONER special effect definition (fixes runtime error) 2026-04-24 10:49:25 +02:00
Unknown fe97ef60b4 Task 1: Add Hybrid Skills - Pact-Weaving, Guardian Constructs, Enchanted Golemancy
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 7m37s
- Implement Pact-Weaving (Invoker + Enchanter) hybrid skill
  * Paths: The Weaver, The Warp, The World-Weaver
  * Weave Guardian essence into weapon enchantments/world-effects
  * Requires: Invoker 5+, Enchanter 5+

- Implement Guardian Constructs (Fabricator + Invoker) hybrid skill
  * Paths: The Architect, The Monumentalist, The Eternal
  * Only 1 active at a time, vastly more durable
  * Requires: Fabricator 5+, Invoker 5+

- Implement Enchanted Golemancy (Fabricator + Enchanter) hybrid skill
  * Paths: The Battle-Smith, The Enchanter-Smith, The Spell-Smith
  * Imbue golems with elemental spell logic
  * Requires: Fabricator 5+, Enchanter 5+

- All 512 tests passing
2026-04-23 14:02:52 +02:00