{"record":{"id":"fbcddd06e5093e20","repo":"tinyhumansai/openhuman","slug":"walkthrough-could-not-reset-walkthrough-in-local","errorCode":null,"errorMessage":"[walkthrough] could not reset walkthrough in localStorage","messagePattern":"\\[walkthrough\\] could not reset walkthrough in localStorage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/components/walkthrough/AppWalkthrough.tsx","lineNumber":82,"sourceCode":"    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);\n  }\n  window.dispatchEvent(new CustomEvent('walkthrough:restart'));\n}\n\n// ── Component ──────────────────────────────────────────────────────────────\n\n/**\n * Renders the post-onboarding Joyride walkthrough overlay (react-joyride v3).\n *\n * Mounts the Joyride instance when `isWalkthroughPending()` is true or when a\n * `walkthrough:restart` event is received. On finish or skip (EVENTS.TOUR_END),\n * calls `markWalkthroughComplete()` so the tour never shows again until reset.\n *\n * Mount this inside the Router context so `useNavigate` is available. The\n * steps include `before` hooks that navigate to other pages before focusing\n * the target element.\n */\nconst AppWalkthrough = ({ onboarded = false }: { onboarded?: boolean }) => {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/components/walkthrough/AppWalkthrough.tsx#L64-L100","documentation":"Best-effort catch in resetWalkthrough: removing WALKTHROUGH_KEY and re-setting WALKTHROUGH_PENDING_KEY in localStorage threw. Reset is a recovery/testing affordance, so the failure is only logged; the walkthrough:restart CustomEvent may still have been dispatched depending on where in the sequence the throw happened, so UI restart behaviour can be partial.","triggerScenarios":"Thrown at app/src/components/walkthrough/AppWalkthrough.tsx:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the reset action after clearing storage quota or unblocking localStorage","If the walkthrough still shows as complete, clear the app's site data wholesale"],"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-14T00:17:10.932Z"}