Skip to content

feat(tour): add an app tour that walks through every part of the window - #46

Merged
THPubs merged 4 commits into
devfrom
feat/app-tour
Nov 1, 2026
Merged

THPubs merged 4 commits into
devfrom
feat/app-tour

Conversation

@THPubs

@THPubs THPubs commented Nov 1, 2026

Copy link
Copy Markdown
Member

What changed

Kriyon now has an app tour. A spotlight glides from one part of the window to the next, and a card beside it says what that part is for. It has 14 steps: welcome, the sidebar, starting a session (⌘N), Command center and Prompts, the Structured / Session / Files tabs (including editing files yourself in Files), the composer, Project terminals, the Details, Activity and Notes tabs (each step opens its tab), the command palette (⌘K), Focus mode, Settings (⌘,), and a closing step.

  • It opens on its own once for anyone who has not seen it. That includes people updating from a build before the tour existed. Finishing or skipping saves layout.tourSeen, so it does not come back on its own.
  • Anyone can replay it from Help → Kriyon Tour (a new macOS Help menu), Take the app tour in the command palette, or Settings → Layout → Take the tour.
  • Keys: → or Enter for next, ← for back, Esc to skip. The keys are caught before a focused terminal sees them.
  • A step whose part is not on screen (no session open, a collapsed sidebar) shows its card in the middle of the window instead.
  • The motion (spotlight glide, pulsing ring, card slide, step fade) follows the system's reduced-motion setting.
  • When the tour ends, the Details rail goes back to the tab that was open before it.

Why

New people see a terminal and a sidebar and find the rest of the window by accident: worktree sessions, the Command center, the three session views, Project terminals, Activity, Notes and the palette. People who already use Kriyon also wanted a way to see what they missed.

The tour is built in-house rather than on a library. driver.js and react-joyride bring their own styles, which would fight the theme seam (ADR 0007) across the twenty themes. Shepherd.js and Intro.js need a paid licence for commercial use, which does not suit an Apache-2.0 app. ADR 0054 records the decision. "App tour" is added to the glossary.

How I tested it

  • New tests:
    • src/tour/placement.test.ts: which side the card goes and how it stays inside the window.
    • src/state/tour.test.ts: walking the steps, finishing, starting only when unseen, and the tab steps.
    • src/tour/AppTour.test.tsx: buttons, keys, the spotlight with a target present and absent, and the delayed first-run start.
    • Persistence tests for tourSeen, plus tests for the Help menu event, the palette item and the Settings button.
  • Ran the full frontend, node and Rust suites, rustfmt and clippy. All pass.
  • Checked by hand in a smoke build: the tour opens on its own with an unseen layout, the steps light the right parts, and the card buttons fit after a layout fix.

Checklist

  • The PR targets dev.
  • I wrote or updated tests, and pnpm check passes.
  • I read and tested every line, and I can explain it in review.
  • AI tools wrote most of this change. (Tick if true. See Using AI tools.)

🤖 Generated with Claude Code

THPubs and others added 4 commits November 1, 2026 10:33
A spotlight glides from one part of the window to the next while a card
says what each part is for: the sidebar, starting a session, Command
center and Prompts, the three session views (including editing files in
Files), the composer, Project terminals, the Details, Activity and Notes
tabs, the command palette, Focus mode and Settings.

It opens on its own once for anyone who has not seen it, including people
updating from a build before the tour existed. Finishing or skipping saves
layout.tourSeen. Anyone can replay it from Help -> Kriyon Tour, the
command palette or Settings -> Layout.

The tour is built in-house rather than on a library so it follows every
theme through the existing tokens (ADR 0054).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tour's welcome card now opens with an illustration of the Visor
mascot at a mission-control desk. The picture runs edge to edge across
the top of the card, fades into it at the bottom and eases in with a
slow zoom. The welcome card is wider so the picture has room, and the
card slides back to its usual width on the next step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
While the tour was up, Tab could move focus out of the card to controls
under the scrim, so Enter clicked hidden buttons and typing reached the
terminal. App shortcuts (⌘K, ⌘⇧K, ⌘, and others) still ran and opened
their views behind the tour, where they took keys out of sight. When the
tour ended, focus was left on nothing.

Overlay's focus trap is now a shared useFocusTrap hook, and the tour card
uses it: focus starts on Next, Tab wraps inside the card, and focus goes
back where it was when the tour ends. The hook only gives focus back when
it still holds it, so a dialog that opened on top (About, from the app
menu mid-tour) keeps focus when the tour ends. The tour's capture-phase
key handler now also holds every ⌘ or Ctrl shortcut until it ends. ADR
0054 now describes the keyboard handling the code actually does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The card re-spelled every property of the overlayPanel() recipe. It now
spreads the recipe and sets only its own animation, placement and size,
so a change to the floating panel look reaches the tour card too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@THPubs

THPubs commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Review and fix — pass 1

Full review of the PR, then fixes on top (8c0daa8..e8ee580). 20 candidates scored, 4 kept and fixed; a re-review of the fixes found 1 more, also fixed. All checks green.

  • Tab and focus now stay in the tour card, and focus goes back when it ends
  • App shortcuts are held while the tour is open
  • Focus is left with a dialog that opened during the tour
  • The tour card spreads the shared overlay panel style
  • ADR 0054 describes the keyboard handling the code does

Fixed this pass

  • src/tour/AppTour.tsx:352 — Trap Tab inside the tour card and restore focus after
  • src/tour/AppTour.tsx:311 — Claim global shortcuts while the tour is open
  • src/tour/AppTour.tsx:64 — Spread overlayPanel() into the tour card style
  • docs/adr/0054-app-tour.md:45 — Fix the ADR claim that Enter is caught in capture
  • src/tour/AppTour.tsx:301 — Stop the tour focus restore landing behind an open About

Checked by 4 finders (correctness, processes & lifecycle, tests, boundary & safety, contract, public text, architecture: step 5 re-check of the fixes, step 5 re-check of the fixes) · architecture review · scorer: 22 scored, 5 kept.


Ready to merge, as far as this review can see. Nothing is open from this pass or any pass before it.

@THPubs
THPubs merged commit 5e260a5 into dev Nov 1, 2026
13 checks passed
@THPubs THPubs mentioned this pull request Nov 1, 2026
3 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant