[priority: 4] uiStore not persisted — paused/gameOver/victory lost on page refresh #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: 4 — High
File:
src/lib/game/stores/uiStore.tsDescription:
The
useUIStoreis created without thepersistmiddleware. This meanspaused,gameOver, andvictoryare lost on page refresh. If a player refreshes during combat, the game resumes in a non-paused state withgameOver: false, potentially causing unexpected behavior.The legacy
store.tspersists these fields, but the modularuiStoredoes not — creating an inconsistency.Fix: Add
persistmiddleware touseUIStoreforpaused,gameOver, andvictory.Starting work on Issue 71: uiStore not persisted — paused/gameOver/victory lost on page refresh. Adding persist middleware to useUIStore.
Fixed: Added
persistmiddleware touseUIStorewith storage keymana-loop-ui-storage. Nowpaused,gameOver,victory, andlogssurvive page refresh.