tinyhumansai/openhuman · error

[walkthrough] could not reset walkthrough in localStorage

Error message

[walkthrough] could not reset walkthrough in localStorage

What it means

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.

Source

Thrown at app/src/components/walkthrough/AppWalkthrough.tsx:82

    console.warn('[walkthrough] could not mark walkthrough complete in localStorage', e);
  }
}

/**
 * Resets the walkthrough so it will play again on the current app shell.
 *
 * - Removes the completed flag from localStorage.
 * - Sets the pending flag so `isWalkthroughPending()` returns true.
 * - Dispatches a `CustomEvent('walkthrough:restart')` on `window` so any
 *   mounted `AppWalkthrough` instance can react and restart immediately.
 */
export function resetWalkthrough(): void {
  try {
    localStorage.removeItem(WALKTHROUGH_KEY);
    localStorage.setItem(WALKTHROUGH_PENDING_KEY, 'true');
    console.debug('[walkthrough] reset — pending flag set, completed flag removed');
  } catch (e) {
    console.warn('[walkthrough] could not reset walkthrough in localStorage', e);
  }
  window.dispatchEvent(new CustomEvent('walkthrough:restart'));
}

// ── Component ──────────────────────────────────────────────────────────────

/**
 * Renders the post-onboarding Joyride walkthrough overlay (react-joyride v3).
 *
 * Mounts the Joyride instance when `isWalkthroughPending()` is true or when a
 * `walkthrough:restart` event is received. On finish or skip (EVENTS.TOUR_END),
 * calls `markWalkthroughComplete()` so the tour never shows again until reset.
 *
 * Mount this inside the Router context so `useNavigate` is available. The
 * steps include `before` hooks that navigate to other pages before focusing
 * the target element.
 */
const AppWalkthrough = ({ onboarded = false }: { onboarded?: boolean }) => {

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry the reset action after clearing storage quota or unblocking localStorage
  2. If the walkthrough still shows as complete, clear the app's site data wholesale
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at app/src/components/walkthrough/AppWalkthrough.tsx:82 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/fbcddd06e5093e20. Report an issue: GitHub.