diff --git a/apps/web/src/context/gameContext.tsx b/apps/web/src/context/gameContext.tsx index 22b2ec3..206b84c 100644 --- a/apps/web/src/context/gameContext.tsx +++ b/apps/web/src/context/gameContext.tsx @@ -1810,7 +1810,18 @@ export const GameProvider = ({ const collectExploration = useCallback( async(areaId: string): Promise => { + isSyncingReference.current = true; const result = await collectExplorationApi({ areaId }); + + /* + * Collect mutates server state outside the normal save flow — clear the + * stale HMAC signature and reset the timer so the next auto-save fires + * after React has re-rendered with the new materials in stateReference. + */ + signatureReference.current = null; + localStorage.removeItem("elysium_save_signature"); + lastSaveReference.current = Date.now(); + isSyncingReference.current = false; setState((previous) => { if (previous?.exploration === undefined) { return previous;