Skip to content

Tour engine: in-app coachmarks that follow real actions #1405

Backlog

Description

@athvin

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

  1. Components. Add components/tour/ with a TourProvider, mounted once in the app shell, and the overlay.
  2. 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.
  3. Step definition. Each step has:
  4. 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.
  5. Progress. Write last_step and started_at/completed_at through First-run state and the tour offer, per user per workspace #1404's PATCH on each change, so a tour can resume anywhere.
  6. 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.
  7. 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 useMotionAllowed when motion/react is used.
  8. 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.

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.ts passes: 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

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

  1. added
    post-mvp
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    post-mvp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions