TheYuchen commited on
Commit
afdd2a9
·
1 Parent(s): ceee520

Restore the welcome tour, rewritten for the evidence workbench

Browse files

The Wave-P de-product pass deleted the product-era tour along with the
identity chrome. Reviewers see the paper rather than the site, so
onboarding affordances can return — but the old slides narrated a
feature tour of a system that no longer exists. This resurrects the
modal shell (keyboard nav, progress dots, first-visit localStorage
flag, backdrop dismiss) and rewrites all content around the current
narrative in five slides:

1 What this is — pipelines as seeded, archived, replayable
experiments ("evidence, not just output") + schematic SVG.
2 Compose & run — palette → canvas → Run; ribbons as circuit flow,
node faces as delta strip + CI bar.
3 Evidence accumulates — ×N replicates, lineage (hue=configuration,
dot area=shots), the narrowing funnel, precision-target stopping.
4 Compare & explore — Multiverse small multiples, A/B with honest
intervals ("overlap ≠ evidence").
5 Try it — demo archive first moves; "Open Multiverse" button;
?scenario=F0 pointer.

Copy stays ≤~60 words/slide in task language; domain terms carry
TipIcon glosses from lib/glossary.ts. Branding routes through
APP_NAME, so VITE_ANON builds show the neutral codename. The tour
auto-opens on first visit EXCEPT under ?scenario= boots (figure
states must not be covered), and a TopBar "Tour" button (restored
affordance) reopens it any time. Flag key is versioned (v2) so the
rewritten tour shows once even to pre-Wave-P visitors.

frontend/src/App.tsx CHANGED
@@ -15,6 +15,7 @@ import { MultiverseBoard } from "./components/MultiverseBoard";
15
  import { EvidenceTheater } from "./components/EvidenceTheater";
16
  import { CircuitPicker } from "./components/CircuitPicker";
17
  import { MobileDrawer } from "./components/MobileDrawer";
 
18
  import { activateScenario } from "./lib/scenarios";
19
 
20
  // Default + clamp bounds for the two side panels. The middle canvas flexes.
@@ -73,6 +74,10 @@ export default function App() {
73
  const [ready, setReady] = useState(false);
74
  const isDesktop = useIsDesktop();
75
 
 
 
 
 
76
  // Desktop pane widths — unused on mobile (drawers take over there).
77
  const [leftW, setLeftW] = useState<number>(() =>
78
  loadWidth(LS_LEFT, LEFT_DEFAULT, LEFT_MIN, LEFT_MAX),
@@ -273,6 +278,7 @@ export default function App() {
273
  mobile={!isDesktop}
274
  onOpenLeftDrawer={() => setLeftDrawerOpen(true)}
275
  onOpenRightDrawer={() => setRightDrawerOpen(true)}
 
276
  />
277
  {isDesktop ? (
278
  /* ===================== Desktop ===================== */
@@ -428,6 +434,7 @@ export default function App() {
428
  </MobileDrawer>
429
  </div>
430
  )}
 
431
  {!ready && (
432
  <div className="absolute inset-0 bg-canvas/80 flex items-center justify-center backdrop-blur">
433
  <div className="text-mute text-sm">Connecting to compute backend…</div>
 
15
  import { EvidenceTheater } from "./components/EvidenceTheater";
16
  import { CircuitPicker } from "./components/CircuitPicker";
17
  import { MobileDrawer } from "./components/MobileDrawer";
18
+ import { WelcomeTour, useFirstVisitTour } from "./components/WelcomeTour";
19
  import { activateScenario } from "./lib/scenarios";
20
 
21
  // Default + clamp bounds for the two side panels. The middle canvas flexes.
 
74
  const [ready, setReady] = useState(false);
75
  const isDesktop = useIsDesktop();
76
 
77
+ // Welcome tour: auto-opens on the first visit (skipped under
78
+ // ?scenario= boots), re-openable from the TopBar Tour button.
79
+ const [tourOpen, setTourOpen] = useFirstVisitTour();
80
+
81
  // Desktop pane widths — unused on mobile (drawers take over there).
82
  const [leftW, setLeftW] = useState<number>(() =>
83
  loadWidth(LS_LEFT, LEFT_DEFAULT, LEFT_MIN, LEFT_MAX),
 
278
  mobile={!isDesktop}
279
  onOpenLeftDrawer={() => setLeftDrawerOpen(true)}
280
  onOpenRightDrawer={() => setRightDrawerOpen(true)}
281
+ onOpenTour={() => setTourOpen(true)}
282
  />
283
  {isDesktop ? (
284
  /* ===================== Desktop ===================== */
 
434
  </MobileDrawer>
435
  </div>
436
  )}
437
+ <WelcomeTour open={tourOpen} onClose={() => setTourOpen(false)} />
438
  {!ready && (
439
  <div className="absolute inset-0 bg-canvas/80 flex items-center justify-center backdrop-blur">
440
  <div className="text-mute text-sm">Connecting to compute backend…</div>
frontend/src/components/TopBar.tsx CHANGED
@@ -1,5 +1,5 @@
1
  import { useApp } from "../lib/store";
2
- import { Activity, PanelLeft, PanelRight, Zap } from "lucide-react";
3
  import { APP_NAME, APP_TAGLINE } from "../lib/anon";
4
  import { ThemeSwitcher } from "./ThemeSwitcher";
5
  import { TipIcon } from "./TipIcon";
@@ -8,10 +8,12 @@ import { TipIcon } from "./TipIcon";
8
  * Top application bar — deliberately minimal since Wave P (the system
9
  * serves the paper, not a product): app name + tagline, the runtime
10
  * environment chip (qiskit/torch versions), the live-calibration
11
- * toggle when the server supports it, and the theme switcher. All
12
- * product-era surfaces (tour, sign-in, lab/paper/developer links,
13
- * funding popover) were removed — every remaining pixel serves a
14
- * paper claim or figure.
 
 
15
  *
16
  * Mobile: the two side panes are swapped for drawers, so we surface two
17
  * edge buttons (PanelLeft / PanelRight) for toggling them.
@@ -20,10 +22,12 @@ export function TopBar({
20
  mobile = false,
21
  onOpenLeftDrawer,
22
  onOpenRightDrawer,
 
23
  }: {
24
  mobile?: boolean;
25
  onOpenLeftDrawer?: () => void;
26
  onOpenRightDrawer?: () => void;
 
27
  }) {
28
  const health = useApp((s) => s.health);
29
  const useLiveIbm = useApp((s) => s.useLiveIbm);
@@ -123,6 +127,18 @@ export function TopBar({
123
  </div>
124
  </div>
125
  <div className="flex items-center gap-1 sm:gap-2 text-xs shrink-0">
 
 
 
 
 
 
 
 
 
 
 
 
126
  <ThemeSwitcher />
127
  {mobile && onOpenRightDrawer && (
128
  <button
 
1
  import { useApp } from "../lib/store";
2
+ import { Activity, Compass, PanelLeft, PanelRight, Zap } from "lucide-react";
3
  import { APP_NAME, APP_TAGLINE } from "../lib/anon";
4
  import { ThemeSwitcher } from "./ThemeSwitcher";
5
  import { TipIcon } from "./TipIcon";
 
8
  * Top application bar — deliberately minimal since Wave P (the system
9
  * serves the paper, not a product): app name + tagline, the runtime
10
  * environment chip (qiskit/torch versions), the live-calibration
11
+ * toggle when the server supports it, the welcome-tour reopener, and
12
+ * the theme switcher. The product-era surfaces (sign-in, lab/paper/
13
+ * developer links, funding popover) stay removed; the tour returned
14
+ * in 2026-07 — with double-blind treatment no longer needed,
15
+ * onboarding affordances are back, rewritten for the
16
+ * evidence-workbench system.
17
  *
18
  * Mobile: the two side panes are swapped for drawers, so we surface two
19
  * edge buttons (PanelLeft / PanelRight) for toggling them.
 
22
  mobile = false,
23
  onOpenLeftDrawer,
24
  onOpenRightDrawer,
25
+ onOpenTour,
26
  }: {
27
  mobile?: boolean;
28
  onOpenLeftDrawer?: () => void;
29
  onOpenRightDrawer?: () => void;
30
+ onOpenTour?: () => void;
31
  }) {
32
  const health = useApp((s) => s.health);
33
  const useLiveIbm = useApp((s) => s.useLiveIbm);
 
127
  </div>
128
  </div>
129
  <div className="flex items-center gap-1 sm:gap-2 text-xs shrink-0">
130
+ {onOpenTour && (
131
+ <button
132
+ type="button"
133
+ onClick={onOpenTour}
134
+ className="btn-ghost"
135
+ title="Replay the welcome tour — what this system is and how evidence accumulates"
136
+ aria-label="Open welcome tour"
137
+ >
138
+ <Compass className="w-3.5 h-3.5" />
139
+ <span className="hidden sm:inline">Tour</span>
140
+ </button>
141
+ )}
142
  <ThemeSwitcher />
143
  {mobile && onOpenRightDrawer && (
144
  <button
frontend/src/components/WelcomeTour.tsx ADDED
@@ -0,0 +1,536 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Multi-slide welcome tour (restored 2026-07, rewritten for the
3
+ * evidence-workbench system — the 2025 product-era tour this shell
4
+ * descends from narrated features that no longer exist).
5
+ *
6
+ * Shown automatically on the first visit (flag in localStorage; the
7
+ * key is versioned so this rewritten tour shows once even to visitors
8
+ * who saw the old one) and re-openable from the TopBar "Tour" button.
9
+ * Esc closes, arrow keys navigate. Copy rules: task language, ≤~60
10
+ * words per slide, one visual each; domain terms carry a TipIcon
11
+ * gloss from lib/glossary.ts. Under VITE_ANON the copy stays fully
12
+ * neutral because it only brands itself via APP_NAME.
13
+ *
14
+ * NOT auto-shown when a ?scenario= boot is active: scenarios exist to
15
+ * reproduce exact figure states and an overlay would cover them.
16
+ */
17
+
18
+ import { useEffect, useState } from "react";
19
+ import { ChevronLeft, ChevronRight, LayoutGrid, Play, X } from "lucide-react";
20
+ import { APP_NAME } from "../lib/anon";
21
+ import { gloss } from "../lib/glossary";
22
+ import { useApp } from "../lib/store";
23
+ import { TipIcon } from "./TipIcon";
24
+
25
+ const TOUR_FLAG = "quda-tour-seen-v2";
26
+
27
+ const ORDER = ["what", "compose", "evidence", "compare", "try"] as const;
28
+ type Slide = (typeof ORDER)[number];
29
+
30
+ export function WelcomeTour({
31
+ open,
32
+ onClose,
33
+ }: {
34
+ open: boolean;
35
+ onClose: () => void;
36
+ }) {
37
+ const [slide, setSlide] = useState<Slide>("what");
38
+
39
+ // Reset to the first slide every time the tour opens.
40
+ useEffect(() => {
41
+ if (open) setSlide("what");
42
+ }, [open]);
43
+
44
+ // Keyboard shortcuts: Esc closes, arrow keys navigate between slides.
45
+ useEffect(() => {
46
+ if (!open) return;
47
+ const h = (e: KeyboardEvent) => {
48
+ if (e.key === "Escape") dismiss();
49
+ if (e.key === "ArrowRight") goNext();
50
+ if (e.key === "ArrowLeft") goPrev();
51
+ };
52
+ window.addEventListener("keydown", h);
53
+ return () => window.removeEventListener("keydown", h);
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
55
+ }, [open, slide]);
56
+
57
+ if (!open) return null;
58
+
59
+ const idx = ORDER.indexOf(slide);
60
+ const isFirst = idx === 0;
61
+ const isLast = idx === ORDER.length - 1;
62
+ function goNext() {
63
+ if (!isLast) setSlide(ORDER[idx + 1]);
64
+ }
65
+ function goPrev() {
66
+ if (!isFirst) setSlide(ORDER[idx - 1]);
67
+ }
68
+ function dismiss() {
69
+ try {
70
+ localStorage.setItem(TOUR_FLAG, "1");
71
+ } catch {
72
+ /* ignore */
73
+ }
74
+ onClose();
75
+ }
76
+
77
+ return (
78
+ <div
79
+ className="fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-8"
80
+ role="dialog"
81
+ aria-modal="true"
82
+ aria-label={`${APP_NAME} welcome tour`}
83
+ >
84
+ {/* Backdrop */}
85
+ <div
86
+ className="absolute inset-0 bg-canvas/85 backdrop-blur-sm"
87
+ onClick={dismiss}
88
+ />
89
+ {/* Card */}
90
+ <div className="relative panel w-full max-w-3xl max-h-[92vh] flex flex-col overflow-hidden shadow-[0_40px_80px_-20px_rgba(0,0,0,0.6)]">
91
+ <button
92
+ onClick={dismiss}
93
+ aria-label="Close tour"
94
+ className="absolute top-3 right-3 z-10 w-8 h-8 rounded-md border border-edge bg-surface/80 text-mute hover:text-ink hover:border-edge transition flex items-center justify-center"
95
+ >
96
+ <X className="w-4 h-4" />
97
+ </button>
98
+
99
+ <div className="flex-1 overflow-y-auto">
100
+ {slide === "what" && <WhatSlide />}
101
+ {slide === "compose" && <ComposeSlide />}
102
+ {slide === "evidence" && <EvidenceSlide />}
103
+ {slide === "compare" && <CompareSlide />}
104
+ {slide === "try" && <TrySlide onDone={dismiss} />}
105
+ </div>
106
+
107
+ {/* Footer: progress dots + nav */}
108
+ <div className="h-14 shrink-0 border-t border-edge px-4 flex items-center justify-between bg-surface/40">
109
+ <div className="flex items-center gap-1.5">
110
+ {ORDER.map((s, i) => (
111
+ <button
112
+ key={s}
113
+ onClick={() => setSlide(s)}
114
+ aria-label={`Go to slide ${i + 1}`}
115
+ className={`h-1.5 rounded-full transition-all ${
116
+ s === slide ? "w-8 bg-accent" : "w-2 bg-edge hover:bg-mute"
117
+ }`}
118
+ />
119
+ ))}
120
+ <span className="ml-3 text-[11px] text-mute font-mono">
121
+ {idx + 1} / {ORDER.length}
122
+ </span>
123
+ </div>
124
+ <div className="flex items-center gap-2">
125
+ <button
126
+ onClick={goPrev}
127
+ disabled={isFirst}
128
+ className="btn disabled:opacity-30 disabled:cursor-not-allowed"
129
+ >
130
+ <ChevronLeft className="w-3.5 h-3.5" /> Back
131
+ </button>
132
+ {isLast ? (
133
+ <button onClick={dismiss} className="btn-primary">
134
+ <Play className="w-3.5 h-3.5" /> Get started
135
+ </button>
136
+ ) : (
137
+ <button onClick={goNext} className="btn-primary">
138
+ Next <ChevronRight className="w-3.5 h-3.5" />
139
+ </button>
140
+ )}
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ );
146
+ }
147
+
148
+ /** First-visit hook: pop the tour on initial load unless already seen
149
+ * or a ?scenario= boot owns the screen (figure states must not be
150
+ * covered by an overlay). */
151
+ export function useFirstVisitTour(): [boolean, (open: boolean) => void] {
152
+ const [open, setOpen] = useState(false);
153
+ useEffect(() => {
154
+ try {
155
+ const scenario = new URLSearchParams(window.location.search).get(
156
+ "scenario",
157
+ );
158
+ if (!scenario && !localStorage.getItem(TOUR_FLAG)) setOpen(true);
159
+ } catch {
160
+ /* ignore */
161
+ }
162
+ }, []);
163
+ return [open, setOpen];
164
+ }
165
+
166
+ /* ============================== slides =============================== */
167
+
168
+ /** Shared slide scaffold: kicker + title + ≤60-word body, visual below. */
169
+ function SlideShell({
170
+ kicker,
171
+ title,
172
+ children,
173
+ visual,
174
+ }: {
175
+ kicker: string;
176
+ title: React.ReactNode;
177
+ children: React.ReactNode;
178
+ visual: React.ReactNode;
179
+ }) {
180
+ return (
181
+ <div className="p-6 sm:p-8">
182
+ <div className="text-xs uppercase tracking-wider text-mute mb-1">
183
+ {kicker}
184
+ </div>
185
+ <h2 className="text-xl sm:text-2xl font-semibold text-ink mb-2 leading-tight">
186
+ {title}
187
+ </h2>
188
+ <div className="text-sm text-ink/80 leading-relaxed max-w-xl">
189
+ {children}
190
+ </div>
191
+ <div className="mt-5 flex justify-center">{visual}</div>
192
+ </div>
193
+ );
194
+ }
195
+
196
+ /* tokens for the inline SVGs — all colors via theme variables */
197
+ const C = {
198
+ ink: "rgb(var(--color-ink))",
199
+ mute: "rgb(var(--color-mute))",
200
+ edge: "rgb(var(--color-edge))",
201
+ surface: "rgb(var(--color-surfaceAlt))",
202
+ accent: "rgb(var(--color-accent))",
203
+ accent2: "rgb(var(--color-accent2))",
204
+ ok: "rgb(var(--color-ok))",
205
+ warn: "rgb(var(--color-warn))",
206
+ };
207
+
208
+ /** Slide 1 — pipeline → seeded run → archive, as one schematic. */
209
+ function WhatSlide() {
210
+ return (
211
+ <SlideShell
212
+ kicker="What this is"
213
+ title={
214
+ <>
215
+ Welcome to <span className="text-accent">{APP_NAME}</span>
216
+ </>
217
+ }
218
+ visual={<WhatSVG />}
219
+ >
220
+ <p>
221
+ Compose quantum pipelines from blocks — then treat every run as an
222
+ experiment, not just output. Each run draws a recorded seed
223
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("seed")} />,
224
+ is archived in this browser, and replays bit-exactly. Evidence you
225
+ can revisit, compare, and stand behind.
226
+ </p>
227
+ </SlideShell>
228
+ );
229
+ }
230
+
231
+ function WhatSVG() {
232
+ return (
233
+ <svg
234
+ width="440"
235
+ height="96"
236
+ viewBox="0 0 440 96"
237
+ role="img"
238
+ aria-label="Schematic: a pipeline of blocks runs with a recorded seed and lands in a replayable archive"
239
+ >
240
+ {/* pipeline */}
241
+ {[0, 1, 2].map((i) => (
242
+ <rect
243
+ key={i}
244
+ x={16 + i * 42}
245
+ y={34}
246
+ width={28}
247
+ height={28}
248
+ rx={6}
249
+ fill={C.surface}
250
+ stroke={i === 1 ? C.accent2 : C.edge}
251
+ strokeWidth={1.5}
252
+ />
253
+ ))}
254
+ <line x1={44} y1={48} x2={58} y2={48} stroke={C.mute} strokeWidth={1.5} />
255
+ <line x1={86} y1={48} x2={100} y2={48} stroke={C.mute} strokeWidth={1.5} />
256
+ <text x={30 + 42} y={87} fontSize={10} textAnchor="middle" fill={C.mute}>
257
+ pipeline
258
+ </text>
259
+ {/* arrow to run */}
260
+ <path d="M 150 48 h 34 m 0 0 l -6 -4 m 6 4 l -6 4" stroke={C.mute} strokeWidth={1.5} fill="none" />
261
+ {/* seeded run */}
262
+ <circle cx={222} cy={48} r={17} fill="none" stroke={C.accent} strokeWidth={1.5} />
263
+ <path d="M 217 41 l 12 7 l -12 7 z" fill={C.accent} />
264
+ <text x={222} y={87} fontSize={10} textAnchor="middle" fill={C.mute}>
265
+ run · seed 42
266
+ </text>
267
+ {/* arrow to archive */}
268
+ <path d="M 252 48 h 34 m 0 0 l -6 -4 m 6 4 l -6 4" stroke={C.mute} strokeWidth={1.5} fill="none" />
269
+ {/* archive: stacked cards, one replayable */}
270
+ {[0, 1, 2].map((i) => (
271
+ <rect
272
+ key={i}
273
+ x={300 + i * 5}
274
+ y={30 + i * 6}
275
+ width={80}
276
+ height={30}
277
+ rx={5}
278
+ fill={C.surface}
279
+ stroke={C.edge}
280
+ strokeWidth={1.2}
281
+ />
282
+ ))}
283
+ <circle cx={322} cy={57} r={4} fill={C.accent} />
284
+ <circle cx={336} cy={57} r={4} fill={C.accent2} />
285
+ <circle cx={350} cy={57} r={3} fill={C.ok} />
286
+ <text x={345} y={87} fontSize={10} textAnchor="middle" fill={C.mute}>
287
+ archived · replayable
288
+ </text>
289
+ </svg>
290
+ );
291
+ }
292
+
293
+ /** Slide 2 — ribbons + node faces. */
294
+ function ComposeSlide() {
295
+ return (
296
+ <SlideShell
297
+ kicker="Compose & run"
298
+ title="The pipeline is the picture"
299
+ visual={<ComposeSVG />}
300
+ >
301
+ <p>
302
+ Drag blocks from the palette, wire them (or Auto-connect), press{" "}
303
+ <span className="kbd">Run pipeline</span>. Ribbons carry the circuit
304
+ between blocks — a shrinking ribbon means a step compressed it (width
305
+ tracks gate count
306
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("gates")} />).
307
+ Each block's face shows what it changed (delta strip) and how sure
308
+ the estimate is (interval bar
309
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("ci")} />).
310
+ </p>
311
+ </SlideShell>
312
+ );
313
+ }
314
+
315
+ function ComposeSVG() {
316
+ return (
317
+ <svg
318
+ width="440"
319
+ height="110"
320
+ viewBox="0 0 440 110"
321
+ role="img"
322
+ aria-label="Two pipeline blocks joined by a ribbon that narrows after a compressing step; the block face shows a delta strip and an interval bar"
323
+ >
324
+ {/* left block */}
325
+ <rect x={20} y={26} width={92} height={56} rx={8} fill={C.surface} stroke={C.edge} strokeWidth={1.5} />
326
+ <text x={66} y={44} fontSize={10} textAnchor="middle" fill={C.ink}>circuit in</text>
327
+ <rect x={32} y={54} width={68} height={6} rx={2} fill={C.edge} />
328
+ {/* tapering ribbon: thick -> thin (the step shrank the circuit) */}
329
+ <path d="M 112 42 C 160 42 180 47 228 47 L 228 61 C 180 61 160 66 112 66 Z" fill={C.ok} opacity={0.35} />
330
+ {/* right block with delta strip + CI bar */}
331
+ <rect x={228} y={26} width={112} height={56} rx={8} fill={C.surface} stroke={C.accent2} strokeWidth={1.5} />
332
+ <text x={284} y={42} fontSize={10} textAnchor="middle" fill={C.ink}>pruning step</text>
333
+ {/* delta strip: bars diverging around a zero axis */}
334
+ <line x1={252} y1={56} x2={316} y2={56} stroke={C.edge} strokeWidth={1} />
335
+ <rect x={258} y={52} width={10} height={4} fill={C.ok} />
336
+ <rect x={274} y={56} width={7} height={4} fill={C.warn} />
337
+ <rect x={292} y={52} width={13} height={4} fill={C.ok} />
338
+ {/* CI bar */}
339
+ <rect x={252} y={68} width={64} height={5} rx={2} fill={C.edge} opacity={0.5} />
340
+ <rect x={270} y={68} width={22} height={5} rx={2} fill={C.accent} opacity={0.65} />
341
+ <line x1={281} y1={66} x2={281} y2={75} stroke={C.accent} strokeWidth={2} />
342
+ <text x={66} y={100} fontSize={10} textAnchor="middle" fill={C.mute}>ribbon = circuit flowing</text>
343
+ <text x={284} y={100} fontSize={10} textAnchor="middle" fill={C.mute}>face = change + certainty</text>
344
+ </svg>
345
+ );
346
+ }
347
+
348
+ /** Slide 3 — replicates, lineage, funnel, precision target. */
349
+ function EvidenceSlide() {
350
+ return (
351
+ <SlideShell
352
+ kicker="Evidence accumulates"
353
+ title="One run is one draw — collect more"
354
+ visual={<EvidenceSVG />}
355
+ >
356
+ <p>
357
+ Run ×N replicates
358
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("replicate")} />{" "}
359
+ and History becomes a lineage: hue = configuration
360
+ <TipIcon
361
+ className="mx-0.5 align-text-top"
362
+ hint={gloss("configuration")}
363
+ />
364
+ , dot size = shots
365
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("shots")} /> of
366
+ evidence. Inside a run, the interval narrows as shot batches stream
367
+ in — the funnel. Set a precision target
368
+ <TipIcon
369
+ className="mx-0.5 align-text-top"
370
+ hint={gloss("precisionTarget")}
371
+ />{" "}
372
+ and the run stops itself once it is precise enough.
373
+ </p>
374
+ </SlideShell>
375
+ );
376
+ }
377
+
378
+ function EvidenceSVG() {
379
+ // funnel: intervals narrowing toward a target corridor + lineage dots
380
+ const rows = [
381
+ { w: 150, o: 0.2 },
382
+ { w: 104, o: 0.32 },
383
+ { w: 76, o: 0.45 },
384
+ { w: 58, o: 0.6 },
385
+ { w: 46, o: 0.85 },
386
+ ];
387
+ return (
388
+ <svg
389
+ width="440"
390
+ height="112"
391
+ viewBox="0 0 440 112"
392
+ role="img"
393
+ aria-label="Left: an evidence funnel of stacked intervals narrowing into a target corridor. Right: a run-history lineage of dots colored by configuration and sized by evidence"
394
+ >
395
+ {/* funnel */}
396
+ {rows.map((r, i) => (
397
+ <rect
398
+ key={i}
399
+ x={130 - r.w / 2}
400
+ y={14 + i * 13}
401
+ width={r.w}
402
+ height={5}
403
+ rx={2.5}
404
+ fill={C.accent}
405
+ opacity={r.o}
406
+ />
407
+ ))}
408
+ {/* target corridor */}
409
+ <line x1={130 - 34} y1={8} x2={130 - 34} y2={84} stroke={C.warn} strokeWidth={1.2} strokeDasharray="3 3" />
410
+ <line x1={130 + 34} y1={8} x2={130 + 34} y2={84} stroke={C.warn} strokeWidth={1.2} strokeDasharray="3 3" />
411
+ <text x={130} y={101} fontSize={10} textAnchor="middle" fill={C.mute}>
412
+ funnel narrows → stop at ±2pp
413
+ </text>
414
+ {/* lineage */}
415
+ <line x1={300} y1={12} x2={300} y2={84} stroke={C.edge} strokeWidth={1.5} />
416
+ <circle cx={300} cy={20} r={4} fill={C.accent} />
417
+ <circle cx={300} cy={38} r={6} fill={C.accent} />
418
+ <circle cx={300} cy={58} r={7} fill={C.accent} />
419
+ <circle cx={300} cy={58} r={10.5} fill="none" stroke={C.accent} strokeWidth={1.2} />
420
+ <circle cx={324} cy={78} r={5} fill={C.accent2} />
421
+ <path d="M 324 73 C 324 64 300 70 300 64" fill="none" stroke={C.accent2} strokeWidth={1.2} />
422
+ <text x={310} y={101} fontSize={10} textAnchor="middle" fill={C.mute}>
423
+ lineage: hue = config · size = shots
424
+ </text>
425
+ </svg>
426
+ );
427
+ }
428
+
429
+ /** Slide 4 — multiverse + honest A/B. */
430
+ function CompareSlide() {
431
+ return (
432
+ <SlideShell
433
+ kicker="Compare & explore"
434
+ title="Every configuration, side by side"
435
+ visual={<CompareSVG />}
436
+ >
437
+ <p>
438
+ The Multiverse board gives each configuration a card: pipeline strip,
439
+ outcome dots, Δ versus the baseline. Pick any two runs for an A/B
440
+ comparison — estimates render as 95% intervals
441
+ <TipIcon className="mx-0.5 align-text-top" hint={gloss("ci")} />, and
442
+ the verdict stays honest: overlapping intervals are{" "}
443
+ <span className="text-ink font-medium">not</span> evidence of a
444
+ difference.
445
+ </p>
446
+ </SlideShell>
447
+ );
448
+ }
449
+
450
+ function CompareSVG() {
451
+ return (
452
+ <svg
453
+ width="440"
454
+ height="112"
455
+ viewBox="0 0 440 112"
456
+ role="img"
457
+ aria-label="Left: two multiverse cards with outcome dot strips. Right: two overlapping confidence intervals labeled 'overlap is not evidence'"
458
+ >
459
+ {/* two config cards */}
460
+ {[0, 1].map((i) => {
461
+ const y = 14 + i * 44;
462
+ const hue = i === 0 ? C.accent : C.accent2;
463
+ return (
464
+ <g key={i}>
465
+ <rect x={22} y={y} width={168} height={36} rx={6} fill={C.surface} stroke={hue} strokeWidth={1.2} opacity={0.9} />
466
+ {[0, 1, 2, 3].map((j) => (
467
+ <rect key={j} x={32 + j * 14} y={y + 8} width={8} height={8} rx={2} fill={j === 2 && i === 1 ? C.accent2 : C.mute} opacity={0.75} />
468
+ ))}
469
+ <line x1={100} y1={y + 24} x2={180} y2={y + 24} stroke={C.edge} strokeWidth={1} />
470
+ {[0.3, 0.45, 0.55, 0.7].map((v, j) => (
471
+ <circle key={j} cx={100 + v * 80} cy={y + 24} r={2.5} fill={hue} opacity={0.4 + j * 0.18} />
472
+ ))}
473
+ </g>
474
+ );
475
+ })}
476
+ <text x={106} y={106} fontSize={10} textAnchor="middle" fill={C.mute}>
477
+ multiverse: one card per configuration
478
+ </text>
479
+ {/* A/B intervals */}
480
+ <line x1={252} y1={70} x2={420} y2={70} stroke={C.edge} strokeWidth={1} />
481
+ <rect x={274} y={34} width={78} height={7} rx={3.5} fill={C.accent} opacity={0.5} />
482
+ <line x1={313} y1={31} x2={313} y2={44} stroke={C.accent} strokeWidth={2} />
483
+ <rect x={318} y={52} width={78} height={7} rx={3.5} fill={C.warn} opacity={0.5} />
484
+ <line x1={357} y1={49} x2={357} y2={62} stroke={C.warn} strokeWidth={2} />
485
+ <text x={336} y={91} fontSize={10} textAnchor="middle" fill={C.mute}>
486
+ A/B: overlap ≠ evidence
487
+ </text>
488
+ </svg>
489
+ );
490
+ }
491
+
492
+ /** Slide 5 — concrete first moves against the preloaded demo archive. */
493
+ function TrySlide({ onDone }: { onDone: () => void }) {
494
+ const setWorkspaceMode = useApp((s) => s.setWorkspaceMode);
495
+ return (
496
+ <SlideShell
497
+ kicker="Try it"
498
+ title="A demo archive is already loaded"
499
+ visual={
500
+ <button
501
+ type="button"
502
+ className="btn-primary"
503
+ onClick={() => {
504
+ setWorkspaceMode("multiverse");
505
+ onDone();
506
+ }}
507
+ >
508
+ <LayoutGrid className="w-3.5 h-3.5" /> Open the Multiverse board
509
+ </button>
510
+ }
511
+ >
512
+ <p className="mb-2">
513
+ Real seeded runs ship with your first visit, so the evidence views
514
+ have something to show. Three good first moves:
515
+ </p>
516
+ <ol className="list-decimal list-inside space-y-1 text-[13px]">
517
+ <li>
518
+ Open <span className="text-ink font-medium">Multiverse</span> —
519
+ every demo configuration side by side.
520
+ </li>
521
+ <li>
522
+ In <span className="text-ink font-medium">Evidence → History</span>,
523
+ press ▶ on a run: same seed, same numbers, bit-exact.
524
+ </li>
525
+ <li>
526
+ Set <span className="kbd">target: ±2pp</span> in the toolbar and
527
+ Run — watch the funnel stop early in the Evidence Theater.
528
+ </li>
529
+ </ol>
530
+ <p className="mt-2 text-[11px] text-mute">
531
+ Prefer a guided start? Append <span className="font-mono">?scenario=F0</span>{" "}
532
+ to the URL for the streaming-evidence teaser.
533
+ </p>
534
+ </SlideShell>
535
+ );
536
+ }