One guided tour per tab (and why a single onboarding pass wasn't enough)

One guided tour per tab (and why a single onboarding pass wasn't enough)

Costility's per-page spotlight tours: separate seen flags so old accounts aren't nagged, skip steps when a control isn't on screen, end every tour on "Replay the tour," and never mutate saved state on a replay.

By Cristian Muscalu ·

The problem with one big tour

A single first-run walkthrough sounds tidy. In practice Costility's main tabs (Transactions, Utilities, Activity, More) load different chrome, and users bounce between them. A 12-step mega-tour either blocks people before they care, or finishes before they've opened Utilities.

We already had a short onboarding wizard for the first wallet. The missing piece was "what is this button on this page?" — short, local, and replayable.

One tour per page

Each main route owns a small spotlight tour. New accounts get all four pages marked pending at profile creation. The first visit to a page auto-starts that page's tour only.

| Page | Steps | | --- | --- | | Transactions | wallets, +, charts, period/filters menu, then Replay | | Utilities | home/year, +, ⋮ menu, charts, then Replay | | Activity | newest card, filter, then Replay | | More | profile, appearance, currency, then the real Replay card |

Every tour ends on "Replay the tour" (RO: Revezi turul). On the first three pages that points at the More tab; on More it points at the actual Replay button and scrolls it clear of the header.

Old accounts must stay quiet

The important rule: missing pageTours prefs ≠ pending. Accounts created before the feature shipped have no key, so they never auto-start. Only profiles written at signup with explicit pending flags do.

Finishing or skipping writes completed / skipped for that page only. A per-device localStorage marker covers the gap before the profile write lands.

page-tours.ts

Skip what's not on screen

Shared homes hide the Utilities "+" button. Forcing a spotlight onto a missing control looks broken. When the tour arms, we wait for the page to settle, keep only steps whose targets exist, and always keep the final Replay step.

Same idea for geometry: the card is placed below / above / beside the hole so it never covers the control, and we scroll targets out from under the tab bar when needed.

Replay without rewriting history

More → Replay opens a picker (Transactions / Utilities / Activity / More). Choosing a page navigates there (or fires an in-place event) and starts the tour in replay mode.

And inside persist, even an auto finish is a no-op unless that page is still pending — so a weird race can't invent flags for a legacy account mid-replay.

Last button copy is "Gata!" / "Done!" with a small confetti burst unless prefers-reduced-motion is on.

page-tour.tsx

What we'd do again

  • Per-page tours beat one monolithic onboarding for multi-tab apps
  • Three-state prefs (pending / done / absent) beat a boolean "seen tours"
  • Replay must be a different mode from first-run, or you'll corrupt analytics and nag people
  • Mount tours after the first-wallet gate so they never fight setup

Shipped in Costility's 1.52.x wave.