History tab: lineage legend as fixed chrome; guidance rows capped at two
TheYuchen
5f6b0fb
The History tabpanel stops scrolling; RunHistory (embedded) becomes a
flex column that renders the LineageLegend — with its "key" reopen
chip — ABOVE an internal scroll container, as plain non-scrolling
chrome. No position:sticky needed, so the panel-alt overflow-hidden
that broke the sticky approach is moot. Guidance budget settled: the
demo banner now outranks the scale-hint row AND the archive strip (the
archive reopen chip parks inside the legend chrome row, costing no row
of its own), so a fresh device shows at most banner + legend chrome;
reopening the archive strip is explicit user intent and wins for the
session. Standalone hosting keeps the old in-panel layout. The legend
chrome stays inside the tabpanel subtree the figure camera exports.
Backlog entry removed.
Audit backlog wave 3, evidence area:
- dedupeDraws keys on (root_seed, shots, successes) [approved]: only
a bit-exact repetition of the whole draw is dropped — the same seed
with a different stopping point executed different measurements and
now pools as new evidence. Node-lane assertions added; F8
demo-archive numbers verified unchanged.
- Sparkline stops flattening sub-unit series (QuCAD loss traces);
divide-by-zero guard only fires on a truly flat trace
- KvRow never prints "[object Object]" (nested objects/arrays
JSON-stringify, truncated); viz fmt + CircuitDiff gateDiffOf
unexported (dead exports)
- QuBound/QuCAD NaN payloads render as absent ("—"), not "NaN" tiles;
Qshot's headline fidelity joins the % convention (formula + pilot
table keep the author's raw-unit notation); CI line tabular-nums
- fidelity histogram says what it hides ("+k more outcomes · n shots
not listed"); ReplicateStrip excludes errored runs, highlights the
newest matching dot with an ep…
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchen
728039f
Audit backlog (docs/AUDIT_BACKLOG.md) wave 3, canvas area:
- node ids: module counter kills the same-millisecond collision
- touch drag cancel clears the splice highlight; restore-pulse timer
held in a ref (cleared on re-restore/unmount)
- cost effect reads nodes through a ref (stale closure)
- ARCHIVE_WINDOW (runStore) consolidates the 50/100/200/500 listRuns
caps; countRuns()/countRunsByConfig() back every displayed total
(board header, config-context bar); exportArchive scans unbounded;
listRunsByConfig keeps the newest window instead of an arbitrary
primary-key subset; import preserves synthesized run_ids (no dupes
on re-import)
- stale post-run encodings: ribbons/edge labels dim at 0.45 when the
live structural hash diverges from the run's hash
- RibbonEdge: role=img on the aria-labelled group; deltaSize null
(unknown) no longer renders as pass-through; "ops" -> "gates"
- replicate loop: sticky progress notice (outlives the 4s fade) and
per-iteration clearLivePr…
- pane auto-switch keyed on compareIds identity (pair replacement re-fires)
- compare selection pruned after Clear demo data / archive import;
setCompareIds dedupes; CompareView renders "runs no longer archived"
instead of a silent blank when records are gone
- interval-bar point markers clamp at the 0/1 scale edges (cards clipped
by overflow-hidden; CompareView twins overhung)
- RunHistory restore/replay titles tell uploaded-circuit records' truth
("re-upload to reproduce"); lineage footer names the 50-run window
- PluginFigures bar with data:[] renders a stub instead of crashing the pane
- Scenario auto-runs archive tagged (RunRecord.scenario, threaded
scenario key through pendingRestore -> pendingAutoRun ->
runPipeline -> buildRunRecord; preserved across archive import).
Scripted figure states are excluded from the theater's
prior-evidence pool and from the F7 overlay picker, so repeated F0
boots can no longer pollute the archive into a fake replicate group
or distort the evidence the figures claim to show (documented in
scenarios.ts).
- dedupeDraws ("exact replays counted once") now applies to EVERY
undisclosed pooling surface: theater archive band, fidelity-card
replicate strip, multiverse pooled band + pooled line, and the
lineage certainty funnel (seen-seed skip, same rule). Labels and
tooltips updated to say so; stats.ts's known-looseness note replaced
by the uniform truth.
- timesTrusted: a displayed run with no run_id is trusted only WHILE
streaming — a restored / cache-served run must not inherit the
previous run's seed chip, config…
History rows: seed glyph gains a visible word (pinned / fresh)
TheYuchen
346e35d
The bare glyphs were cryptic without hover (owner's tooltip-reliance
complaint, item c): a 9px "pinned"/"fresh" label now sits next to the
glyph inside the same shrinkable row group, colored with it. No-seed
records (pre-provenance / cached) keep the bare glyph + tooltip -- a
"fresh" word there would be dishonest. Tooltips unchanged.
IA inversion 2/4: board cards expand in place (marker card-expand)
TheYuchen
f10a7ab
The Evidence board becomes a working surface, not a menu. A chevron
(or the strip area) expands one card at a time — spanning two grid
columns only when the grid actually measures two (a span-2 in a
1-column auto-fill grid would mint a phantom implicit column) — into
an inline scale-2 summary:
* run-dots timeline: the newest 12 archived runs of the configuration,
chronological, on the SHARED evidence-mass encoding (dot area ~
sqrt(shots), ring = pinned seed, hollow red slash = errored, ink
outline = newest). The encoding is lifted from RunHistory into
lib/evidenceMass.ts so lineage and board size dots identically.
* the pooled Wilson interval as a labeled line (same pool the
collapsed band draws), or an honest "pooling needs >=2 runs with
counts" note.
* quick actions: replay latest (pins the run's seed, auto-runs),
+3 replicates (clears any stale pin, replicateCount=3, auto-runs),
open in editor, A/B. Replay/replicates stay ON the board: the
covered canvas consumes …
(a) RibbonLegend: still mounts only after the session's first run
(verified — the parent gates on the in-memory `run`), and now fades
out on its own after 20s (unmounts at 21s; mount-scoped timer, so
re-runs don't resurrect it). The × dismissal remains the only
persisted state. (b) Guidance-strip budget — at most ONE strip per
view, demo banner > hint: the Multiverse orientation hint collapses
to its header "?" while the demo banner is up (explicit "?" click
force-shows it for the session); the History-tab archive-io strip
starts collapsed to an "archive…" reopen chip when the banner
renders. (c) Evidence-pane header chip budget: at most two chips —
the seed chip absorbs the cached state as "cached · no seed" (a
precomputed response IS a response no seed was drawn for), replacing
the separate cached chip. (d) Node tiles audited: the post-run strip
cannot exceed glyph + headline/chips row + micro-CI row (chips row is
flex-nowrap, headline min-w-0 truncate, ≤3 shrink-0 chips); the
layout…
Evidence tabs = the three scales (three-scales IA)
TheYuchen
b54486e
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.
Archive export/import (archive-io): the promised cross-device channel
TheYuchen
3089d9e
runStore's header has promised "export/import of archives covers
cross-device hand-off" since the provenance rework; nothing implemented
it. Now: exportArchive(runIds?) downloads {schema: 1, exported_at,
records} (oldest first so ancestors precede forks), importArchive(file)
validates the top-level shape, re-normalizes every record through
buildRunRecord — the file's config_hash/headline/derived fields are
never trusted — preserves created_at + the demo honesty flag verbatim,
skips run_id collisions, and bumps historyVersion once. UI: an
archive-io strip under the History tab's legend key with "export
archive" / "import" buttons and a per-action report line; import is
also reachable in the zero-runs empty state (a fresh device is exactly
where a handed-off file arrives). This is the user-study
data-collection channel — the server stays stateless by design, so the
participant's browser archive is the only copy until exported.
History lineage: always-visible legend key
TheYuchen
fbeb1e8
The lineage view fronts five visual channels but its only decoding
aids were hover tooltips, a footer line below the scroll and a
skippable tour slide — even the project owner had to ask what the
circles and lines mean.
- LineageLegend (marker class `lineage-legend`): compact wrap-row key
pinned at the TOP of the History tab body, above the demo banner.
Six items, each a mini SVG replica of the real mark (accent-toned,
no specific config hue implied) + 2-4 word label: color =
configuration, size = shots, ring = pinned seed, band = replicates,
curve = forked from, strip = results + mean. Full explanations in
per-item tooltips.
- Dismissable (x at row end), persisted in localStorage
`quda.lineageLegendDismissed`; unlike RibbonLegend, a small "key"
chip remains in the same top strip to bring it back.
- Footer legend removed — fully folded into the key: radius floor/cap
into the size tooltip, slash=error into the color tooltip, funnel
per-group scale into the band tool…
Compare reachability: one hop from where the question arises
TheYuchen
8311ef0
* RunHistory: while exactly one compare checkbox is ticked, a status
chip at the panel top says what completes the gesture ("1 of 2
picked — tick one more run, or A/B a card in Multiverse"); the
first tick used to feed only a tab badge.
* Fidelity card: with >=2 archived runs of the current configuration
the across-runs strip grows a "compare vs previous run" link
(marker compare-vs-previous) setting compareIds to the two latest
run_ids via the new store action setCompareIds — the Evidence
pane's existing length===2 auto-switch takes over.
Comprehension audit: close the self-explanation gaps
TheYuchen
530ca91
Walked every interactive element (toolbar, Evidence pane, history
rows, multiverse cards, theater, pickers, param editors) asking "does
this explain itself where the user finds it?". Most surfaces already
carry task-language titles/TipIcons; six gaps fixed:
- ×N replicate selector now states the caching consequence (the
deterministic prefix is served from cache after run 1; only
stochastic steps re-run) — previously only the cost chip said so,
and only once N>1 with history present.
- Precision-target selector states that the target is archived with
the run and restored on replay (an early stop reproduces exactly).
- Evidence tabs (Current run / History / Compare) gained one-line
title tooltips; the count badges inherit context from them.
- The two funnels now explain their relationship in both directions:
the fidelity-card funnel (shot batches inside one run) and the
lineage funnel (runs across a replicate group) cross-reference each
other as one motif in two contexts…
- RunHistory rows: fixed-width chips (time, hash, demo, F=, stop,
seed, 3 buttons) summed past a narrow Evidence pane's width and the
overflow-x-hidden aside silently clipped the restore/replay/delete
buttons. The middle metadata now lives in a min-w-0 overflow-hidden
group (name truncates first, then chips clip) so actions stay
reachable at any pane width; rows remain strictly single-line, so
the gutter's RUN_H dot arithmetic is untouched.
- Deleting a run that is selected for comparison now deselects it;
CompareView additionally re-resolves on historyVersion and clears
itself when either record is gone (it used to keep rendering the
deleted run's data), and a lookup failure no longer leaves a stale
pair.
- CompareView header wraps: the verdict chip pushed the close X out
of narrow panes.
M1 scenarios.ts QUCAD_GRAPH is now a literal copy of bundled demo
record 5c2a6a71a7a4's graph (ids n1..n5, sampled fidelity, same
params/positions) instead of an s1..s5/statevector rebuild —
F1/F5 runs now group with the demo cards (same config_hash) and
pinned seed 336157917 replays the archived numbers bit-exactly.
M2 Optional-stopping honesty in three places: limitation block at
the stopping rule (qlib/qiskit_utils.py — width-based
data-dependent stopping perturbs exact nominal coverage of the
final fixed-n interval; confidence sequences are the rigorous
alternative), one sentence in the Wave I doc section, and a
clause in the precision-target tooltip.
M3 Anon builds scrub the branded theme completely: generateBundle
strips the [data-theme=gmu] CSS block, and theme.ts gates the
stored-preference fallback behind !ANON so the key literal is
dead-code-eliminated from VITE_ANON JS (runtime ?anon=1 behavior
unchanged). Anon dist grep…
Wave J: uncertainty-in-provenance (evidence-mass lineage, pooled CIs)
TheYuchen
75184f5
Provenance views stop pretending states are deterministic — lineage
nodes ARE distributions, so the timeline now shows how certainty
accumulated over the session. Minimal honest version, one task per
mark:
* evidence mass (marker `evidence-mass`): lineage dot AREA propto
sqrt(executed shots), radius 3-7px against a fixed 2048-shot
reference; early-stopped runs are visibly lighter. Ring / slash /
edges / hover target track the radius; tooltip gains "N shots of
evidence".
* replicate-band certainty funnel: pooled Wilson CI half-width at
each row (counts summed oldest->newest; valid within a config
group: same underlying p), mirrored polylines around the lane
spine, narrowing upward ~1/sqrt(N) — Wave I's funnel motif, second
context. Tooltip: "pooled +/-X.Xpp after n runs / N shots".
* lib/stats.ts (new): wilson95 ported from
app/services/stats.py::wilson_interval with unit-anchor comments;
runEvidence / poolEvidence helpers.
* Multiverse cards: "pooled mu x.x% +/-y.y…
Backend: sampled fidelity always runs as B=min(8,max(2,shots//128))
batches; batch i seeded sha256(f"{node_seed}:batch:{i}") so replays
are bit-exact regardless of any run's stopping point. Streaming SSE
interleaves {"step_progress": {node_id, batch_i, n_batches,
shots_done, successes, point, ci95}} frames (worker thread + queue in
the executor; eager path unaffected). RunRequest.precision_target
(CI half-width, (0,0.5]) = server-honoured optional stopping, min 2
batches; distribution records shots executed vs requested,
stopped_early, and the full per-batch trace. qlib duplicates the
Wilson fn (no app import from qlib); twins pinned equal by test.
Frontend: toolbar precision-target select (off/±5/±2/±1pp); live
narrowing CI band + shot counter on node faces from streamed frames;
evidence-funnel in the fidelity card (one line per batch, opacity
ramp, target ticks at point±target, early-stop annotation); RunRecord
persists precision_target + stopped_early; restore/replay writes the
tar…
Backend: AerSimulator.from_backend / NoiseModel.from_backend rebuilt
the full 100+ qubit device noise model on every sampled-fidelity and
QuCAD step (~40-90 s of GIL-bound Python per fresh run — the dominant
cost of every uncached run on the Space). Fake* snapshots are frozen,
so the derived model is memoized by backend name (live IBM backends
never cached). qlib/qiskit_utils.aer_simulator_for / noise_model_for.
Frontend: plumbing for a bundled first-visit evidence archive —
RunRecord.demo flag, lib/demoArchive.ts (ensureDemoArchive imports
data/demoArchive.json via buildRunRecord on first visit only, decided
flag quda-demo-decided, clearDemoRuns), DemoArchiveBanner on the
Multiverse board + History tab, per-row demo chip, multiverse landing
for first visits, welcome-slide tagline reframed to the evidence
story. Archive JSON itself ships in the next commit (placeholder []).
Multiverse board: configurations as small-multiple evidence
TheYuchen
4bf1a9d
The set of configurations the analyst has tried becomes a first-class
workspace. A Compose|Multiverse segmented toggle in the canvas toolbar
flips the center column to a MultiverseBoard: one card per config_hash
group, each with a topological pipeline schematic (family-colored 8px
squares, warn dots on stages whose params differ from the baseline),
the outcome distribution on a shared 0-1 scale (group hue, mean tick,
latest emphasized), Δmean vs the most-tried (baseline) configuration
in pp with an "(n small)" honesty flag under 3 replicates, and
Open/A-B actions wired into the existing restore + compare bridges.
The board overlays the canvas instead of replacing it so React Flow
graph state and the pendingRestore watcher survive mode flips.
hashHue/hueCss move to lib/hues.ts, shared by RunHistory and the
board so a configuration keeps one color everywhere. Tour welcome
slide gains one sentence pointing at the mode.
Information architecture: the results pane is now the Evidence pane
with three tabs — Current run (step cards + final metrics + hints),
History (lineage view, always expanded, no own collapse toggle when
embedded), Compare (instruction pointing at History's checkboxes
until two runs are picked). Badges: History = archive size via a new
countRuns() IndexedDB count (refreshed on historyVersion), Compare =
selection count. Auto-switch: starting a run -> Current; ticking the
2nd compare checkbox -> Compare. flex-wrap tab bar so the pane still
works inside the mobile drawer; collapsed strip + drawer title renamed
to Evidence.
Comparison: consecutive leading step rows that are identical on both
sides (same node kind, no structural param diff for that kind, equal
transformation-signature deltas) fold into one expandable "shared
prefix - N steps" <details> row; the first divergent row carries an
accent left border + "divergence point" label. Rationale in code: the
analytical question is where…
Provenance lineage view: timeline becomes a real visualization
TheYuchen
cfb84a4
Replace the run-history list body with a vertical lineage graph
(newest at top). An SVG gutter, absolutely positioned inside the
scroll container so it scrolls with the rows, encodes:
- node hue = config_hash (stable hash->hue pastel; same configuration
is the same color everywhere), constant node size by design;
- ring around the dot = pinned/replayed seed_mode, bare dot = fresh;
- hollow node + red slash = errored run;
- curved bezier edges = forked_from descent, drawn in the child's hue
so a configuration's origin can be traced by its own color;
- rounded band + spine = contiguous replicate block of one config;
- per-block distribution strip (>=2 replicates with headline values):
dots on a 0-1 scale for every value archived up to that block, so
distribution buildup is visible while scrolling down the past;
bright dots = this block, faint = older, tick = mean.
Hovering a row or its dot highlights the full lineage chain
(ancestors via forked_from plus all descendants) by d…
Composition comparison: two archived runs side by side, CIs not scalars
TheYuchen
d105dc7
Phase 3 (minimal viable) of the evidence-workbench rework. Pick any
two runs in the history panel (checkboxes, keep-latest-two) and a
comparison panel renders:
* configuration diff — params matched structurally by (kind,
occurrence) exactly like configHash, so node ids and layout don't
matter; circuit swaps surface as a "circuit" row;
* same-configuration detection — when the config hashes match the
panel says so explicitly ("differences are noise"), because that
changes how any metric gap must be read;
* fidelity compared as intervals — both Wilson CIs on one 0-1 scale
with the Δ in percentage points, and an explicit "intervals
overlap: not evidence" callout when the difference is within
run-to-run noise at these shot counts;
* step-by-step alignment with each side's transformation signature.
Provenance timeline: run archive, restore/replay/fork, replicates
TheYuchen
f2c03b7
Phase 1 of the evidence-workbench rework. Every completed run is now
archived client-side (IndexedDB — the server stays stateless by
design) as an immutable RunRecord: the graph in share-link
serialization, the full per-step response, and the seed envelope.
Run history panel (results pane): newest-first timeline with a
structural configuration hash chip — runs sharing a chip are
replicates of the same experiment. Actions per entry: restore
(canvas + circuit come back exactly), replay (restore + pin the
recorded root seed, so Run reproduces the exact draw), delete.
Restores thread forked_from lineage into subsequent records.
Replicate execution: a ×1/×5/×10/×20 selector runs the same
configuration N times with fresh seeds, sequentially, archiving each
draw. The fidelity card now renders sampled results as what they are
— a draw, not a number: Wilson 95% CI on a fixed 0-1 scale, the
top-outcome histogram, the consumed seed, and an across-runs strip
that accumulates one dot per archived…