Commit 630fc38
authored
feat(idef0): onboarding tour (Pillar B) — /onboard + zone-walk camera (#167)
## Summary
**PRD-038 Pillar B** — a deterministic, model-free guided tour that
walks a newcomer through the composed-map **zone by zone**. Data-driven
(reads only the already-loaded map document), NOT flow-dependent
(upstream flows reference nodes hidden inside collapsed megas — CM-01 —
so the tour is a zone-walk).
- **`tour-state.ts`** (pure, rune-free) — `buildTourStops` (placement
row-major order, `zones[]` fallback), reducers `start`/`next`(exits past
last)/`prev`/`goTo`/`exit`, `currentStop`. Honest narration:
`zone.description_ru` or nothing, never fabricated.
- **`OnboardTour.svelte`** — narration overlay (title + progress n/N +
zone label + RU narration + what's-inside + Exit/Prev/Next). Composes
`shared/ui` `Card`/`Badge`/`Button` (rule 24, no re-skin),
`role="dialog"` + focus, keyboard delegated to the view's single
handler, reduced-motion, dual-theme.
- **`ComposedMapView.svelte`** — `fitToRect` reusing the same fit-scale
clamp as `fitToView` (no second zoom controller); `$state` tour
controller pinned to level 0; camera centres on the current stop +
re-centres on reflow; Esc exits the tour before the Phase-1 reset;
live-only.
- **`routes/onboard/+page.svelte`** — thin route mounting the SAME
`ComposedMapView` widget (one widget, two hosts —
HomePage/DependencyGraph untouched → zero regression). Route auto-start
deferred `// TODO(onboard-route-autostart)`; the in-view "Start tour"
affordance ships regardless.
## Why
PRD-038's onboarding goal: "look at the map and understand the project
fast." The tour makes that a guided camera walk with narration. It
degrades gracefully on today's data and lights up richer (per-node
narration, project intro, explicit reading order) once the
**source-side** map-pack items land — tracked in
`docs/MAP-PACK-FINDINGS-FOR-MARKETPLACE.md` (CM-08/09/16). No web change
needed then.
## Test plan
- `npx vitest run src/widgets/composed-map src/entities/map` →
**186/186** (+31: `tour-state` + `OnboardTour.render` + `tour.render`).
- `npx svelte-check` → **0 errors** (2 pre-existing a11y warnings on the
map `<svg>`, unrelated).
- The build workflow's adversarial VERIFY phase died on a
StructuredOutput cap; verification was done directly by the orchestrator
(ran the suite + svelte-check, reviewed all 4 surfaces:
purity/determinism, fit-math reuse, rule-24, route isolation). RFC-033
active via EVID-095.
Refs: RFC-033, PRD-038, EVID-095
🤖 Generated with [Claude Code](https://claude.com/claude-code)11 files changed
Lines changed: 1783 additions & 5 deletions
File tree
- .forgeplan
- evidence
- prds
- rfcs
- template/src
- routes/onboard
- widgets/composed-map
- model
- ui
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| 572 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
0 commit comments