{"record":{"id":"f626383d7ab4c69a","repo":"tinyhumansai/openhuman","slug":"walkthrough-could-not-mark-walkthrough-complete","errorCode":null,"errorMessage":"[walkthrough] could not mark walkthrough complete in localStorage","messagePattern":"\\[walkthrough\\] could not mark walkthrough complete in localStorage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/walkthrough/AppWalkthrough.tsx","lineNumber":64,"sourceCode":"  } catch (e) {\n    console.warn('[walkthrough] could not set pending flag in localStorage', e);\n  }\n}\n\n/**\n * Marks the walkthrough as completed (or skipped). Once set, the walkthrough\n * will not show again.\n *\n * Wrapped in try/catch to prevent SecurityError/quota exceptions from\n * interrupting the tour-end flow.\n */\nexport function markWalkthroughComplete(): void {\n  try {\n    localStorage.setItem(WALKTHROUGH_KEY, 'true');\n    localStorage.removeItem(WALKTHROUGH_PENDING_KEY);\n    console.debug('[walkthrough] marked as complete');\n  } catch (e) {\n    console.warn('[walkthrough] could not mark walkthrough complete in localStorage', e);\n  }\n}\n\n/**\n * Resets the walkthrough so it will play again on the current app shell.\n *\n * - Removes the completed flag from localStorage.\n * - Sets the pending flag so `isWalkthroughPending()` returns true.\n * - Dispatches a `CustomEvent('walkthrough:restart')` on `window` so any\n *   mounted `AppWalkthrough` instance can react and restart immediately.\n */\nexport function resetWalkthrough(): void {\n  try {\n    localStorage.removeItem(WALKTHROUGH_KEY);\n    localStorage.setItem(WALKTHROUGH_PENDING_KEY, 'true');\n    console.debug('[walkthrough] reset — pending flag set, completed flag removed');\n  } catch (e) {\n    console.warn('[walkthrough] could not reset walkthrough in localStorage', e);","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/walkthrough/AppWalkthrough.tsx#L46-L82","documentation":"Best-effort catch in markWalkthroughComplete: the combined setItem(WALKTHROUGH_KEY) + removeItem(WALKTHROUGH_PENDING_KEY) threw (SecurityError/quota or storage disabled). The exception is deliberately not rethrown so the tour-end flow cannot be interrupted; the side effect is the walkthrough may replay next launch because the completed flag never persisted.","triggerScenarios":"Thrown at app/src/components/walkthrough/AppWalkthrough.tsx:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No action required in the moment — the tour-end flow continues","If the walkthrough keeps replaying, clear site storage or fix the quota issue so the flag can persist","Verify the app is not running in a context where localStorage is disabled"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}