TheYuchen commited on
Commit
b54486e
·
1 Parent(s): 02aa1f6

Evidence tabs = the three scales (three-scales IA)

Browse files

Tab labels now mirror the paper narrative exactly: This run (scale 1,
within a run), This configuration (scale 2, replicates of one
configuration), Between configurations (scale 3). Internal ids
(current/history/compare) stay STABLE — scenario uiState, the
pendingEvidenceTab bridge and figure-export provenance key on them;
comments in ResultsPane + scenarios.ts pin the mapping. Tooltips are
one line per scale. The toolbar Theater button is gone: the theater is
This-run's expanded mode, so its entry affordance moved onto the
funnel card ("expand · theater", marker open-theater unchanged);
auto-open on streaming unchanged. This-configuration gains a compact
scale line ("every archived run; same-color runs are replicates of
one configuration") above the legend key. Every user-visible
cross-reference ("History tab", "Compare tab", "sends two cards to
Compare"…) updated coherently.

frontend/src/components/FlowCanvas.tsx CHANGED
@@ -21,7 +21,6 @@ import {
21
  AlertTriangle,
22
  Box,
23
  Check,
24
- Clapperboard,
25
  Code2,
26
  Link2,
27
  Loader2,
@@ -1309,21 +1308,11 @@ export function FlowCanvas() {
1309
  <option value={0.02}>±2pp</option>
1310
  <option value={0.01}>±1pp</option>
1311
  </select>
1312
- {/* Evidence theater reopen: the theater auto-opens when a
1313
- sampled step starts streaming (dismissable); this button
1314
- brings it back — also for archived/replayed runs, whose
1315
- persisted per-batch trace renders the same funnel. */}
1316
- <button
1317
- type="button"
1318
- data-marker="evidence-theater-open"
1319
- onClick={() => useApp.getState().setTheaterOpen(true)}
1320
- className="btn hidden md:inline-flex"
1321
- title="Evidence theater — a large live view of the 95% interval narrowing as shot batches stream in (opens by itself when a run streams; reopen it here)"
1322
- aria-label="Open evidence theater"
1323
- >
1324
- <Clapperboard className="w-3.5 h-3.5" />
1325
- <span className="hidden lg:inline">Theater</span>
1326
- </button>
1327
  {/* cost-estimate chip: what will pressing Run cost, judged
1328
  from this browser's own archived step timings. Sits next
1329
  to Run so the price tag is read together with the
 
21
  AlertTriangle,
22
  Box,
23
  Check,
 
24
  Code2,
25
  Link2,
26
  Loader2,
 
1308
  <option value={0.02}>±2pp</option>
1309
  <option value={0.01}>±1pp</option>
1310
  </select>
1311
+ {/* Evidence theater: NO toolbar button. The theater is the
1312
+ This-run tab's expanded mode (three-scales IA), so its
1313
+ reopen affordance lives on the funnel card itself
1314
+ (results/cards.tsx, marker open-theater); it still
1315
+ auto-opens when a sampled step starts streaming. */}
 
 
 
 
 
 
 
 
 
 
1316
  {/* cost-estimate chip: what will pressing Run cost, judged
1317
  from this browser's own archived step timings. Sits next
1318
  to Run so the price tag is read together with the
frontend/src/components/MultiverseBoard.tsx CHANGED
@@ -498,7 +498,7 @@ export function MultiverseBoard() {
498
  <span className="min-w-0">
499
  Each card is one configuration — its pipeline, its outcome
500
  distribution, Δ vs the baseline card. Open rebuilds it; A/B
501
- sends two cards to Compare.
502
  </span>
503
  <button
504
  type="button"
 
498
  <span className="min-w-0">
499
  Each card is one configuration — its pipeline, its outcome
500
  distribution, Δ vs the baseline card. Open rebuilds it; A/B
501
+ sends two cards to Between configurations.
502
  </span>
503
  <button
504
  type="button"
frontend/src/components/ResultsPane.tsx CHANGED
@@ -31,6 +31,15 @@ import { FigureExportButton } from "./FigureExportButton";
31
  import { TipIcon } from "./TipIcon";
32
  import { gloss } from "../lib/glossary";
33
 
 
 
 
 
 
 
 
 
 
34
  type EvidenceTab = "current" | "history" | "compare";
35
 
36
  export function ResultsPane({ onCollapse }: { onCollapse?: () => void } = {}) {
@@ -106,7 +115,7 @@ export function ResultsPane({ onCollapse }: { onCollapse?: () => void } = {}) {
106
  run.seed_mode === "pinned"
107
  ? `Replayed with pinned root seed ${run.root_seed} — stochastic steps reproduce exactly.`
108
  : run.root_seed != null
109
- ? `Fresh draw. Recorded root seed ${run.root_seed} — replay it any time from the History tab.`
110
  : "Served from the precomputed cache — no seed was drawn for this response."
111
  }
112
  >
@@ -148,21 +157,21 @@ export function ResultsPane({ onCollapse }: { onCollapse?: () => void } = {}) {
148
  aria-label="Evidence views"
149
  >
150
  <TabButton
151
- label="Current run"
152
- title="One card per pipeline step of the run on the canvas — what each step did, with uncertainty where the result is sampled"
153
  active={tab === "current"}
154
  onClick={() => setTab("current")}
155
  />
156
  <TabButton
157
- label="History"
158
- title="Every archived run in this browser, drawn as a lineage — restore, replay (exact numbers), delete, or tick two to compare"
159
  active={tab === "history"}
160
  onClick={() => setTab("history")}
161
  badge={archived > 0 ? archived : null}
162
  />
163
  <TabButton
164
- label="Compare"
165
- title="Two selected runs side by side: configuration diff, fidelity as 95% intervals, step-aligned signatures"
166
  active={tab === "compare"}
167
  onClick={() => setTab("compare")}
168
  badge={compareIds.length > 0 ? compareIds.length : null}
@@ -229,8 +238,9 @@ function TabButton({
229
  );
230
  }
231
 
232
- /** Compare tab, fewer than two runs selected: the checkboxes live in
233
- * the History tab, so point there instead of rendering nothing. */
 
234
  function CompareEmptyHint({
235
  selected,
236
  onGoToHistory,
@@ -248,11 +258,11 @@ function CompareEmptyHint({
248
  className="text-accent hover:underline"
249
  onClick={onGoToHistory}
250
  >
251
- History tab
252
  </button>{" "}
253
  — tick two runs there and this panel lays out their configuration
254
- diff, fidelity as confidence intervals, and step-aligned
255
- transformation signatures.
256
  {selected === 1 && (
257
  <span className="text-ink"> One run selected — pick one more.</span>
258
  )}
@@ -282,8 +292,8 @@ function EmptyHint() {
282
  </p>
283
  <p className="mt-2 text-[11px]">
284
  Every run is archived with its seed — replay, fork, and compare
285
- runs from the <span className="text-ink">History</span> tab;
286
- sampled results show confidence intervals, not bare numbers.
287
  </p>
288
  </div>
289
  );
 
31
  import { TipIcon } from "./TipIcon";
32
  import { gloss } from "../lib/glossary";
33
 
34
+ // Internal tab ids are STABLE KEYS — they ride in scenario uiState
35
+ // (lib/scenarios.ts evidenceTab), the store bridge (pendingEvidenceTab)
36
+ // and figure-export view names/provenance ("evidence-current" etc.), so
37
+ // renaming them would orphan recorded figures and scenario URLs. The
38
+ // user-visible LABELS carry the narrative instead: the three tabs ARE
39
+ // the paper's three scales of sequential evidence —
40
+ // current → "This run" (scale 1: within a run)
41
+ // history → "This configuration" (scale 2: across replicates)
42
+ // compare → "Between configurations" (scale 3: between configurations)
43
  type EvidenceTab = "current" | "history" | "compare";
44
 
45
  export function ResultsPane({ onCollapse }: { onCollapse?: () => void } = {}) {
 
115
  run.seed_mode === "pinned"
116
  ? `Replayed with pinned root seed ${run.root_seed} — stochastic steps reproduce exactly.`
117
  : run.root_seed != null
118
+ ? `Fresh draw. Recorded root seed ${run.root_seed} — replay it any time from the “This configuration” tab.`
119
  : "Served from the precomputed cache — no seed was drawn for this response."
120
  }
121
  >
 
157
  aria-label="Evidence views"
158
  >
159
  <TabButton
160
+ label="This run"
161
+ title="Scale 1 — steer a single estimate: one card per pipeline step; the funnel card expands into the Evidence Theater"
162
  active={tab === "current"}
163
  onClick={() => setTab("current")}
164
  />
165
  <TabButton
166
+ label="This configuration"
167
+ title="Scale 2 — pool replicates of one configuration: every archived run as a lineage; restore, replay (exact numbers), tick two to compare"
168
  active={tab === "history"}
169
  onClick={() => setTab("history")}
170
  badge={archived > 0 ? archived : null}
171
  />
172
  <TabButton
173
+ label="Between configurations"
174
+ title="Scale 3 — compare configurations: two runs side by side as 95% intervals, plus the difference funnel (sequential A/B)"
175
  active={tab === "compare"}
176
  onClick={() => setTab("compare")}
177
  badge={compareIds.length > 0 ? compareIds.length : null}
 
238
  );
239
  }
240
 
241
+ /** Between-configurations tab, fewer than two runs selected: the
242
+ * checkboxes live in the This-configuration tab, so point there
243
+ * instead of rendering nothing. */
244
  function CompareEmptyHint({
245
  selected,
246
  onGoToHistory,
 
258
  className="text-accent hover:underline"
259
  onClick={onGoToHistory}
260
  >
261
+ “This configuration” tab
262
  </button>{" "}
263
  — tick two runs there and this panel lays out their configuration
264
+ diff, fidelity as confidence intervals, step-aligned
265
+ transformation signatures, and the difference funnel.
266
  {selected === 1 && (
267
  <span className="text-ink"> One run selected — pick one more.</span>
268
  )}
 
292
  </p>
293
  <p className="mt-2 text-[11px]">
294
  Every run is archived with its seed — replay, fork, and compare
295
+ runs from the <span className="text-ink">This configuration</span>{" "}
296
+ tab; sampled results show confidence intervals, not bare numbers.
297
  </p>
298
  </div>
299
  );
frontend/src/components/RunHistory.tsx CHANGED
@@ -432,7 +432,8 @@ function ArchiveIO({ count }: { count: number }) {
432
  );
433
  }
434
 
435
- /** Always-visible encoding key pinned at the top of the History tab.
 
436
  * The lineage view fronts five visual channels, and tooltips + a
437
  * skippable tour slide proved discoverable-once at best. Same
438
  * pattern as the canvas RibbonLegend (mini replicas of the real
@@ -631,6 +632,13 @@ export function RunHistory({ embedded = false }: { embedded?: boolean } = {}) {
631
  )}
632
  {(embedded || open) && (
633
  <>
 
 
 
 
 
 
 
634
  <LineageLegend />
635
  <ArchiveIO count={records.length} />
636
  {records.some((r) => r.demo) && <DemoArchiveBanner />}
@@ -646,8 +654,8 @@ export function RunHistory({ embedded = false }: { embedded?: boolean } = {}) {
646
  >
647
  <GitCompareArrows className="w-3 h-3 shrink-0" />
648
  <span>
649
- 1 of 2 picked — tick one more run to compare, or A/B a
650
- card in Multiverse.
651
  </span>
652
  </div>
653
  )}
 
432
  );
433
  }
434
 
435
+ /** Always-visible encoding key pinned at the top of the
436
+ * This-configuration tab (internal id: history).
437
  * The lineage view fronts five visual channels, and tooltips + a
438
  * skippable tour slide proved discoverable-once at best. Same
439
  * pattern as the canvas RibbonLegend (mini replicas of the real
 
632
  )}
633
  {(embedded || open) && (
634
  <>
635
+ {/* Scale statement (three-scales IA): this tab is scale 2 —
636
+ the archive as replicates of configurations. One quiet
637
+ line; the legend key below carries the decoding. */}
638
+ <div className="border-b border-edge/40 bg-surfaceAlt/20 px-2.5 py-1 text-[10px] text-mute">
639
+ Every archived run; same-color runs are replicates of one
640
+ configuration.
641
+ </div>
642
  <LineageLegend />
643
  <ArchiveIO count={records.length} />
644
  {records.some((r) => r.demo) && <DemoArchiveBanner />}
 
654
  >
655
  <GitCompareArrows className="w-3 h-3 shrink-0" />
656
  <span>
657
+ 1 of 2 picked — tick one more run for Between
658
+ configurations, or A/B a card in Multiverse.
659
  </span>
660
  </div>
661
  )}
frontend/src/components/results/cards.tsx CHANGED
@@ -6,6 +6,7 @@
6
  // visualise them using the primitives from `./viz`.
7
 
8
  import { useEffect, useState } from "react";
 
9
  import type { StepResult } from "../../lib/api";
10
  import { useApp } from "../../lib/store";
11
  import { listRunsByConfig } from "../../lib/runStore";
@@ -452,14 +453,20 @@ function UncertaintyBlock({
452
  seed {seedUsed}
453
  </span>
454
  )}
 
 
 
 
 
455
  <button
456
  type="button"
457
  data-marker="open-theater"
458
- className="text-accent hover:underline"
459
  onClick={() => useApp.getState().setTheaterOpen(true)}
460
- title="Open the evidence theater — this funnel, large: per-batch intervals on a shots axis, stopping target, cost row."
461
  >
462
- open theater ↗
 
463
  </button>
464
  </span>
465
  </div>
@@ -476,7 +483,7 @@ function UncertaintyBlock({
476
  className="evidence-funnel space-y-px"
477
  role="img"
478
  aria-label={`evidence funnel: ${trace.length} shot batches, interval narrowing from ${((trace[0].ci95[1] - trace[0].ci95[0]) * 100).toFixed(1)} to ${((hi - lo) * 100).toFixed(1)} percentage points wide`}
479
- title={`Each line = the 95% CI after one more batch of shots (top = first batch). ${trace.length} batches; width ${((trace[0].ci95[1] - trace[0].ci95[0]) * 100).toFixed(1)}pp → ${((hi - lo) * 100).toFixed(1)}pp. Same funnel motif as the History lineage: here shot batches accumulate inside ONE run; there whole runs accumulate across a replicate group.`}
480
  >
481
  {trace.map((t, i) => (
482
  <div key={t.shots_done} className="relative h-[3px]" aria-hidden>
@@ -646,7 +653,7 @@ function ReplicateStrip({ currentPoint }: { currentPoint: number }) {
646
  data-marker="compare-vs-previous"
647
  className="text-[10px] text-accent hover:underline"
648
  onClick={() => useApp.getState().setCompareIds(latestPair)}
649
- title="Open the Compare tab with this configuration's two most recent archived runs side by side."
650
  >
651
  compare vs previous run of this configuration ↗
652
  </button>
 
6
  // visualise them using the primitives from `./viz`.
7
 
8
  import { useEffect, useState } from "react";
9
+ import { Maximize2 } from "lucide-react";
10
  import type { StepResult } from "../../lib/api";
11
  import { useApp } from "../../lib/store";
12
  import { listRunsByConfig } from "../../lib/runStore";
 
453
  seed {seedUsed}
454
  </span>
455
  )}
456
+ {/* THE theater entry point (three-scales IA): the theater is
457
+ this tab's expanded mode, so its affordance lives on the
458
+ funnel card itself — the toolbar button it replaces sat a
459
+ panel away from the funnel it enlarged. Auto-open on
460
+ streaming runs is unchanged. */}
461
  <button
462
  type="button"
463
  data-marker="open-theater"
464
+ className="flex items-center gap-1 rounded border border-accent/50 px-1.5 py-0.5 text-accent hover:bg-accent/10"
465
  onClick={() => useApp.getState().setTheaterOpen(true)}
466
+ title="Expand this funnel into the Evidence Theater — the large steering view: per-batch intervals on a shots axis, stopping target, cost row. (Opens by itself when a run streams.)"
467
  >
468
+ <Maximize2 className="w-3 h-3" />
469
+ expand · theater
470
  </button>
471
  </span>
472
  </div>
 
483
  className="evidence-funnel space-y-px"
484
  role="img"
485
  aria-label={`evidence funnel: ${trace.length} shot batches, interval narrowing from ${((trace[0].ci95[1] - trace[0].ci95[0]) * 100).toFixed(1)} to ${((hi - lo) * 100).toFixed(1)} percentage points wide`}
486
+ title={`Each line = the 95% CI after one more batch of shots (top = first batch). ${trace.length} batches; width ${((trace[0].ci95[1] - trace[0].ci95[0]) * 100).toFixed(1)}pp → ${((hi - lo) * 100).toFixed(1)}pp. Same funnel motif as the lineage in “This configuration”: here shot batches accumulate inside ONE run; there whole runs accumulate across a replicate group.`}
487
  >
488
  {trace.map((t, i) => (
489
  <div key={t.shots_done} className="relative h-[3px]" aria-hidden>
 
653
  data-marker="compare-vs-previous"
654
  className="text-[10px] text-accent hover:underline"
655
  onClick={() => useApp.getState().setCompareIds(latestPair)}
656
+ title="Open “Between configurations” with this configuration's two most recent archived runs side by side."
657
  >
658
  compare vs previous run of this configuration ↗
659
  </button>
frontend/src/lib/scenarios.ts CHANGED
@@ -120,6 +120,11 @@ export interface Scenario {
120
  /** Run the pipeline automatically once graph + circuit are ready. */
121
  autoRun?: boolean;
122
  workspaceMode: "compose" | "multiverse";
 
 
 
 
 
123
  evidenceTab?: "current" | "history" | "compare";
124
  /** Expand the right (Evidence) pane / open its mobile drawer. */
125
  expandEvidence?: boolean;
@@ -239,7 +244,8 @@ export const SCENARIOS: Record<string, Scenario> = {
239
  evidenceTab: "current",
240
  expandEvidence: true,
241
  },
242
- // F4 — provenance lineage: History tab over the bundled archive,
 
243
  // which contains a pinned replay forked from an earlier bell run
244
  // (curved fork edge + seed ring) plus replicate bands/strips.
245
  F4: {
@@ -273,7 +279,8 @@ export const SCENARIOS: Record<string, Scenario> = {
273
  // bundled archive the top two ARE the two bell configs (512 vs
274
  // 2048 shots) — an earlier version of this comment claimed bell vs
275
  // vqc+QuCAD, stale since the config hash started separating the
276
- // shots param. Since the difference-funnel wave the Compare tab
 
277
  // also draws the Δ(B−A) funnel below the bars (see F8, which pins
278
  // the expected numbers).
279
  F6: {
@@ -300,7 +307,7 @@ export const SCENARIOS: Record<string, Scenario> = {
300
  // crossing through each other's intervals, per-run id+seed legend
301
  // in the context strip, final readouts dodged in the right margin
302
  // (A 48.00%, B 50.39% — final intervals overlap: consistent with
303
- // one underlying configuration), Compare tab open behind the
304
  // theater with the "overlay in theater" chip visible. No target
305
  // corridor (these archive runs executed their full budget with no
306
  // stopping rule). Scrubbing to batch k truncates BOTH funnels in
@@ -317,7 +324,8 @@ export const SCENARIOS: Record<string, Scenario> = {
317
  overlayPair: true,
318
  },
319
  // F8 — DIFFERENCE FUNNEL (marker: difference-funnel): sequential
320
- // A/B evidence steering in the Compare tab. compareTopConfigs lands
 
321
  // on the bundled archive's two most-replicated configurations,
322
  // which differ ONLY in the fake_backend shots param (512 vs 2048),
323
  // so the funnel answers a real tuning question: "did raising shots
@@ -467,7 +475,7 @@ export async function activateScenario(rawKey: string): Promise<boolean> {
467
  if (sc.overlayPair) {
468
  const ids = await pickOverlayPairRunIds();
469
  if (ids.length === 2) {
470
- // Compare tab shows the pair (with the overlay chip); the
471
  // theater opens on top in overlay-comparison mode.
472
  useApp.setState({ compareIds: ids });
473
  app.setTheaterOverlay([ids[0], ids[1]]);
 
120
  /** Run the pipeline automatically once graph + circuit are ready. */
121
  autoRun?: boolean;
122
  workspaceMode: "compose" | "multiverse";
123
+ /** STABLE internal tab ids (see ResultsPane's EvidenceTab note):
124
+ * current = "This run" (scale 1), history = "This configuration"
125
+ * (scale 2), compare = "Between configurations" (scale 3). Figure
126
+ * provenance and these scenario definitions key on the ids, so the
127
+ * three-scales rename changed only the user-visible labels. */
128
  evidenceTab?: "current" | "history" | "compare";
129
  /** Expand the right (Evidence) pane / open its mobile drawer. */
130
  expandEvidence?: boolean;
 
244
  evidenceTab: "current",
245
  expandEvidence: true,
246
  },
247
+ // F4 — provenance lineage: the This-configuration tab (id: history)
248
+ // over the bundled archive,
249
  // which contains a pinned replay forked from an earlier bell run
250
  // (curved fork edge + seed ring) plus replicate bands/strips.
251
  F4: {
 
279
  // bundled archive the top two ARE the two bell configs (512 vs
280
  // 2048 shots) — an earlier version of this comment claimed bell vs
281
  // vqc+QuCAD, stale since the config hash started separating the
282
+ // shots param. Since the difference-funnel wave the
283
+ // Between-configurations tab (id: compare)
284
  // also draws the Δ(B−A) funnel below the bars (see F8, which pins
285
  // the expected numbers).
286
  F6: {
 
307
  // crossing through each other's intervals, per-run id+seed legend
308
  // in the context strip, final readouts dodged in the right margin
309
  // (A 48.00%, B 50.39% — final intervals overlap: consistent with
310
+ // one underlying configuration), Between-configurations tab open behind the
311
  // theater with the "overlay in theater" chip visible. No target
312
  // corridor (these archive runs executed their full budget with no
313
  // stopping rule). Scrubbing to batch k truncates BOTH funnels in
 
324
  overlayPair: true,
325
  },
326
  // F8 — DIFFERENCE FUNNEL (marker: difference-funnel): sequential
327
+ // A/B evidence steering in the Between-configurations tab.
328
+ // compareTopConfigs lands
329
  // on the bundled archive's two most-replicated configurations,
330
  // which differ ONLY in the fake_backend shots param (512 vs 2048),
331
  // so the funnel answers a real tuning question: "did raising shots
 
475
  if (sc.overlayPair) {
476
  const ids = await pickOverlayPairRunIds();
477
  if (ids.length === 2) {
478
+ // The Between-configurations tab shows the pair (overlay chip); the
479
  // theater opens on top in overlay-comparison mode.
480
  useApp.setState({ compareIds: ids });
481
  app.setTheaterOverlay([ids[0], ids[1]]);