Commit History
-
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 -
MiniMap: use hardcoded vivid hex colors instead of theme CSS vars
Yuchen Yuan1b067da
-
Param editor collapses by default; misc review-driven cleanups
Yuchen YuanUser feedback: a tunable block shouldn't default to a fully expanded form on the canvas — that pushes the block visually big and clutters a multi-block pipeline. Default the param editor to a single-line disclosure with a chevron + a one-line summary of current values; the full editor only renders when the user clicks to expand. * QNode now owns local `paramsOpen` state (not in node-data — it's a pure UI affordance, shouldn't pollute share-links or auto-connect output). Header row shows `chev > params: <summary>`. Click toggles. * New `summariseParams()` helper builds the short summary from the schema: select values stay as their short keys (`pittsburgh_1`), numbers respect each param's `displayPrecision`. Kept under ~30 chars so it fits the block width. Three issues from an independent review of the recent Qshot work: * CRITICAL: workflow_service `_default_label()` was missing `"qshot"`, so step results in the right pane displayed lowercase "qshot" instead of "Qshot".…b89f3b2 -
Qshot preset: auto-load ry_chain_6q so default lands in 5-8q range
Yuchen Yuanbell_state (2q) is the global default circuit — perfect for QuCAD / QuBound demos but immediately trips Qshot's GNN-fallback path because it's outside the 5-8 qubit training distribution. New users picking the Qshot preset would see the warn-banner version of the result and think 'is this thing actually working?'. Add an optional `defaultCircuit` field on PipelinePreset that, when present, triggers a sample-load alongside the node/edge swap. Set it to `ry_chain_6q` for the Qshot preset only — every other preset keeps the user's current sample, since QuCAD / QuBound / CompressVQC are happy with whatever's loaded. Skip the round-trip when sampleKey is already on the target.088ad4b
-
Integrate Qshot (noise-aware shot-count recommender) as a pipeline block
Yuchen YuanNew research block from the JQub lab (handover from Tong Li). Given a QuantumCircuit + an IBM calibration snapshot + a target fidelity α, Qshot predicts the minimum shots needed to reach α × F_converged on that backend. Backend: * qlib/qshot/ — handover package (recommend_shots_v4, dual_gnn_model, show_dag, train_dual_gnn) + new __init__.py wrapping lazy singleton and NOISE_SNAPSHOTS registry. GNN-fallback lazy imports converted to package-relative so it works as a proper Python package. * cache/qshot/ — 12 dataset dirs (~3.3k records) + best_model.pt (LFS). * _handle_qshot in workflow_service: binds free circuit parameters to zero (Aer constraint), calls singleton.predict, surfaces shots / fidelity ± std / fit parameters / pilot measurements in summary. * NodeType += "qshot"; dispatcher wired. * requirements += hdbscan, torch-geometric, pylatexenc. torch-scatter / torch-sparse NOT pinned — PyG falls back to pure-Python scatter without them, far simpler on HF Spaces. Fr…fd88622 -
Fix mobile toolbar: icon-labelled status + PresetPicker popover anchor
Yuchen YuanTwo regressions from yesterday's responsive pass, caught in a phone-size screenshot: 1. Mobile status counter "5·4" was unreadable — bare numbers with no units don't signal "blocks" and "links". Add small Box / Link2 icons next to each digit so the compact form reads like "<box> 5 · <link> 4" and is self-explanatory. aria-label retains the long form for screen readers. Digits use `tabular-nums` so the width doesn't jitter as counts change. 2. PresetPicker popover was clipped off the right viewport edge on narrow screens. The old `left-0` anchor extended the 16rem popover rightwards from the button's left edge; because that button now sits in the right-hand toolbar cluster (post-refactor), "rightwards" meant "off-screen". Switch to the same pattern PapersPopover / DevelopersPopover already use: mobile (<sm) pins the popover with `fixed right-3 top-14` to the viewport's top-right, so it never depends on the button's position. Desktop (≥sm) keeps …dcf2221 -
Extract MoreMenu into its own file; make Light the default theme
Yuchen YuanTwo unrelated cleanups rolled into one commit. --- 1. Extract MoreMenu into components/MoreMenu.tsx FlowCanvas.tsx had crept to 626 lines after the toolbar responsive pass, overshooting the ~350-line ceiling the Wave 2 handover cleanup set. The inline MoreMenu component was the biggest blob (~130 lines including its own outside-click/Escape effect and menu-item data table), and it has nothing to do with React Flow state or pipeline execution — it's a self-contained mobile overflow menu. New file: `components/MoreMenu.tsx` (172 lines, includes new responsive guard — see point 2). FlowCanvas drops to 487 lines; still a little fat (CanvasToast is the next candidate), but back in the reasonable range. Also slipped in: a matchMedia guard for the case where the user opens the menu on mobile, then stretches the viewport past the `md` breakpoint (768px). Before this commit the React `open` state stayed true while the menu's wrapper became `display:none`; if the user later shrank the viewpo…8f72426 -
Toolbar responsive pass + Jovin-style noise-profile sidechain styling
Yuchen YuanThree interrelated fixes to the canvas toolbar and auto-connect output. --- 1. Three-tier responsive toolbar so the row never runs out of space. Previously the toolbar was a flat row of buttons whose labels started disappearing below 640px (`hidden sm:inline`) while other labels stayed, producing the inconsistent look in the earlier screenshot ("Clea" half- truncated, Auto-connect/Share icon-only, Load preset still full text). Worse, on a real phone (~390px) the row was just over-wide. New tiers: * ≥ lg (1024px) - every button shows icon + label. * md – lg - Auto-connect / Share / Clear collapse to icon-only. Load preset + Run pipeline keep their labels. * < md - Auto-connect / Share / Clear fold into a single "⋮" More menu (new inline MoreMenu component). Run pipeline also drops its label, becoming just the play icon. Load preset shows Layers icon only (text …4f6e441 -
Move toolbar notice into a canvas-bottom toast
Yuchen YuanThe single-line truncated notice in the toolbar was always going to lose to any non-trivial amount of text on narrow screens. Even after the fit-the-toolbar rewrite, users were still seeing "(hover for 3 not..." cut off at the right edge. Surface feedback as a toast pinned to the bottom-center of the canvas instead. The toast: * Shows the summary line at top and renders each Auto-connect warning as its own bullet below (via `notice.detail`), so multi-warning results become readable without hover. * Caps at 36rem wide, centred over the canvas, so it never fights the toolbar or the side panels for space. * Tone-coded icons (Check / AlertTriangle / AlertCircle) with matching border + tinted background. * Explicit × dismiss button plus auto-fade (ok: 4s, warn: 8s). * Runner errors (danger tone) stay sticky — a 6-second auto-fade on a stack trace the user didn't finish reading is worse than a small × button. * role="status" / role="alert" + aria-live so…374ea35 -
Fix Auto-connect notice breaking the toolbar layout
Yuchen YuanThree compounding problems visible when Auto-connect produced warnings: 1. The warning text was concatenated onto the summary line, ballooning the notice past 120 characters. Ellipsis truncation then left the user with "only t..." — visible but useless. 2. The left flex cluster had `min-w-0` but no `flex-1`, so it expanded to fit the long text and started pushing the right-side button group off the end of the row. 3. None of the btn variants carried `whitespace-nowrap`, so once a button was squeezed its label wrapped to two lines ("Load" / "preset", "Auto-" / "connect") — visually broken even after truncation kicked in. Fixes: * `Notice.detail` optional field — the notice now shows a short "Connected 4 blocks. (hover for 2 notes)" summary and parks the full multi-line warning list in the hover tooltip. * Left toolbar cluster gets `flex-1 min-w-0`, right cluster gets `shrink-0`, parent adds `gap-4` for breathing room. Truncation now actually engages becau…11a5446 -
Add Auto-connect button: one-click sensible wiring
Yuchen YuanA user drops a handful of blocks onto an empty canvas and often has no idea which handle connects to which. Clicking "Auto-connect" bucket- sorts the blocks by their family (source / backend / algorithm / metric / sink), sorts each bucket left-to-right by x-position (so hand-ordering still wins), and strings them into a single main chain: source(s) → backend(s) → algorithm(s) → metric(s) → sink(s) This is the pattern every existing preset already follows, and it matches the research workflow the three algorithms are designed around. Edge semantics in workflow_service.py are just topological ordering with shared ctx, so no side-channel routing is needed. The heavy lifting is a pure function in lib/autoConnect.ts so it's trivial to unit-test later. Corner cases covered: * Empty / single-node canvas → no-op with advisory notice. * Missing source / sink / backend → still wires what we have, surfaces a human-readable warning alongside the "Connected N blocks" confirmatio…ea5983b -
frontend: split out PapersPopover, PresetPicker, ShareButton, EmptyCanvas
Yuchen YuanMove four self-contained sub-components out of TopBar/FlowCanvas into their own files. Behaviour identical; the parents shrink meaningfully (FlowCanvas 453 -> 283, TopBar 320 -> 187) and each extracted piece now has a clear home for future tweaks.3113ad9 -
frontend: extract lib/clipboard.ts for copy helpers
Yuchen YuanDedup the 18-line navigator.clipboard + textarea/execCommand fallback that TopBar (copy bibtex) and FlowCanvas (copy share link) had both open-coded. Behaviour identical; saves ~20 lines across the two call sites and gives future copy-to-clipboard features a single entry point.baec961 -
Add BibTeX copy + share-link URLs
Yuchen Yuan +1: Claude Opus 4.7Two features in one commit (both pure frontend, short). BibTeX copy - Extend paper metadata in nodeCatalog with a bibtex string for QuCAD, QuBound, and CompressVQC. - Papers popover now renders each row as a link + copy button; clicking copy writes the BibTeX to the clipboard and shows a short check-mark confirmation. Share link - frontend/src/lib/share.ts packs canvas state (nodes, edges, positions, per-node params, selected sample key) into a compact base64url JSON on the URL fragment. - FlowCanvas hydrates from #s=... on boot, falling back to the default preset if no hash payload is present; loads the linked sample circuit so recipients see the same Input circuit. - New "Share" button in the canvas toolbar copies the current pipeline as a URL (with a clipboard fallback for non-HTTPS dev). - CircuitPicker tracks sampleKey in the Zustand store so Share can record "which sample was loaded"; uploaded circuits clear the key (they can't round-trip through a link). C…a2227a5 -
Preset picker: keep popover in viewport on mobile
Yuchen YuanThe popover had `right-0` (anchor right-to-right of the button), which extends 256px leftwards. On a 390px-wide iPhone the "Load preset" button sits mid-toolbar, so the popover's left edge landed at roughly -80px, clipping the labels past the screen's left edge. Switch anchoring responsively: - <md: `left-0` — popover extends right from the button's left edge. Leaves ~40px of right margin on an iPhone 14 / 13 / 12 (390px) and is still clear of the right edge on an iPhone SE (375px). - ≥md: `md:right-0` — unchanged desktop behavior, popover aligns to the button's right edge so it visually hangs under the right-hand Clear / Run pipeline cluster. Also: width capped at `min(16rem, calc(100vw - 1.5rem))` so even on unusually narrow viewports (embedded webviews with chrome etc.) the popover auto-shrinks instead of overflowing.cf25614
-
Preset picker: vertical list + distinct accent2 fill; trust proxy headers
Yuchen YuanPreset picker UX - "Load preset" button switches from the subtle outline `btn` style to a new `btn-secondary` variant (tinted accent2 background + accent2 border + accent2 text). Sits between the neutral outline `btn` ("Clear") and the filled gradient `btn-primary` ("Run pipeline") so all three toolbar actions are visually distinct. - Popover changes from a horizontal flex row to a vertical `flex-col` list with a fixed 256px width, matching the convention of a typical menu and removing the awkward horizontal wrap when more presets are added later. Uvicorn --proxy-headers (defensive HTTPS fix) HF Space terminates TLS at edge nginx and forwards `X-Forwarded-Proto: https` on. Without `--proxy-headers`, uvicorn ignores that header, so FastAPI's automatic 307 redirects (e.g. trailing-slash normalisation) and any `request.url_for(...)` calls emit `http://` URLs that get mixed-content-blocked when the page is served over `https://*.hf.space`. This …66f5aac -
Add Light (Paper) and GMU (Mason) themes, runtime-switchable
Yuchen Yuan +1: Claude Opus 4.7Groundwork: * Colors migrated from hard-coded hex in tailwind.config.js to CSS variables (RGB triplets so `/<alpha-value>` slash syntax still works, e.g. `bg-canvas/80` -> `rgb(var(--color-canvas) / 0.8)`). * React Flow overrides and MiniMap/Background colors in FlowCanvas now read from the same variables, so theme swaps carry through to the canvas widgets too. * Body background gradient, scrollbar thumb, and edge-stroke color are per-theme via --body-bg, --scrollbar-thumb, --rf-edge-stroke. Themes registered in src/lib/theme.ts: * dark -> :root default (deep navy + cyan — unchanged) * light -> white paper background, deep sky/violet/pink/emerald accents. Good for slides / screenshots / print. * gmu -> Mason green canvas + Mason gold primary (#FFC72C), green secondary (#006633), teal/red algo accents. UI: ThemeSwitcher dropdown in TopBar (next to the Tour button), shows preview swatches and tagline, persists …a4eeda5 -
Cache pipeline runs by (circuit, graph) content hash
Yuchen Yuan +1: Claude Opus 4.7For the demo flow -- pick a sample, pick a preset, hit Run -- the server was re-executing the full QuCAD + LSTM + QAOA stack every click, which is 30-90s per preset. Most visitors just want to see what each algorithm produces on a bundled sample; they bounce long before the pipeline finishes. This commit adds a read-only, content-addressed cache for run responses. Key is sha256(qpy_bytes(circuit) + normalized(nodes+edges) + use_live_ibm) truncated to 16 hex chars. The /workflow/run handler looks up the key before dispatching run_pipeline; hits return the stored RunResponse with from_cache=true. Live-IBM runs always bypass the cache, since calibration drifts and the point of "live" is to hit hardware. The precompute script under scripts/ runs every PRESET x every sample and serializes responses to backend/cache/precomputed_runs/<key>.json. Those files are checked in and bundled into the image, so first-visit users see results in <1s with a "cached" pill in the ResultsPane header expla…e4e737d -
Add preset pipelines dropdown and paper links
Yuchen Yuan +1: Claude Opus 4.7The canvas used to boot into one hardcoded 4-block demo and the only way to get back to it was a Reset button. Replaced that with a named preset registry (QuBound / QuCAD / CompressVQC / Full stack) exposed via a "Load preset" dropdown in the canvas header. Each preset is a pure-data graph spec; buildPresetGraph turns it into React Flow nodes/edges with a simple left-to-right layout. Adding new presets is a one-file edit. Also surfaced the underlying research papers: - QuCAD arXiv:2304.04666 (ICCAD 2023) - QuBound arXiv:2507.17043 (IEEE TCAD 2025) - CompressVQC arXiv:2207.01578 (ICCAD 2022) A NodeSpec.paper field carries url/title/venue. The algorithm node cards show a small paper icon on hover (top-left, mirroring the delete × on top-right), and the WelcomeTour AlgorithmsSlide now links each card's venue back to arxiv so the papers are discoverable without hovering. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>d9de684