tour: auto-start for first-time visitors#16
Merged
Conversation
The tour is the studio's best explanation of itself, and first-run
detection already existed — it only relabeled the header button. Now an
eligible first visit (no tour-done sentinel, no permalink hash) starts
the tour directly on the recorded repair run. A write-probe guards the
auto-start: if localStorage can't persist the dismissal, we never
auto-launch (it would recur every visit) and the behavior degrades to
the manual button. tourOffered dies with the offer label.
Visitor history is now part of every e2e test's premise, so the
Playwright configs split into two projects: "first-run" (clean storage,
runs the new tour-first-run.spec.ts) and "studio" (seeded tour-done,
runs everything else as a returning visitor) — zero edits to existing
specs. Fail-first: auto-start and non-recurrence failed on the old
build ("element(s) not found" for tour-bar); deep-link immunity passed,
as the old code never auto-started. Full suite: 93 passed, 4 skipped.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the studio’s guided tour behavior so eligible first-time visitors automatically enter the tour on first load (while deep-linked visitors and returning visitors are not affected), and aligns Playwright test setup to make “visitor history” explicit via two separate projects.
Changes:
- Auto-start the guided tour on first visit only when there’s no tour completion sentinel, no permalink hash, and
localStoragewrites succeed (write-probe gating). - Split Playwright configs into
first-run(clean storage) vsstudio(seededdspack-studio-tour-done=1) projects to keep existing specs stable. - Add a dedicated first-run e2e spec covering auto-start, non-recurrence after dismissal, and deep-link immunity.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| playwright.production.config.ts | Adds first-run/studio projects and seeds localStorage for returning-visitor behavior in production runs. |
| playwright.config.ts | Mirrors the production project split locally, making visitor history explicit and avoiding per-test overrides. |
| e2e/tour-first-run.spec.ts | New first-visit e2e coverage for tour auto-start, dismissal persistence, and deep-link immunity. |
| apps/web/app/studio.tsx | Implements first-visit tour auto-start with a localStorage write-probe and simplifies the tour entry button copy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ryandmonk
added a commit
that referenced
this pull request
Jul 21, 2026
Conflict resolution keeps both halves: the first-run/studio project isolation from #16, with support-triage.spec.ts added to the studio project's production testMatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An eligible first-time visitor now lands in the guided tour automatically. Eligibility is strict: no
dspack-studio-tour-donesentinel, no permalink hash (deep-linked visitors are never hijacked), and localStorage must accept writes — a write-probe precedes the auto-start, because a storage that reads fine but throws on write could never remember the dismissal and would re-launch the tour every visit. On any probe failure the behavior degrades to today's opt-in header button. Returning visitors are untouched;endTouralready persisted the sentinel on finish/skip, so the loop was complete.Owner-visible change: a first-time production visitor now starts in the tour (project-deletion, "argues back", event 3) instead of the auto-playing alive recipe recording. The alive first impression remains the returning-visitor experience. Universality later is a one-line pivot (drop the sentinel read).
The now-dead
tourOfferedstate and the "first time here?" button label are removed; the button reads "guided tour".Test strategy
Visitor history is now part of every e2e test's premise, so both Playwright configs split into two projects — no reliance on
test.useoverride precedence, and zero edits to existing specs:first-run— no storageState; runs only the newe2e/tour-first-run.spec.tsas a genuine first-time visitor.studio— seedsdspack-studio-tour-done=1via inlinestorageState(origin derived from the same baseURL expression, so a mismatch can't silently no-op); runs everything else as a returning visitor.Fail-first evidence (new spec against the old build)
(The passing one is deep-link immunity — the old code never auto-started, exactly as expected.)
After the change
npx playwright test— 93 passed, 4 skipped, 0 failed across both projects.pnpm -r typecheckandpnpm -r testgreen.🤖 Generated with Claude Code