Commit History
-
Compare reachability: one hop from where the question arises
TheYuchen* 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.8311ef0 -
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 -
TipIcon: portal the tooltip out of overflow containers
TheYuchenThe CSS-only bubble clipped inside every overflow ancestor (Evidence pane scroll body). createPortal to document.body, position:fixed from the trigger's rect, measured-then-placed, flips above/below by viewport space, clamps horizontally, closes on scroll/resize. Hover+focus preserved; sr-only hint keeps the accessible name inside the trigger (portal bubble is aria-hidden + pointer-events-none). Export-safe: trigger keeps data-export-strip, bubble lives outside every exported subtree. No new deps.d3d2c90 -
Typography audit: 9px floor, label/decimal convergence, conventions note
TheYuchenInventoried font sizes, label casing, chip styles and number formatting across the seven views. The system is already largely convergent; three real drifts fixed, and the convention is now written down next to the tokens (index.css UI-conventions block): - 9px floor: the only two sub-9px labels (CompareView "divergence point", BlockPicker "plugin" suffix) bumped from 8px to 9px. - Section-label convention: FinalMetrics' uppercase labels were the one instance missing tracking-wider. - Compact-line decimals: the fidelity card's across-runs line mixed a 2dp mean with a 1dp range in one sentence — now 1dp like every other strip/board stat (headline metrics and mono detail lines stay 2dp; targets stay whole pp). Deliberately NOT churned (documented instead): tracking-widest on palette family badges (distinct role), micro-chips in 28px history rows and tab count badges (px exceptions), CompareView's 2dp Δ (it sits in a 2dp mono detail line).2e22380 -
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 -
Restore the welcome tour, rewritten for the evidence workbench
TheYuchenThe 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 pointe…afdd2a9 -
Remove the GMU-branded theme entirely
TheYuchenDouble-blind treatment is no longer needed (reviewers see the paper, not the site), and the branded palette was the last piece of identity chrome with real maintenance cost: theme.ts gated it behind ANON, vite.config.ts carried a CSS-stripping generateBundle hook, and every new visual had to be checked under a third palette. - theme.ts: ThemeKey is light|dark; gmu entry gone; stored "gmu" preference migrates to the light default (comment documents it). - index.css: [data-theme="gmu"] token block deleted. - vite.config.ts: %THEME_KEYS% is always ["dark"]; the anon CSS-stripping hook is retired (nothing left to strip). The rest of the VITE_ANON machinery (titles, manifest) is unchanged. - Stray "three themes" comments updated. Residue grep: only the migration comment mentions the old key.ceee520 -
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 C+E4: lineage row crowding; compare selection survives deletion
TheYuchen- 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.e200590 -
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 -
Wave Q: paper figure pipeline (trace scrubbing, AI-grade SVG, 4x raster)
TheYuchenFilmstrips: Evidence Theater gains a batch-index trace scrubber (replayed/archived runs only; live path untouched) that renders the chart AS OF batch k — truncated intervals/envelope, "so far" readouts, stop annotation only once reached. Exports in a scrubbed state are bit-exact per (trace, k) and embed trace_position in the provenance; F0 filmstrip recipe (batch 2 / batch 4 / final) documented with live-verified widths (±3.06 / ±2.16 / ±1.93pp). Illustrator-grade true-SVG: new lib/svgPaper.ts holds the pure presentation-inlining logic (whitelisted attributes resolved via getComputedStyle to literals — zero var()/currentColor/class/<style>; concrete font stacks; px normalized; viewBox-derived pt sizing; standalone XML header) with a plain-node unit test (scripts/check_svg_paper.test.ts) and a per-export safety audit. Raster: hybrid PNG at explicit pixel dimensions (never devicePixelRatio); 2.5x default, 4x via alt-click/long-press on the camera. Files named <view>_<scenario|runid>[_b…9ee0efc -
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 J: uncertainty-in-provenance (evidence-mass lineage, pooled CIs)
TheYuchenProvenance 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…75184f5 -
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 -
Memoize fake-backend noise models; first-visit demo archive machinery
TheYuchenBackend: 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 []).b84dc32 -
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 -
Gate-level circuit diff: qubit-lane LCS alignment per step
TheYuchenBackend: - New services/circuit_diff.py: lane_sequences() tokenizes each qubit's gate sequence (name + 3dp param fingerprint; unbound params keep symbol names; 2q gates on both lanes with c/t role tags, symmetric ops undecorated; measures kept, barriers skipped) and diff_lanes() aligns before/after lanes with a standard LCS diff (kept/removed/added in merged order). Hard cap 12 qubits / 600 combined ops -> truncated marker. - Executor: copy the circuit BEFORE dispatch (handlers may mutate ctx["circuit"] in place -- the historical QuBound measure_all bug shape), stamp gate_diff into StepResult.transformation when the step changed the circuit. Best-effort: any diff failure is logged and omitted, never breaks a run. - tests/test_gate_diff.py: 14 torch-free unit tests incl. an executor wiring test that mutates in place. Frontend: - New CircuitDiff.tsx inside SignatureCard, collapsed <details> ("Gate-level diff / N removed / M added"): one mono-labelled row per qu…94e47b0 -
Signature glyph: designed delta-strip encoding replaces text chips
TheYuchenThe transformation signature is now a real glyph, not typography: a fixed-order strip of horizontal diverging bars (D, G, P, Q top to bottom) around a center zero axis. Bar length is relative change (delta/before, capped at +/-100%) so a depth halving reads the same size on any circuit; decreases extend left in the ok tone (every optimizer here aims to shrink), increases right in warn; qubit changes are neutral accent either way (width is a property, not a cost). Zero channels render as faint ticks so the 4-row silhouette is constant - glyph recognition depends on the constant frame. New export SignatureGlyph({t, size}) draws the strip from a raw payload at two densities: tile (46x14, tooltip carries numbers) on canvas nodes and in the CompareView step table (replacing sigText cells; sigText survives as tooltip), and card (180x56, channel letters + printed deltas) in the results pane, beside the exact before->after grid. Per-op chips become a |delta|-sorted diverging bar list. All fil…4288025 -
Provenance lineage view: timeline becomes a real visualization
TheYuchenReplace 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…cfb84a4 -
Composition comparison: two archived runs side by side, CIs not scalars
TheYuchenPhase 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.d105dc7 -
Transformation signatures: uniform circuit-delta vocabulary per step
TheYuchenPhase 2 (part 1) of the evidence-workbench rework. The executor now snapshots the circuit's structure (shape + gate counts by op) before and after every dispatched node and stamps a uniform transformation payload onto each successful StepResult: before/after snapshots, shape delta (qubits/depth/gates/params), per-op count delta, and a changed flag distinguishing pass-through steps from mutating ones. Captured centrally — handlers (and user plugins) never build this themselves, which is what keeps the vocabulary identical across QuCAD pruning, CompVQC folding, transpiles, and anything a plugin does. Kind-specific detail stays in each handler's summary. Frontend renders it at two densities: SignatureTile on canvas nodes (nonzero delta channels only, e.g. "D-4 G-12 P-12"; decrease=green since every optimizer in the catalog aims downward, increase=amber, qubit-width neutral) and SignatureCard in the results pane (before → after per channel + per-op chips). Pass-through steps say so expli…f956d64 -
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
-
Polish pass: dedupe pipeline runners, shared chip component, emitter map
Yuchen YuanThree concrete refactors that reduce surface area for future bugs and make the codebase easier to maintain by hand or by LLM. 1. backend/app/services/workflow_service.py — run_pipeline and run_pipeline_stream used to be two 100+ line copies of the same dispatch loop. Extract a single _execute_pipeline generator and make both functions thin wrappers (one collects into a list, the other yields). Per-node dispatch (input / built-in / plugin / skipped) and the post-step circuit_shape stamping are factored into _dispatch_one_node. Plugin hydration becomes a named helper instead of an inline block duplicated on both paths. Also pulled out _clamp_shots and _set_backend_ctx so the two backend handlers share their shots-clamping and ctx-writing patterns; _cache_put's prefix_types argument becomes required (all call sites pass it; the dead 'None means skip sidecar' branch is gone); the run_cache.qpy_dump_bytes import moves to the top of the file with the …4ee621f -
Fix sampled fidelity being frozen by the per-node step cache
Yuchen YuanThe SSE run path caches each step's StepResult+ctx snapshot keyed on the pipeline prefix. For deterministic blocks (statevector fidelity, QuCAD output, etc.) that's a feature: re-runs reuse the trained model or computed metric. For sampled fidelity it was a silent scientific bug — the first shot draw got frozen and replayed forever. Reproduced live: 5 SSE runs of bell + FakeFez + fidelity(method=sampled) returned identical 0.5938 with from_step_cache=true after the first run. Fix: handlers can mark a StepResult as nondeterministic. The stream loop carries a sticky flag — once a nondeterministic step is emitted, both cache lookups AND cache puts are disabled for the rest of that run, including all downstream steps (their ctx depends on the fresh draw, so a lookup hit would restore a contradictory state). Frontend renders a 'live' chip on those steps so users know the cache is intentionally bypassed. Statevector fidelity is unchanged (still cacheable). QuBound / Qshot / QuCAD are als…b3ebd47
-
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 -
Global code-quality polish: DRY + named constants + leak cleanup
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Targeted refactor pass based on a structured audit. Pure maintainability wins; no behaviour changes. Frontend: collapse 8 popovers into one hook 8 components (AuthButton, ThemeSwitcher, MoreMenu, PapersPopover, SupportPopover, DevelopersPopover, BlockPicker, PresetPicker) each carried an identical 16-line "close on mousedown + Escape" effect block. Extracted to lib/useDismissOn.ts; ~150 lines deleted, one hook to audit instead of eight. useDismissOn(open, rootRef, useCallback(() => setOpen(false), [])) Behaviour is intentionally identical to the inlined block so older git-blame on the call sites stays coherent. Backend: consolidate effective-user-id resolution routes/plugins.py and routes/workflow.py each carried a subtly different implementation of "session cookie wins over query_user_id, anon hf_ prefix is reserved". Pulled into auth_service.resolve_effective_user_id(request, query, *, required). - required=True path raises ValueError → routes/plugins maps to 400 - required=…57f0b3e -
Hide IBM live-mode chip entirely when server can't go live
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User feedback: "live ibm: unavailable" / "ibm: n/a" chip adds noise without value on a deployment that has no IBM token configured — it's a permanent dead chip the user can't act on. Now the chip only renders when the server actually supports live mode (token configured AND ALLOW_LIVE_IBM=true). The 3-branch state-machine collapses to 2 (on / off-using-cache); the dead "unavailable" branch is gone. setUseLiveIbm + the useLiveIbm store state are kept untouched since the run code still reads them when the server IS live-capable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>89aa5b4 -
Fix popover clipping + IBM-chip transparency bleed-through
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User report: two visible glitches on the screenshots — (1) on a desktop browser, the icons in the TopBar's right cluster appeared to be visually stacked behind/inside the "ibm: n/a" chip on the left cluster; (2) on iPhone Safari, opening the Theme dropdown made the menu slide off the left edge of the screen. Root cause (1) — opacity-70 on the IBM chip When the server has no IBM token, the chip was rendered with class `opacity-70`. That made the WHOLE element 70% translucent, including its background. At narrower viewports where the right- cluster icons (Lab/Papers/Developers/Theme/Tour/Support/Auth) flex- squeeze closer to the chip, anything sitting under or behind it became visible through the alpha. Fixed by replacing opacity-70 with `!bg-canvas` (solid surface color) + the existing `text-mute` for the dimmed-disabled look. Identical visual intent, no alpha transparency. Root cause (2) — 3 popovers lacked the mobile-safe anchor pattern PapersPopover, Support…db325d1 -
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 -
Mobile + a11y + defense-in-depth fixes from broader audit
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Mobile + keyboard access to palette tiles (CRITICAL) Previously the only way to add a block to the canvas was HTML5 drag- and-drop, which doesn't fire on touch devices and has no keyboard analogue. Tiles were <div draggable> with no role, no tabIndex, and no click handler — so mobile users could only use the BlockPicker dropdown, and keyboard users had no path at all. - PaletteTile is now a <button type="button"> with onClick → addBlocksToCanvas([kind]) plus a Space override (Enter is handled by the native button semantics). - Drag-and-drop still works for mouse users on top of this — the button element preserves draggable + onDragStart so drag-to- insert keeps working. - focus-visible:ring-2 ring-accent makes the focused tile obvious to keyboard users. - aria-label per tile now reads "Add Gate Counter block to canvas. Tally gate types in the current circuit." (label + tagline) rather than relying on title-attr-only. Touch-friendly delete X (IMPORTANT) Both the palett…524287c -
Plugin output: typed figures (markdown / table / bar / svg / png)
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Plugins can now emit a list of typed visual outputs beyond the flat summary dict. Each figure is a small JSON object with a `type` field; the result card renders them inline below the summary table. Five types ship today - markdown — headings, lists, bold/italic/code, fenced code blocks. Raw HTML is rejected by the backend; the frontend renderer never reaches for dangerouslySetInnerHTML on this path. - table — headers (≤ 12 cols) + rows (≤ 100 rows), primitives only. - bar — inline SVG bar chart, up to 50 bars, zero JS deps. - svg — escape hatch with sanitisation: rejects <script>, javascript:, <foreignObject>, <iframe>, <object>, <embed>, and any on*= event-handler attribute. Up to 256 KB. - image_png_b64 — base64-encoded PNG, ≤ 1 MB decoded, must have the PNG magic bytes (JPEG/GIF/other formats rejected). Each figure also accepts an optional `title` (≤ 120 chars) rendered as the panel header. Total `figures` list capped at 10 entries. Backend - New plugin_run…725a720
-
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 -
Full audit pass: leak fixes, sign-in clarity, functional bugs
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Triggered by user request "全方位的检查、测试" covering visualization, user comprehension, page logic, ease-of-use, science, info leakage, and security. Three parallel audits ran (info-leak, sign-in clarity, visual/a11y, functional/scientific); fixes batched below. Critical functional bugs - workflow_service.run_pipeline + run_pipeline_stream now call plugin_service.hydrate_from_dataset_if_needed before dispatch. Without this, a logged-in user running a pipeline on a fresh container (or on the mirror Space) would see "plugin not found" even though it sits safely in their HF Datasets backing store. - plugin_runner._scrub_scalars / _scrub_value drop NaN and ±Inf instead of passing them through. Standard JSON has no representation for either; model_dump_json emits NaN/Infinity which the browser's JSON.parse refuses, so any plugin returning a numerically degenerate scalar used to make the entire /run response fail to parse client- side. NaN → dropped from scalars dict; Inf → nul…4c566b4 -
Multi-user: HF OAuth login + per-user plugin persistence
Yuchen Yuan +1: Claude Opus 4.7 (1M context)What this lets users do - Anyone can click "Sign in" in the top bar and authenticate with their Hugging Face account (OpenID Connect via the HF OAuth flow). No account creation, no password management on our side. - Each signed-in user gets their own private namespace for uploaded plugins. Other users (and other browsers from the same person) cannot see them. - Plugins uploaded while signed in are mirrored to a private HF Dataset repo (qudastudio/quda-user-data) so they survive container restarts and follow the user across devices. - Guest (anonymous) mode is fully preserved: visitors can still drop a .zip without signing in; those plugins continue to live in /tmp and are per-browser, exactly as before. Architecture Browser ──cookie──▶ FastAPI ──HfApi──▶ HF Dataset (private) │ └──▶ /tmp (volatile cache) Identity = session cookie's hf_<username> (when signed in) ∥ anon UUID query par…b6faf15 -
Polish pass on plugin Upload modal
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Detail review surfaced four small but meaningful items. Storage listener over-fires (App.tsx) - Was triggered by any quda.* key — included pane widths, theme, live-IBM toggle. Tightened to e.key === "quda.pluginsRev" so only actual plugin upload/delete events refetch. bumpPluginsRev() already writes that exact key. Duplicate-install regex collision (UploadPluginModal) - /already have a plugin/i matched both the per-kind duplicate AND the 5-plugin cap message, so a user at cap who clicked Install on a sample saw a green success banner. Tightened to /already have a plugin with kind=/i so only the idempotent case surfaces as a friendly hint; the cap is now an honest error. - Added a Content-Type guard after the example zip fetch so a captive portal serving an HTML 200 surfaces "got <type>, not a .zip" instead of the confusing manifest-parse error from the backend. Modal UX restructure - Examples-first ordering when installedPlugins.length === 0 — a first-time visito…4d0158a -
Bundled example plugins + UX polish from second audit pass
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Lets users try the plugin upload flow end-to-end without writing one from scratch: the Upload modal now shows a "Try with a sample" section that fetches /api/plugins/examples and offers per-example Install + .zip download buttons. Backend: - New read-only GET /api/plugins/examples returns minimal metadata parsed from each bundled zip's manifest.json (label, family, tagline, color, size). Catalog is empty if the examples dir is missing. - New read-only GET /api/plugins/examples/{name}.zip returns the raw zip bytes. Name is constrained to `^[a-z][a-z0-9_]{0,30}$`; resolved path must stay inside the examples dir (defence in depth against symlink shenanigans). 400 on bad name, 404 on missing or escaped path. - manifest.json read inside the zip capped at 64 KB so a malformed bundled example can't allocate unboundedly. - Defensive comment about route ordering vs the path-param DELETE. - Dockerfile COPYs example_plugins/ into the runtime image so the endpoints have content to s…ef8bb5f -
Plugin protocol Phase 5: final audit fixes + polish
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Defence-in-depth fixes from the security/UX/scientific audits: Backend safety: - Reject `\` and absolute paths in zip entry names (defensive even on Linux containers). - Cap stdin payload at 50 MB in the subprocess wrapper before parsing. - Drop the full `/tmp/quda_plugins/<user>/<kind>/` path from the "handler.py missing" error message — user already knows their kind. Frontend UX: - QNode now renders a red-bordered tombstone card with a "?" badge and a "plugin not installed" hint when a referenced plugin has been deleted, instead of silently disappearing. - App.tsx listens for `storage` events on `quda.*` keys to refresh the plugin list across tabs. - UploadPluginModal title now reads "Upload your own block" with a one-line explanation of what plugins do. - TrySlide adds a "Upload your own block" tip alongside the Export .py one so new users discover the plugin workflow. Docs: - README.md gains a User plugins section pointing to PLUGIN_SDK.md. - PLUGIN_SDK.md adds a "…d06bf19 -
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