Update worklog with study system fixes
All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 26s

This commit is contained in:
2026-03-27 09:36:16 +00:00
parent 2f407071a4
commit b3e358e9a7

View File

@@ -745,3 +745,32 @@ Continue refactoring `/home/z/my-project/src/app/page.tsx` to reduce its size fu
- Major codebase cleanup and organization - Major codebase cleanup and organization
- Critical special effects now functional - Critical special effects now functional
- Comprehensive documentation for future development - Comprehensive documentation for future development
---
Task ID: 1
Agent: Main
Task: Fix study system and game time freeze issues
Work Log:
- **Fixed git credentials**: Saved credentials to AGENTS.md file for persistence
- **Fixed study system**: Changed from upfront mana cost to per-hour deduction
- Updated StudyTarget type to include `manaCostPerHour` and `totalCost`
- Updated study-slice.ts to calculate per-hour cost without deducting upfront
- Updated store.ts tick function to deduct mana each tick during study
- Added check for insufficient mana - pauses study and saves progress
- **Fixed game time freeze bug**: `newTotalTicks` was referenced before being defined
- Moved `newTotalTicks` calculation to before study section
- Removed duplicate declaration in combat section
- **Fixed mobile UI issues**:
- Fixed CalendarDisplay component props (was using `currentDay` but passed `day`)
- Added proper grid layout to calendar for mobile (7 columns) and desktop (14 columns)
- Fixed tabs layout from `grid-cols-8` to `flex flex-wrap` for mobile responsiveness
- Made tab triggers smaller on mobile with `text-xs px-2 py-1`
- **Added `lastStudyCost` tracking** for STUDY_REFUND special effect
Stage Summary:
- Study now costs mana per hour instead of all upfront
- Game time no longer freezes during study action
- Mobile UI is now responsive with properly wrapping tabs
- Calendar displays correctly on all screen sizes
- All changes committed and pushed to Gitea