Commit History
-
Cleanup: dead touch-drag bridge, empty-state + tour copy, docs
TheYuchen- touchDrag / pendingTouchDrop machinery removed from the store and FlowCanvas (selectors, both effects, the TouchDragPreview chip): the shelf was its only producer — grep confirms zero remaining references. Tap-to-add via the Add-block popover is the touch path; the shared splice-highlight logic (findClosestEdge + dropTargetEdgeId) stays, since the mouse drag-from-popover path still uses it. - EmptyCanvas teaches the two add paths ("+ Add block", drag from a block's edge into empty space) and carries the five-stage grammar line the shelf used to illustrate. - Tour slide 2 (ComposeSlide) no longer claims a pipeline shelf exists; minimal rewording to "+ Add block" + edge-drag, grammar order kept. - docs/EVIDENCE_WORKBENCH.md: the palette-as-grammar paragraph rewritten honestly — shelf superseded by the chooser popover + grammar-aware insertion; design principle stated (constant chrome, growth in on-demand surfaces). - Store/FlowCanvas comments updated to name t…d17180a -
Tier 3: grammar-aware canvas insertion (marker: canvas-insert-menu)
TheYuchenThe pipeline grammar moves INTO the canvas. Two openers, one mini chooser (CanvasInsertMenu, ~240px, internal scroll, Escape/outside dismiss via useDismissOn): (a) onConnectEnd — releasing a connection drag from a node's SOURCE handle over EMPTY pane opens the menu at the drop point, filtered to nextFamilies() of the dragged-from node's family. Picking a block creates it there AND wires the pending connection to it. (b) double-click on empty pane — same menu, unfiltered (all five stage sections in mini form), no wiring. zoomOnDoubleClick is off so the gestures don't fight. nextFamilies lives in autoConnect.ts next to FAMILY_ORDER — the grammar source of truth — and is derived from how autoConnect builds chains: any later family can directly follow (empty buckets are skipped when flattening); algorithm→algorithm and metric→metric may repeat (unwarned legal chains); source→source and backend→backend are excluded because they are exactly the shapes autoConnect's advisory warnings flag;…5c58e08 -
Tier 2: "+ Add block" chooser popover (marker: block-chooser)
TheYuchenBlockPicker rewritten from a multi-select checkbox dropdown into THE single chooser surface, anchored under the one permanent "+ Add block" button now sitting in canvas-toolbar row 1 (after the workspace toggle, btn h-8 idiom). Width min(480px, 90vw), max-height ~380px with internal scroll, useDismissOn for Escape/outside-click. Content teaches the grammar the shelf used to spell out: five stage sections in pipeline order (Source → Backend → Algorithm → Metric → Sink), each a 10px uppercase header + the shelf's one-line tagline, then compact h-9 rows — icon, name, plugin badge, on-canvas count dot (live multiset from the canvasKinds bridge), full description as the title tooltip. Plugins list inside their declared family's section and keep their delete ×. Interactions: click = add via the pendingBlockKinds bridge and KEEP the popover open (multi-add by clicking; the row flashes "added ✓"); rows stay draggable with the unchanged application/reactflow payload so drop + splice-on-edge w…3e44751 -
Pipeline shelf: palette becomes the grammar (marker: pipeline-shelf)
TheYuchenRebuild NodePalette as five stage columns in pipeline order — Source → Backend → Algorithm → Metric → Sink — separated by faint arrow glyphs, so the palette itself reads as the sentence structure a valid pipeline follows. Each column: 10px uppercase header + one-line tagline, blocks stacked vertically as compact h-9 rows (icon + name; the tagline moved into the row tooltip). Killed: the rotated vertical family-letter rails, the count-filter chips, the horizontal tile sprawl. Kept exactly: drag-to-canvas (dataTransfer payload), tap/click-to-add via pendingBlockKinds, the touch-drag bridge, plugin badges + delete, paper links, search (now filtering rows across columns), "Add blocks", and the collapse-to-strip affordance. New: a subtle count dot on rows already placed (canvasKinds is a multiset, so it counts copies). Columns share width equally (min 120px); a column with ≥5 blocks (plugins join their declared family) scrolls internally behind a mask-image fade — growth is vertical, never…6d69c3f
-
Share-hash boot: plugin defaultData rehydrated once manifests arrive
TheYuchenbuildInitialGraph runs synchronously at mount while plugin manifests load async, so a share-hash boot mounted plugin nodes without their spec's defaultData (built-in kinds merge theirs at boot; every other mount path merges via resolveNodeSpec). A one-time FlowCanvas effect (ref-guarded) now runs when `plugins` first becomes non-empty on a share-hash boot and merges each plugin spec's defaultData UNDER the node's existing params — missing keys only, the link author's explicit values always win. Non-share boots skip it (presets never place plugin kinds). Backlog entry removed.4410c8a -
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchenAudit 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…728039f -
Run-lifecycle guards: no canvas swaps, surprise runs, or false toasts mid-run
TheYuchen- restore consumer refuses (queues) while running; applies when the run ends - pendingAutoRun expires on restore consume / loadPreset / clearGraph - restore-path loadSample shares the preset path's generation guard - replicate loop reports "stopped after i of N" on step failure or transport error instead of the unconditional success toast - Run button becomes "Stop after this run" while a replicate loop runs (flag checked between iterations; the current run completes + archives) - boot default-sample failure sets a warn notice; disabled Run buttons say "No circuit loaded - pick one on the left" - authoring locked while running: param editors, node delete x, preset picker - config-context bar: liveHash reset on context switch + "computing identity" state (no stale-hash flash); FlowCanvas publishes canvasKinds to the store72fe4f4 -
Evidence pooling honesty: scenario tagging, replay dedupe everywhere, timesTrusted
TheYuchen- 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…65e036f -
Provenance state: no false forks, no stale pins, one-shot board replicates
TheYuchen- clearGraph / loadPreset now clear restoredFrom, pinnedSeed, precisionTarget and editorContext (mirroring the New-configuration bridge, which also clears precisionTarget now): a preset or cleared canvas is not a fork of whatever was restored before, and must not replay an unrelated pinned seed. - restoredFrom is consumed after the FIRST post-restore run archives: only that run is the fork; later runs no longer inherit a false forked_from lineage. - The restore consumer writes the pin unconditionally — including null — so board "Open" clears a stale pin from an unrelated replay. - Board "+3 replicates" no longer mutates global toolbar state: a new one-shot replicateOnce field rides the pendingRestore -> auto-run bridge and is consumed by that single run; replicateCount is never written. - Palette-add appends nodes only: when the canvas already has edges (hand-drawn or restored) it no longer recomputes the whole edge set (which silently destroyed hand wiring) — i…1cd2cb9 -
Toolbar: intentional two-row design — hierarchy, single CTA, consistent controls
TheYuchenThe canvas toolbar's single flex-wrap row broke at an arbitrary, pane-width-dependent point: the evidence cluster dangled left on a ragged second line, its 9px "evidence" micro-label read as floating debris, and the accent2 "Load preset" pill competed with Run for the eye. Replace it with a deliberate two-row layout at every width >=768: - Row 1 (workspace & authoring): mode toggle, dot, counters (mute 11px), then ml-auto actions — Load preset (now a standard outline btn; PresetPicker drops btn-secondary), Auto-connect, figure export, Clear, the overflow menu. - Row 2 (evidence & execution): right-aligned seed chip / xN select / target select / est chip / Run — the toolbar's only accent control. The "evidence" label + lg divider are deleted; the row boundary carries the grouping, the word lives in the row's aria-label. - Est chip copy: "est ~35s" at N=1; "est ~35s each · ~2m total" at N>1 — the xN multiplier is no longer duplicated next to the select. Chip yields below…130ee8d
-
Editor viewport: fits show every node at short canvases (450px-tall)
TheYuchenTwo clipping causes closed: (1) restore path never re-fit -- a graph restored from the archive (or a scenario boot, same bridge) keeps coordinates from whatever screen authored it, while the boot-time fitView measured the BOOT graph; at short viewports the restored node row rendered half below the fold. The pendingRestore consumer now re-fits via the same rAF pattern loadPreset uses. (2) the instance minZoom (0.4) floored every fit -- a 4-block chain in a ~500px-wide center column needs ~0.3 to fit, so the fit clamped and clipped. minZoom drops to 0.15, and every fit call (boot fitViewOptions, restore, preset, add-blocks, orientation change) caps at maxZoom 1 so nodes never render past natural size just to fill a large canvas.4117bcd -
Toolbar: evidence-cluster divider + label gate at lg, not md
TheYuchenIn the 768-1024 range the evidence cluster's border-l divider (md- gated) rendered while the cluster wrapped, reading as a clipped stray rule next to the faint lg-only "evidence" label. Divider now hides below lg with the label; the grouping stays implied by spacing, the cluster still wraps as a unit (outer flex-wrap + min-w-0), and Run stays reachable without horizontal scroll at every width >= 768px.a62ec36 -
UI speaks the field's language: precision correspondence + cost anchor
TheYuchen* Glossary precisionTarget: adds the documented-practice correspondence (IBM Estimator `precision`, default 0.0156 ~ ±3.1pp at 95% two-sided; Quantum Volume's 97.5% one-sided gate). Our 95% two-sided Wilson semantics stay unchanged -- comment explains why (system-wide convention; QV mapping documented in doc 1.2, no convention switcher). Flows into the toolbar select tooltip, the theater target tags and the tour TipIcon via the shared gloss. * Evidence Theater (marker cost-anchor): under "evidence spent", a secondary estimate line translating the run's wall-clock duration into IBM pay-as-you-go dollars ($1.60/s) and percent of the Open Plan's 10 min/28d grant, labeled "simulator wall-time as proxy; hardware timing differs"; only rendered when a duration is known. Bottom margin 66->80 to make room. Shorter twin appended to the cost chip tooltip. Constants + source in lib/costModel.ts. * Claims map: "grounded in:" mini-line per contribution group. * Tour slide 3: …a6120cc -
IA inversion 3/4: editor framed as definition view (marker config-context)
TheYuchenWhen the Pipeline editor is entered FROM the board (card Open / New configuration), a slim context bar renders above the toolbar and makes configuration identity — the thing replicates and comparisons key on — visible at authoring time (C2 detail): * card, unedited: "Defining configuration #hash — circuit · runs archived: N · Back to board". * as the user edits, the structural config hash of the CURRENT canvas is recomputed (250 ms debounce) with the exact computeConfigHash archiving uses; divergence renders "edited: will archive as a new configuration #newhash" — or names the EXISTING configuration the canvas now matches, with its archived count (live via historyVersion, so the count ticks up the moment a run archives). * New configuration: blank-canvas consumer (newConfigRequest bridge) also drops the stale pinned seed and fork parentage; the bar reads "New configuration — not yet run" until the first archive lands. Chip hues come from the shared hash->hue mapping, …ae61a23 -
Visual calm pass: fewer simultaneous strips, chips, keys
TheYuchen(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…bdf2f0e -
Toolbar calm-down: authoring vs evidence clusters
TheYuchenThe canvas toolbar mixed authoring (preset, wiring, share, export, clear) with evidence controls (replicates, target, seed, cost, Run). Now two visually separated clusters: LEFT = workspace toggle + authoring (counters, preset, Auto-connect, camera, Clear, ⋯ menu); RIGHT = evidence group (pinned seed, ×N, precision target, cost chip, Run) behind a md-gated divider with a faint "evidence" group label — the toolbar reads as "what am I composing?" vs "what will the next run measure?". Share + Export .py are demoted into the ⋯ MoreMenu at EVERY width (their rows always render; Auto-connect/Clear rows are md:hidden so exactly one reachable copy of each action exists at any width) — two fewer permanent buttons, plus the Theater button already removed by the three-scales commit. ShareButton toolbar instance and its import dropped; MoreMenu's stale breakpoint-close guard removed; NextStepsHint points at the ⋯ menu for Export .py.7ece09e -
Evidence tabs = the three scales (three-scales IA)
TheYuchenTab 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.b54486e -
Export script threads precision_target (honesty fix)
TheYuchenAn early-stopped run's exported Python ran ALL requested shots — the stopping rule was part of the run's provenance (RunRecord persists it, replay re-sends it) but the export path dropped it, so the doc's "reproduces the archived run's exact draw" overstated for early-stopped runs. Now: ExportProvenance carries precisionTarget (read server-authoritatively from the sampled step's distribution payload, not the toolbar's current selection), the generated sampledFidelityEstimator call re-sends precision_target=, and the script header stamps stop_target. Shape-verified by frontend/scripts/check_export_python.test.ts (esbuild bundle + node). Doc claim updated to now-true.09ac4f2
-
Restore/replay: transient pulse on the rebuilt canvas
TheYuchenpendingRestore (History restore/replay and scenario boots — same bridge) swaps the whole canvas behind the pane the user clicked in; the silent mutation read as "nothing happened". Every restored node now pulses one 1.2s accent ring (.restore-pulse, index.css), class stripped after 1.4s via functional setNodes so mid-window drags survive and the next restore re-triggers. Global prefers-reduced-motion rule collapses the animation.123b5a8 -
Comprehension audit: close the self-explanation gaps
TheYuchenWalked 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…530ca91 -
Audit D+E: theater annotation clamps, auto-run supersession, pool refresh, card wrap
TheYuchen- EvidenceTheater stop annotation: a late stop (batch 7 of 8) ran the ~330px label past the 1000px viewBox; it now flips to the left of the stop line only when the right side would clip. Threshold keeps the verified F0 teaser label on its right side, bit-identical. - Target corridor: yDomain clamps to [0,1], so with a point near the scale ends a corridor value can fall outside the domain and y() extrapolated the dashed line into the panel title. Out-of-domain lines are skipped and the label y is clamped into the plot band. - Manual Run now clears a still-pending scenario auto-run (the consumer only defers on `running`, so it used to fire a second unasked run after the manual one finished). - Theater's pooled prior-evidence band refreshes on historyVersion (deleting archived runs while the theater is open left it stale); the created_at < startedAt cutoff makes the refetch idempotent during replicate loops. - Multiverse card stats row wraps at the 240px card minimum…5bd8443 -
Audit A+B: header/toast stacking above overlays; toolbar wraps instead of clipping Run
TheYuchen- TopBar z-20 -> z-40: the ThemeSwitcher dropdown lives inside the header's stacking context, so the Multiverse board (z-20) and the Evidence Theater (z-30) overlays painted over it where it hangs below the bar. Mobile drawers (z-40/50, later in DOM) still cover. - CanvasToast z-30 -> z-40: run errors / replicate notices fire while the theater (which auto-opens on streaming runs) covers the canvas and were invisible behind it. - Canvas toolbar: min-h-12 + flex-wrap (row and action cluster, min-w-0 so wrapping actually engages). The cluster's md:/lg: label breakpoints key on the viewport while the row lives in a resizable column; at 1280-1440px windows with default panes the row overflowed and clipped the Run button. One-line case renders pixel-identical. - Copy: last "Results" remnants -> "Evidence" (TopBar drawer button title/aria, App resizer aria-label).a5c47fa -
Evidence Theater: steering becomes the visual protagonist (+F0 teaser)
TheYuchenThe system's most novel contribution -- anytime evidence steering (streaming CI narrowing + optional stopping, Wave I) -- was the smallest element on screen. New EvidenceTheater overlay (auto-opens on the first step_progress frame, dismissable, localStorage auto-open pref, toolbar + fidelity-card reopen affordances): one big SVG funnel per sampled node -- per-batch Wilson CIs on a linear shots axis with convergence envelope, first-interval-anchored auto-zoom, dashed target corridor + early-stop annotation with unspent-shots region, client- timed cost row (caveat commented) with server-total fallback, and a context strip (config hue chip, live root-seed via new runStream onMeta hook, pooled prior-evidence archive band). Store retains per- node stamped traces until the next run so the theater outlives the step; true-SVG figure export with embedded provenance. Scenario F0 (the teaser): bell_state on FakeFez, 4096 shots, sampled fidelity, target +/-2pp, pinned seed 2026 (probed live: all …f686793 -
Audit M1-M3 + minors: lineage, stopping disclosure, anon scrub
TheYuchenM1 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…e52951c -
Audit fixes: cache-hit node_id re-stamp, anon key, honest copy
TheYuchen* workflow_service: a step-cache hit now re-stamps the CURRENT node's id onto the served StepResult. The prefix hash ignores node ids, so a cached step written by a graph with different ids was served verbatim (live-reproduced: an s1..s5 scenario run poisoned a n1..n5 archive replay, which came back with node_ids s1..s3 the frontend cannot map). NOTE this fix only repairs the id, not the deeper pinned-cache identity hole — per-node seeds derive from node ids but the pinned cache key does not include them, so structurally-identical graphs with different ids can still serve each other's draws under the same root seed (see audit report). * FlowCanvas: ribbon-legend localStorage key renamed quaim-* -> quda.* ("quaim" matched the identifying Space slug and shipped in the VITE_ANON bundle, contradicting the doc's anon-audit claim). * scenarios/doc: F3's expected stop corrected to the value the live API actually produces (2,560 of 4096 shots; 512-shot batch granulari…18ca665 -
Wave P: paper-first reorientation
TheYuchenDe-product: remove WelcomeTour(+slides), AuthButton/session UI, Support(NSF)/Papers/Developers popovers, Lab link, UploadPluginModal trigger; plugin protocol stays live via API. Neutral index.html title/meta + PWA manifest. Header = name/tagline/env chip/live toggle/theme. Anonymous mode (double-blind): lib/anon.ts. VITE_ANON=1 build folds identifying strings out of the bundle (EvidenceQ codename, no paper bibtex, no GMU theme, vite plugin rewrites index.html+manifest); ?anon=1 runtime fallback hides the same surfaces on normal builds. Audit: zero user-visible identifying strings in the anon dist. Figure export with embedded provenance: lib/figureExport.ts + camera buttons on canvas toolbar / Multiverse header / Evidence header. True-SVG for svg targets, foreignObject-SVG + 2.5x PNG for HTML composites; paper transform (white bg, fonts x1.25, chrome stripped); SVG <metadata> + .provenance.json carry app version, export time, run_ids/root_seeds/config_hashes of every visible run and t…79cd0aa
-
Wave I: anytime evidence steering (live CIs, optional stopping)
TheYuchenBackend: 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…7fa375a -
Seed coverage for QuBound/Qshot + cost estimates from run history
TheYuchenCloses the two remaining claim-integrity gaps for "every run is exactly replayable" over "stochastic, costly experiments": Seeds. QuBound trains its LSTM on BOTH ok paths (live IBM history and the cached 14-day pickle) — there is no precomputed-only branch in the handler — so both now seed the global RNGs (_seed_stochastic_libs: random + numpy + lazily-imported, try/except-guarded torch) and thread node_seed into qlib (Aer seed_simulator + Sabre seed_transpiler in get_labels_fromNoise); results carry nondeterministic=True + seed_used. Qshot's pilot seed was 99991 + hash(str(base)) — str hashes are PYTHONHASHSEED-salted, i.e. "fixed" only until the next server restart. pilot_seed is now threaded predict → recommend_shots → compute_pilot_pf, making the recommendation reproducible across processes given the seed. Executor cache logic untouched: fresh runs draw fresh node seeds (honest new draw, cache-bypassed), pinned runs re-derive the same seeds (cacheable in the seed-salted namespace)…91b2cd9 -
Multiverse board: configurations as small-multiple evidence
TheYuchenThe 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.4bf1a9d -
Circuit ribbon canvas: the pipeline itself becomes the visualization
TheYuchenPost-run, circuit-flow edges render as tapered ribbons (custom React Flow edge type): band thickness = clamp(1.5·sqrt(gates), 3, 18)px at each end, sampled-bezier polygon so the taper shows each downstream transformation; downstream half tinted ok/green when the step shrank the circuit, warn/amber when it grew. Backend side-channel edges stay thin/dashed (they carry calibration, not a circuit); pre-run edges unchanged. Node faces: delta-strip glyph now anchors the full tile width (stretch prop, preserveAspectRatio=none keeps the encoding invariant) and sampled-fidelity steps get a 3px CI bar (interval band + point tick, 0-1 scale) on the tile. Dismissible bottom-left legend chip (localStorage) keys ribbon width / taper tint / delta strip.324791f -
Evidence pane: tabbed IA, shared-prefix folding, reproducible export
TheYuchenInformation 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…f25d955 -
Provenance timeline: run archive, restore/replay/fork, replicates
TheYuchenPhase 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…f2c03b7
-
Second-order checks: export gaps, pre-flight rule, backward compat
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Audit pass after Fidelity/QuBound/Backend changes to catch the downstream code that wasn't updated. exportPython.ts — 4 gaps fixed - fake_backend + ibm_backend export: now writes the user-set shots into the generated script. - qubound export: now writes the threshold + pass/fail check + margin printout so the exported script matches the canvas's behaviour. - fidelity export: the call signature changed (returns tuple, takes unbound_param_policy). Previously called the old signature, which would have crashed on every exported pipeline. Now branches on method: * statevector: calls simpleFidelityEstimator(qc, unbound_param_policy=...) * sampled: calls sampledFidelityEstimator(qc, backend, shots=shots, unbound_param_policy=...) Tuple unpacking captured both fidelity + meta. Print line identifies which method is in use. Pre-flight rule added Fidelity in `sampled` mode needs a backend upstream — that's where the noise model and shots come from. Without a backen…adb5d6a
-
Self-explanatory edge labels + un-clip toolbar dropdowns
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User feedback: "2q · d2 · 2g" was cryptic for anyone not steeped in quantum vocabulary, and the Load preset dropdown was being clipped behind the canvas. Edge labels: spell it out Was: "2q · d2 · 2g" Now: "2 qubits · depth 2 · 2 ops" The chip is a few characters wider but no longer needs a legend. "ops" instead of "gates" because Qiskit's circuit.size() counts all operations (gates + barriers + measurements), so "ops" is also slightly more accurate. Toolbar overflow no longer clips dropdowns Canvas toolbar previously had `overflow-x-auto` so narrow viewports could scroll the row instead of pushing items off-screen. CSS spec gotcha: when one axis is auto/scroll/hidden, the other axis can't be `visible` — it's coerced to auto. That meant the PresetPicker and MoreMenu dropdowns (which anchor below the trigger via `absolute top-full`) got CLIPPED by the toolbar's height. Removed overflow-x-auto. To still fit on mobile, the toolbar Run button is now `hidden md:flex` — the bottom-rig…89b1792 -
Canvas becomes data-aware: shapes, headline metrics, perf tint, pre-flight
Yuchen Yuan +1: Claude Opus 4.7 (1M context)After a Run, the canvas itself shows what's happening at every node and every edge — instead of just being a connection diagram with the real numbers banished to a sidebar. circuit_shape on every StepResult (backend) StepResult schema gains a CircuitShape sidecar field ({num_qubits, depth, size, num_parameters}). workflow_service snapshots ctx["circuit"] AFTER every successful handler and attaches it to the step. Built-in handlers and plugin steps both populate; ctx-less steps (source plugins with no upstream, errored steps) leave it as None. Edge data-flow labels (frontend) styledEdges memo in FlowCanvas reads the SOURCE node's circuit_shape and attaches a tiny monospace label to the React Flow edge: "5q · d8 · 17g". Falls back to no label when the source step doesn't have a shape (no run yet, or source errored). Drop-target highlight during drag-to-insert composes on top. Per-node headline metric + duration chip + tone (frontend) New lib/headlineMetric.ts table picks the most r…33e7bee -
Mobile + large-touchscreen UX overhaul
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Addresses a 15-finding audit covering viewport handling, safe areas, touch behavior, hit-target sizing, and iOS Safari quirks. Viewport + PWA chrome - viewport meta gains viewport-fit=cover + interactive-widget= resizes-content so safe-area-inset(*) applies and the iOS keyboard triggers layout reflow instead of just overlaying content. - theme-color set for light + dark via prefers-color-scheme media queries — browser chrome now blends with our surface instead of flashing white. apple-mobile-web-app-* meta + apple-touch-icon let the app feel native if added to home screen. - New /public/manifest.webmanifest registered, minimal but sufficient for installable-PWA detection. Dynamic viewport (100dvh) - App.tsx root: h-screen → 100dvh inline (with fallback). Was clipping ~80px under iOS Safari's collapsing address bar on first paint. - UploadPluginModal max-h moved from calc(100vh-2rem) to calc(100dvh-1rem) + safe-area-inset-bottom padding so the modal fits even whe…5c7eb51 -
Display fix + focus trap + mobile touch drag-to-edge-insert
Yuchen Yuan +1: Claude Opus 4.7 (1M context)DevelopersPopover layout fix When Yuchen Yuan's row gained a second link chip (LinkedIn), the single-row "icon + truncated name + chip + chip" layout squeezed the name down to its first letter ("Y") inside the 320px popover. Restructured to two rows per person: name on top (full width, no truncation), link chips below with flex-wrap. Single-link entries still look natural — the chip row simply contains one chip. Focus trap for modals + drawers New lib/focusTrap.ts useFocusTrap hook implements WAI-ARIA Authoring Practices for dialog focus management: - On open, focus moves into the container (prefers the container itself if tabIndex=-1, else first focusable child). - Tab from the last focusable wraps to first; Shift+Tab from first wraps to last. - Defensively re-routes focus into the container if something else steals it (e.g. async overlay). - Caller restores focus on close — we already do this for the upload modal and auth dropdown via their existing openerRef pattern. App…defa0ba
-
Drag-to-insert + plugin lifecycle UX fixes
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Drag-to-insert (new feature) When the user drags a block from the palette and the cursor passes within ~60 flow-units of an existing edge, that edge lights up with an accent-coloured dashed animation. Dropping the block onto a lit edge splices it in: the old edge is removed and replaced by two new edges (upstream → new node, new node → downstream). Implementation: - New _findClosestEdge_ helper does line-segment-distance hit testing against every edge's source-right-center → target-left-center approximation. Threshold is in flow coordinates so it scales with zoom. Falls back to default 200x56 node footprint when React Flow hasn't measured yet. - _onDragOver_ checks for the palette's `application/reactflow` data type and computes the closest edge each frame, setting dropTargetEdgeId. - _onDragLeave_ clears the target so the dashed highlight doesn't linger if the user abandons the drag outside the canvas. - _onDrop_ captures dropTargetEdgeId, clears it, then either splices…dca3016 -
Plugin protocol Phase 4: full UI integration
Yuchen Yuan* lib/nodeCatalog.ts — `synthesizePluginSpec(manifest)` builds a NodeSpec on the fly from a backend-served PluginManifest. `resolveNodeSpec(kind, plugins)` is the new single source of truth for spec lookups: returns the built-in spec if available, otherwise the synthesized plugin spec, otherwise undefined. Adds PluginNodeSpec (NodeSpec + isPlugin/initials/pluginColor). * UploadPluginModal.tsx — drag-drop or click-to-pick .zip, posts to /api/plugins/upload with the browser's anonymous user_id, surfaces backend validation errors verbatim, refreshes the in- store plugin list on success. Inline docs spell out the manifest + handler.py contract. * NodePalette — new "Upload" button next to "Add blocks"; merges plugin specs with NODE_CATALOG before filtering by search / family chips. Plugin tiles render with the manifest's color + first-letter badge instead of a Lucide icon, and grow an X delete affordance on hover (with confirm dialog). * BlockPicker — same merge…74b7708 -
Plugin protocol Phase 3: frontend foundation
Yuchen Yuan* lib/userId.ts — anonymous browser ID stored in localStorage. Uses crypto.getRandomValues for a 16-byte hex string; falls back to Math.random if Web Crypto is unavailable. Matches the backend regex [a-zA-Z0-9_-]{8,64}. * lib/api.ts — three new endpoints (listPlugins / uploadPlugin / deletePlugin) and a PluginManifest type. RunRequest gains an optional user_id field so workflow runs can address the right user's plugins. * lib/store.ts — Zustand state for the current user's plugin list (refreshed on App boot, after upload, and after delete). * App.tsx — on boot, fetch this browser's plugin manifests in parallel with the health probe. Silent failure (just no plugins shown if /api/plugins is unreachable). * FlowCanvas.tsx — include getUserId() in the run-stream request payload so the backend can dispatch unknown node types to this user's plugins. No UI for upload yet — that's Phase 4. After this commit, refresh the live Space and a plugin uploaded directly via curl …10b580f -
Remove Parameter Sweep feature
Yuchen YuanReverts all 8 files involved in the sweep feature (per user request): - Delete SweepDialog.tsx - Remove Sweep button + state + dialog mount in FlowCanvas - Remove Sweep entry + props from MoreMenu (mobile) - Drop Sweep mention from TrySlide power-features strip - Drop Sweep mention from NextStepsHint in ResultsPane - Remove SweepConfig/SweepRequest/SweepRunResult types + sweepStream method from api.ts - Remove /api/workflow/sweep endpoint from backend routes - Remove SweepConfig/SweepRequest/SweepRunResult/SweepResponse from backend schemas The per-node intermediate cache stays — it was originally built as groundwork for sweep but is independently useful for re-running modified pipelines.44acddd -
Polish: unified value prop, error-message location hints, next-steps guidance
Yuchen YuanFour UX-audit follow-ups: 1. **Value-prop consistency**: WelcomeSlide's opening paragraph replaced. Was "A visual playground for research algorithms" — conflicted with README's "Interactive workflows for quantum system deployment" and TopBar's "Quantum Design Automation Studio" subtitle. Now leads with the QuDA acronym expansion + the canonical "interactive workflows" tagline, then explains the lab context underneath. All three surfaces (TopBar / WelcomeSlide / README) now agree. 2. **Error messages point at UI**: "Pick a circuit first" now also bumps a Zustand counter that App.tsx watches; the left CircuitPicker pane auto-expands (desktop) or its drawer slides open (mobile) so the user can SEE where to act. The message itself names the pane explicitly. "Canvas is empty" now mentions all three ways to add blocks (drag / Add blocks dropdown / preset). 3. **Cross-feature guidance**: After a successful run, ResultsPane shows a subtle "Where to …974ac89 -
Tour + mobile parity: address UX audit findings
Yuchen YuanUX audit found: 1. Tour didn't mention Export .py, Sweep, or BlockPicker (all shipped after the tour was last updated). 2. Sweep & Export were hidden on mobile (toolbar md+ only, not in MoreMenu). 3. TrySlide "What to try first" list was static text — users had to manually find samples + presets. Fixes: - MoreMenu: add Sweep entry alongside Auto-connect / Share / Export / Clear so mobile users can reach the parameter-sweep feature. - TrySlide: the 4 "What to try first" lines are now clickable buttons. Each loads its (preset, sample) combination via a new Zustand quickStart bridge and closes the tour. The bridge mirrors the existing pendingBlockKinds pattern. - TrySlide: new "Once you've got results" strip explicitly introduces Sweep and Export .py as the power-user features — these were completely undocumented before this commit. - TrySlide: "Build your own" now mentions Add blocks (multi-select dropdown) alongside drag interaction. - FlowCanvas.loadPreset: acce…82f6435 -
Feature: parameter sweep with comparison chart
Yuchen YuanBackend: - New POST /api/workflow/sweep SSE endpoint. Accepts a base pipeline + SweepConfig (target node_id, param_key, list of values up to 50). For each value, patches the target node's data and runs the full pipeline. Yields one SweepRunResult per value. - Schemas: SweepConfig, SweepRequest, SweepRunResult, SweepResponse. - Leverages the existing per-node intermediate cache: prefix steps upstream of the swept block are reused across all sweep iterations. An N-value sweep of the last block's parameter costs roughly N * (last-block runtime) instead of N * (full-pipeline runtime). Frontend: - New SweepDialog modal. UI flow: 1. Picks the target: auto-discovers all numeric NodeParamSpec entries on the canvas (QuCAD iters/lam/rho, Qshot alpha, etc.) 2. User sets start, end, steps (2-20) → preview of computed values 3. Click "Run sweep" → streams results from /workflow/sweep 4. Renders a line chart (param value on X, output metric on Y) plus a data table. Met…fead27e -
Fix build: remove unused vars in exportPython; fix setRun functional updater
Yuchen Yuan22b441d -
Feature: SSE streaming for real-time pipeline progress
Yuchen YuanBackend: - Add run_pipeline_stream() generator in workflow_service.py that yields each StepResult as it completes instead of collecting all. - Add POST /api/workflow/run-stream SSE endpoint in workflow.py. Cache hits emit the full RunResponse as one event + [CACHED] sentinel. Cache misses stream individual step events + [DONE]. Frontend: - Add api.runStream() in api.ts: uses fetch + ReadableStream to parse SSE events incrementally. - FlowCanvas.runPipeline() now uses the streaming endpoint. Each step appears in the Results pane as soon as it finishes, so the user sees "Step 1: Input circuit... done" while Step 2 is still running, instead of staring at a blank spinner for 2+ minutes. - On cache hit, the full response arrives instantly (same UX as before). On stream error, falls back gracefully with an error toast. The old POST /api/workflow/run endpoint is unchanged for backwards compatibility and the precompute script.02d0eb5 -
Feature: Export pipeline as runnable Python script
Yuchen YuanNew "Export .py" button in the canvas toolbar (Code2 icon). Generates a flat, readable Python script that reproduces the current pipeline: - Topologically sorts the canvas nodes using the edge list - For each block, emits the corresponding Python code with the actual parameter values from the canvas (iterations, lambda, rho, noise_snapshot, alpha, backend_name, etc.) - Includes import statements, parameter binding for parameterized circuits, and print statements for each step's output - Downloads as pipeline.py with a browser file-save dialog Supports all 9 block types: input_circuit, fake_backend, ibm_backend, qucad, qubound, compvqc, qshot, fidelity, output. IBM live backend generates commented-out code with instructions + a fake backend fallback. Also added to the mobile MoreMenu so the feature works on phones.90bf6ec
-
NodePalette: checkbox multi-select + batch add to canvas
Yuchen YuanThree ways to add blocks now: 1. Drag a tile onto the canvas (unchanged). 2. Click the checkbox (top-left corner of tile) to select, then hit the "Add N to canvas" button that appears in the header. All checked blocks are created on the canvas in family order and auto-connected in one shot. 3. Hover a tile and click the + icon (top-right) to add just that one block instantly. Implementation: - NodePalette tracks a `checked: Set<NodeKind>` state. Checked tiles get an accent border + filled checkbox. - On "Add to canvas", NodePalette pushes the ordered list of kinds to `useApp.addBlocksToCanvas(kinds)` (new Zustand store field). - FlowCanvas watches `pendingBlockKinds` via useEffect: creates nodes positioned to the right of existing ones, merges them into the canvas, auto-connects the whole graph, shows a toast with any warnings, and fitViews to show all nodes. - Zustand bridge avoids restructuring the component tree (NodePalette and FlowCanvas are siblings, not …d9a330d -
MiniMap: higher mask opacity + subtle edge stroke for natural viewport contrast
Yuchen Yuan0e1a3ce -
MiniMap: add visible stroke on viewport rectangle so it stands out from background
Yuchen Yuanb48e2e6