• Joined on 2025-05-17
Anexim commented on issue Anexim/Mana-Loop#101 2026-05-21 11:04:00 +02:00
[priority: high] Inconsistent error handling — mixed return-null/throw/false patterns with no error context

Setting issue to in-progress and continuing with remaining tasks per comment 683:

  1. Combat Actions refactoring
  2. Prestige Store refactoring
  3. LocalStorage error handling
  4. Test updates
Anexim commented on issue Anexim/Mana-Loop#101 2026-05-21 10:44:47 +02:00
[priority: high] Inconsistent error handling — mixed return-null/throw/false patterns with no error context

Progress Report on Gitea Issue: Fix Error Handling Inconsistencies

Completed Core Improvements

1. Standardized Result Type System

  • Created src/lib/game/utils/result.ts
Anexim commented on issue Anexim/Mana-Loop#101 2026-05-20 21:09:01 +02:00
[priority: high] Inconsistent error handling — mixed return-null/throw/false patterns with no error context

Starting work on issue #101 — standardizing error handling across the codebase. Plan:

  1. First, investigate all affected files to catalog current patterns
  2. Define a standardized Result type and…
Anexim commented on issue Anexim/Mana-Loop#102 2026-05-20 21:06:02 +02:00
[priority: high] Bloated state types — GameState (71 fields), CombatState (58), PrestigeState (39)

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.

Anexim closed issue Anexim/Mana-Loop#102 2026-05-20 21:06:02 +02:00
[priority: high] Bloated state types — GameState (71 fields), CombatState (58), PrestigeState (39)
Anexim commented on issue Anexim/Mana-Loop#102 2026-05-20 20:53:30 +02:00
[priority: high] Bloated state types — GameState (71 fields), CombatState (58), PrestigeState (39)

Implementation Complete

Changes Made

1. CombatState split (stores/combat-state.types.ts):

  • Separated into CombatState (16 data fields) + CombatActions (25 action methods) +…
Anexim commented on issue Anexim/Mana-Loop#102 2026-05-20 19:59:25 +02:00
[priority: high] Bloated state types — GameState (71 fields), CombatState (58), PrestigeState (39)

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…

Anexim commented on issue Anexim/Mana-Loop#102 2026-05-20 19:51:48 +02:00
[priority: high] Bloated state types — GameState (71 fields), CombatState (58), PrestigeState (39)

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.

Anexim closed issue Anexim/Mana-Loop#103 2026-05-20 19:49:20 +02:00
[priority: high] gameStore.ts tick() orchestrates 7 stores with tangled cross-store coupling
Anexim commented on issue Anexim/Mana-Loop#103 2026-05-20 19:49:14 +02:00
[priority: high] gameStore.ts tick() orchestrates 7 stores with tangled cross-store coupling

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/…
Anexim commented on issue Anexim/Mana-Loop#103 2026-05-20 18:43:30 +02:00
[priority: high] gameStore.ts tick() orchestrates 7 stores with tangled cross-store coupling

Analysis Summary

Current problems in tick():

  1. 7 getState() calls at the top (ui, prestige, mana, combat, crafting, attunement, discipline)
  2. Mid-function getState() calls for…
Anexim commented on issue Anexim/Mana-Loop#103 2026-05-20 18:42:49 +02:00
[priority: high] gameStore.ts tick() orchestrates 7 stores with tangled cross-store coupling

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…

Anexim commented on issue Anexim/Mana-Loop#99 2026-05-20 18:39:38 +02:00
[priority: high] 10+ monster functions (>150 LOC) with deep nesting and high cyclomatic complexity

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…

Anexim closed issue Anexim/Mana-Loop#99 2026-05-20 18:39:38 +02:00
[priority: high] 10+ monster functions (>150 LOC) with deep nesting and high cyclomatic complexity
Anexim commented on issue Anexim/Mana-Loop#99 2026-05-20 18:36:51 +02:00
[priority: high] 10+ monster functions (>150 LOC) with deep nesting and high cyclomatic complexity

Refactoring complete. All monster functions (>150 LOC) have been refactored by extracting sub-components and helper functions.

Summary of changes:

Anexim commented on issue Anexim/Mana-Loop#99 2026-05-20 17:51:27 +02:00
[priority: high] 10+ monster functions (>150 LOC) with deep nesting and high cyclomatic complexity

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…
Anexim commented on issue Anexim/Mana-Loop#100 2026-05-20 17:47:57 +02:00
[priority: high] Duplicate functions across files (calculateDesignTime, calculateDesignCapacityCost, generateSwarmEnemies)

Issue resolved. All three duplicate function pairs consolidated to canonical sources. Commit: 53b3a94

Anexim closed issue Anexim/Mana-Loop#100 2026-05-20 17:47:57 +02:00
[priority: high] Duplicate functions across files (calculateDesignTime, calculateDesignCapacityCost, generateSwarmEnemies)
Anexim commented on issue Anexim/Mana-Loop#100 2026-05-20 17:47:34 +02:00
[priority: high] Duplicate functions across files (calculateDesignTime, calculateDesignCapacityCost, generateSwarmEnemies)

Fix complete. Consolidated all three duplicate function pairs:

  1. calculateDesignCapacityCost — Removed duplicate from crafting-utils.ts. EnchantmentDesigner/utils.ts now delegates…
Anexim commented on issue Anexim/Mana-Loop#100 2026-05-20 17:28:33 +02:00
[priority: high] Duplicate functions across files (calculateDesignTime, calculateDesignCapacityCost, generateSwarmEnemies)

Starting work on consolidating duplicate functions. Will investigate the three duplicate pairs and consolidate to canonical sources.