Repository navigation
Description
Why
Both tours (#1406 founder, #1407 member) need the same machine: point at a real control on a real screen, explain it, wait for the user to actually use it, then move on, even across pages.
Nothing like this exists in the app today. The closest pieces are OnboardingChecklist (components/dashboard/dashboard-content.tsx) and the click-driven step rail inside the marketing audit film, and neither can anchor to app UI.
Build the engine once. Then each tour is just a list of steps.
What the user sees
- A spotlight dims the page around one real element, such as the "New dataset" button.
- A coachmark beside it shows:
- a short title and one or two sentences;
- "Step 3 of 7";
- Back, Next and Exit.
- "Next" may wait. On a step like "Upload the sample file", Next stays disabled until the upload has actually happened. The coachmark then says "Done — next".
- The tour follows them between pages.
- On a phone, the coachmark becomes a bottom sheet.
The engine is grayscale: inside the app, the app's design rules apply (owner decision; see #1403).
How
- Components. Add
components/tour/with aTourProvider, mounted once in the app shell, and the overlay. - Anchors. A step names an anchor id, and the target element carries
data-tour="<id>". Add those attributes to the real elements the tours use. The engine never queries by CSS class or text. - Step definition. Each step has:
- an id and copy;
- an optional route (navigate there, then wait for the anchor);
- an optional completion condition, one of:
- "this anchor was clicked";
- "this route was reached";
- "this server state became true", polled or event-driven, for example "a job for this dataset is running";
- an optional role requirement (used by Member tour "find your way": role-aware tour of a workspace's real data #1407);
- an optional "skip if" condition (used by Member tour "find your way": role-aware tour of a workspace's real data #1407 for empty screens).
- If the anchor never appears within about 3 seconds, the coachmark shows centred with "This part isn't on screen right now", plus Next or Skip. The tour never hangs.
- Progress. Write
last_stepandstarted_at/completed_atthrough First-run state and the tour offer, per user per workspace #1404's PATCH on each change, so a tour can resume anywhere. - Accessibility.
- The coachmark is a non-modal dialog, and focus moves into it.
- Esc exits.
- Left and right arrows go Back and Next.
- An
aria-live="polite"region announces "Step 3 of 7: …". - The page under the spotlight stays usable. The user must be able to click the very thing the step points at.
- Return focus on exit.
- Motion. Use
frontend-design-system/references/motion.md:- The spotlight moves between anchors with transform only, in about 200ms.
- It is instant under reduced motion and when the step changed by keyboard (
motion-guard). - Use
useMotionAllowedwhenmotion/reactis used.
- Layout.
- Reposition on resize and scroll; the anchor is scrolled into view with
block: center. - At 390px, use a bottom sheet with 44px controls, and never cover the anchor.
- Reposition on resize and scroll; the anchor is scrolled into view with
Acceptance criteria
- Component tests cover:
- anchor present;
- anchor missing (the fallback shows within about 3 seconds);
- a step that changes route and waits for its anchor;
- a completion condition that unlocks Next;
- Exit, and resuming at
last_step; - resize repositioning.
- The anchored control can be clicked while the overlay is open.
- Axe has no serious or critical violations with the overlay open, in a functional test over one sample tour.
-
motion-guard.spec.tspasses: keyboard steps don't animate. - It works in desktop-chromium, mobile-safari and mobile-chrome, using the bottom sheet on phones.
- The
src/lib/**coverage floor holds.
Out of scope
- The content of the tours (Founder tour "build it": Meridian sample data through to a working API call #1406, Member tour "find your way": role-aware tour of a workspace's real data #1407).
- Any marketing-colour styling inside the app.
Depends on
Nothing for the engine. Use a throwaway two-step test tour. Persistence plugs into #1404.
Where to start
frontend/src/components/shell/app-shell.tsx.frontend/src/lib/use-motion.ts..claude/skills/frontend-design-system/references/motion.md.frontend/tests/functional/a11y.spec.ts.
Estimate: 1.0 engineer-weeks.
Part of the E31 epic (#1396) (linked as parent). Decisions recorded 2026-11-28 with the owner.
Activity