Simpl-Resultat/src/contexts
le king fu dcf3b013dc feat(onboarding): share the getting-started path through a provider
The checklist state moves from DashboardPage to OnboardingProvider, mounted
in AppShell around the routed page; pages read it through useOnboarding().
The reducer stays in useOnboardingChecklist:

- loads are numbered and a stale answer is ignored;
- HIDE, SHOW, SKIP and RESUME win over the snapshot of a load started
  before them (#384);
- a refresh keeps the counters and the ready status, and a failed re-read
  after a first success keeps the last state; only the start of a failure
  streak is logged;
- re-read at mount, on every route change and 150 ms after a burst of
  data events.

onboardingService: getOnboardingSnapshot replaces getOnboardingCounters and
is a pure read (skipped steps included, one preference per step, filtered on
the six keys and the value "1"); initializeGuidedPath applies rule D9 once
per profile in one transaction (hidden first, then the flag, ROLLBACK on
failure), awaited once by the first load through a promise shared by
StrictMode's double mount; skipStep / resumeStep are idempotent.

computeChecklist counts skipped rows; the new pure onboardingPath module
holds nextStep, CARD_PAGES (empty for now), stepsOfPage, the card latch,
bannerMode and readOnboardingNavState. The dashboard reads the context and
keeps its compact bar for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 07:33:57 -04:00
..
LicenseContext.test.ts fix(license): apply the review follow-ups on the license stack head 2026-10-05 19:13:36 -04:00
LicenseContext.tsx fix(license): check a revoked key as soon as it is entered 2026-10-04 16:26:10 -04:00
OnboardingContext.render.test.tsx feat(onboarding): share the getting-started path through a provider 2026-10-08 07:33:57 -04:00
OnboardingContext.tsx feat(onboarding): share the getting-started path through a provider 2026-10-08 07:33:57 -04:00
ProfileContext.tsx fix: address reviewer feedback (#54) 2026-04-09 15:46:27 -04:00