Commit Graph

184 Commits

Author SHA1 Message Date
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 5817206351 fix: resolve SSR build error with GrimoireTab
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m47s
- Fix GrimoireTab to handle SSR safely (SPELLS_DEF undefined during server-side rendering)
- Use useState and useEffect to only access constants on client-side
- Build now succeeds consistently
2026-05-03 12:58:50 +02:00
Refactoring Agent df67abca50 fix: resolve runtime issues with game loop, tabs, and error handling
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m46s
- Fix game loop store mismatch (page.tsx now uses modular stores matching gameHooks.ts)
- Fix StatsTab.tsx type errors (signedPacts now from usePrestigeStore)
- Fix React hooks violations (all hooks called before conditional returns)
- Add ErrorBoundary to page.tsx for better error handling
- Fix getStudySpeedMultiplier called with correct arguments
- Build succeeds consistently
2026-05-03 12:41:11 +02:00
Refactoring Agent fef57d7a55 fix: resolve runtime issues with game loop, tabs, and error handling
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m45s
- Fix game loop store mismatch (page.tsx was using old store, gameHooks using new store)
- Fix StatsTab.tsx calling getStudySpeedMultiplier with wrong arguments
- Add ErrorBoundary to page.tsx for better error handling
- Fix import syntax issues in page.tsx
- Ensure build succeeds with fixes
2026-05-03 12:26:30 +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 f1499046b5 fix: update EquipmentTab to use modular stores, fixing tab crash
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m43s
2026-05-02 21:38:54 +02:00
Refactoring Agent 129f7876c1 fix: update SpellsTab to use modular stores, fixing tab crash
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m42s
2026-05-02 21:31:14 +02:00
Refactoring Agent 40d310b55a docs: update AGENTS.md, GAME_BRIEFING.md, and skills.md after refactoring
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m53s
2026-05-02 19:59:33 +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 86683fe288 refactor: extract components from EquipmentTab.tsx to reduce below 400 lines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m12s
2026-05-01 15:46:11 +02:00
Refactoring Agent 6c4ebd8b8e refactor: extract components from page.tsx to reduce below 400 lines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m13s
2026-05-01 15:40:53 +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 3691aa4acc fix: exclude .git directory from project structure generation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m2s
- Updated generate-project-tree.js to explicitly skip .git directory
- Regenerated project-structure.txt without .git contents
2026-04-29 13:12:23 +02:00
Refactoring Agent 454195cdfb Update hooks and ignore markdown files in size check
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m16s
2026-04-29 12:18:08 +02:00
Refactoring Agent 88d6016557 Test small file 2026-04-29 12:17:08 +02:00
Refactoring Agent 1e5eae9b9d Restructure CraftingTab: remove stepper, add Fabricate/Enchant top sub-tabs 2026-04-29 12:03:45 +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 351b6c2dca Fix Task6: Add missing calcDamage import to SpireTab.tsx
- Added missing calcDamage import from @/lib/game/store
- Fixed TypeScript error in SpireTab.tsx related to calcDamage
2026-04-28 15:35:48 +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 b0a254b481 Task10: Add activity log to SpireModeUI with event type styling
- Updated SpireModeUI Activity Log in page.tsx to use activityLog state instead of log
- Added ActivityLogEntry import from @/lib/game/types
- Applied event type styling for: damage_dealt, enemy_defeated, floor_cleared, floor_transition, special_effect
- Increased ScrollArea height from h-32 to h-48 for better visibility
- Changed from store.log.slice(0, 20) to store.activityLog.slice(0, 50)
- Added empty state message 'No activity yet...'
- Added proper key usage with entry.id instead of array index
2026-04-28 15:18:16 +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 47c71e6f54 feat(ui): complete Task 4 UI redesign — all sub-tasks 1-10
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 8m47s
- Implemented complete design system with 40+ CSS custom properties
- Created 9 UI primitives (GameCard, SectionHeader, StatRow, ManaBar, ElementBadge, ValueDisplay, ActionButton, SkillRow, TooltipInfo)
- Redesigned all tabs: Spire, Skills, Stats, Equipment, Crafting, Attunements, Golemancy, Spells, Loot, Achievements, Lab, Debug
- Added toast notification system (GameToast) with success/warning/error/info types
- Added confirmation dialogs for destructive actions
- Removed all dev artifacts and component name labels
- Added empty states to all tabs
- Replaced emoji icons with Lucide React icons
- Added enchantPower placeholder to StatsTab and EquipmentTab
- Mobile audit passed at 375px viewport
- Build passes with 0 errors, lint passes with 0 errors

Sub-tasks completed:
- ST1: Design System Implementation
- ST2: Global Layout & Header
- ST3: Left Panel (Mana Display & Action Area)
- ST4: Skills Tab
- ST5: Spire Tab & Spire Mode UI
- ST6: Stats Tab
- ST7: Equipment & Crafting Tabs
- ST8: Attunements Tab
- ST9: Remaining Tabs
- ST10: Toast System & Confirmation Dialogs

Documentation: 15+ files in docs/task4/
2026-04-28 11:38:45 +02:00
Refactoring Agent 3c29c1c834 Complete Step 4 & 5: UI Audit and Effects & Skills Audit
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 5m35s
2026-04-27 14:22:44 +02:00
Refactoring Agent 111e0211cb Add effects & skills audit report (Step 5)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m32s
2026-04-27 14:21:05 +02:00
Refactoring Agent 4f03544eaf Add effects & skills audit report (Step 5)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m34s
2026-04-27 14:11:52 +02:00
Refactoring Agent 712d587ad5 Add UI audit report (Step 4)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 5m53s
2026-04-27 13:56:56 +02:00
Refactoring Agent a69ea7575e Add StatsTab mana breakdown per type (Bug14)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m34s
2026-04-27 13:46:18 +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 749321d2cb Investigate Essence Refining effect compatibility (Bug 15)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m12s
2026-04-27 12:38:53 +02:00
Refactoring Agent 3bcf20636c Fix DebugTab crash (Bug 4): Correct GameStore import path
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 25s
2026-04-27 12:31:06 +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 beafa82789 chore: update README with comprehensive project documentation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m31s
- Complete rewrite of README.md with updated project information
- Added tech stack with exact version numbers from package.json
- Updated project structure to reflect current codebase
- Added deployment section with Docker, CI/CD, and reverse proxy info
- Included attunement system and golemancy details
- Added git repository information
- Improved formatting and organization with table of contents
2026-04-27 11:59: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 900c0e8fe9 Sub-Task 5: Mark CraftingTab Design Phase Compatibility (Bug 7) as completed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 5m51s
The fix was already implemented in the repository - the getOwnedEquipmentTypes() function in EnchantmentDesigner.tsx now correctly checks store.equipmentInstances (actual owned items) instead of store.lootInventory.blueprints.

Acceptance Criteria Met:
1. In CraftingTab Design phase, only enchantments compatible with items the player currently owns are shown
2. Compatibility is determined by enchantment type (e.g., weapon enchantments only show if player owns weapons)
3. No performance issues when filtering enchantments (uses Set for O(1) lookups)

Sub-Task 6 (Bug 8) can now proceed as it depends on this.
2026-04-27 11:03:57 +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 f31b98b378 Remove pause button from header (Sub-Task 3)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 7m43s
- Removed pause button from TimeDisplay component
- Removed pause-related props (paused, onTogglePause) from TimeDisplay
- Cleaned up unused imports (Play, Pause from lucide-react, Button)
- Updated page.tsx to pass insight prop instead of pause props
- Header now shows: game title, day/hour, and insight display
2026-04-27 10:57:09 +02:00
Refactoring Agent 06778f96b3 Task 3: Step 2 complete - plan sub-tasks for bug fixes
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 6m42s
2026-04-27 10:53:08 +02:00
Refactoring Agent 5f1f72d892 Docs: Clean up docs folder - remove all old task/phase files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m42s
2026-04-27 00:25:42 +02:00
Refactoring Agent 64b5e8578d Docs: Update AGENTS.md after Task 2 completion
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 25s
2026-04-26 22:42:32 +02:00