From bbd6607968d26db9f56075beebc8808873f98077 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 19 Aug 2026 00:43:06 -0500 Subject: [PATCH] docs(tour): document navigating steps and the handle vocabulary --- website/docs/reference/tools-reference.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/website/docs/reference/tools-reference.md b/website/docs/reference/tools-reference.md index 664d8c3ab9..35b4ff466e 100644 --- a/website/docs/reference/tools-reference.md +++ b/website/docs/reference/tools-reference.md @@ -213,6 +213,18 @@ To give an element a durable handle of your own, mark it up:
…
``` +Handles are applied at the **primitive**, not the call site, so one edit names every instance. The ones that already exist: + +| Handle | What it names | +|---|---| +| `overlay-nav` | the left nav of any route overlay (settings, cron, profiles, agents) | +| `nav-` | one row in that nav — `nav-models`, `nav-appearance`, … | +| `field-` | one settings row, by its config key — `field-model`, `field-provider`, … | +| `page-tabs` | the filter tabs on any `PageSearchShell` page (artifacts, skills, …) | +| `artifact-card` | an artifact card in the grid | + +When adding a surface, tag its shared primitive the same way rather than tagging screens one by one — that keeps the tour vocabulary small and stops selectors from rotting. + The same engine backs curated (non-agent) tours in the desktop app, so a feature can ship its own walkthrough: ```ts @@ -224,6 +236,17 @@ startTour([ ]) ``` +A step can also move the app to where its target lives, and the tour puts things back when it ends: + +```ts +startTour([ + { navigate: '/artifacts', selector: '[data-tour="page-tabs"]', title: 'Filters', text: '…' }, + { pane: 'sessions', selector: '[data-slot="sidebar"]', title: 'Sessions', text: '…' } +]) +``` + +`navigate` takes a route path and `pane` a desktop pane name. Both run as the step is entered, targets that mount late are waited for, and closing the tour — by any route, including Esc — returns to wherever it started. + Pass `'preview'` as the second argument to run against the page in the preview pane instead of the app. ## `todo` toolset