Setting issue to in-progress and continuing with remaining tasks per comment 683:
- Combat Actions refactoring
- Prestige Store refactoring
- LocalStorage error handling
- Test updates
Progress Report on Gitea Issue: Fix Error Handling Inconsistencies
✅ Completed Core Improvements
1. Standardized Result Type System
- Created
src/lib/game/utils/result.ts…
Starting work on issue #101 — standardizing error handling across the codebase. Plan:
- First, investigate all affected files to catalog current patterns
- Define a standardized Result type and…
Issue #102 resolved. All changes committed and pushed to master (commit 8a7ddaa). Bloated state types have been split into focused State + Actions interfaces aligned with the modular stores.
Implementation Complete
Changes Made
1. CombatState split (stores/combat-state.types.ts):
- Separated into
CombatState(16 data fields) +CombatActions(25 action methods) +…
Analysis Complete
Current State
GameState (71 fields in types/game.ts): Legacy monolithic type still used by crafting-actions/ utility files. The modular stores already split…
Starting work on issue #102: Bloated state types. Will analyze the current state types and split them into domain-specific types aligned with the modular stores.
Resolution Summary
Refactored gameStore.ts tick() from a tangled cross-store orchestrator to a clean read → compute → write pipeline.
Changes
New file:
- `src/lib/game/stores/…
Analysis Summary
Current problems in tick():
- 7
getState()calls at the top (ui, prestige, mana, combat, crafting, attunement, discipline) - Mid-function
getState()calls for…
Starting work on refactoring gameStore.ts tick() to use a pipeline pattern. Current analysis complete — the tick() function has 7 getState() calls, ad-hoc partial state objects, and back-and-forth…
Issue resolved. All 11 affected files have been refactored. 15 files changed, 1737 insertions(+), 1511 deletions(-). All files under 400 lines. Build passes. All 639 tests pass. Committed and…
Refactoring complete. All monster functions (>150 LOC) have been refactored by extracting sub-components and helper functions.
Summary of changes:
Starting work on issue #99: Refactoring monster functions (>150 LOC) with deep nesting.
Affected files and their LOC:
- GuardianPactsTab.tsx: 391 LOC
- craftingStore.ts: 378 LOC
- page.tsx: 373…
Issue resolved. All three duplicate function pairs consolidated to canonical sources. Commit: 53b3a94
Fix complete. Consolidated all three duplicate function pairs:
calculateDesignCapacityCost— Removed duplicate fromcrafting-utils.ts.EnchantmentDesigner/utils.tsnow delegates…
Starting work on consolidating duplicate functions. Will investigate the three duplicate pairs and consolidate to canonical sources.