Spaces:
Sleeping
Sleeping
Commit History
-
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 -
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 3 audit findings: export signatures, cache safety, accessibility
Yuchen Yuan1. CRITICAL — exportPython.ts CompressVQC template had 3 wrong function calls: - quadraticProgram_luttoqp(lut) → (qc, lut) - admmOptimizedCompVQC(qp, lut) → (qp) - resultsCompressVQC(qc, result, lut) → (result, qc) All verified against backend/qlib/compvqc.py actual signatures. Users who exported and ran pipeline.py would have hit TypeError. 2. MEDIUM — Step cache _cache_put now deep-copies QuantumCircuit objects via qc.copy() instead of storing references. Prevents a future handler that mutates circuit in-place from silently corrupting cached snapshots. Current handlers all reassign, so this is defensive, but the cost (one .copy() per step) is cheap. 3. MEDIUM — BlockPicker button now has aria-haspopup, aria-expanded, aria-label. Dropdown div has role="menu" and aria-label. Screen reader users can now navigate the block catalog.51365eb -
Feature: per-node intermediate result cache
Yuchen YuanBackend: - In-memory LRU cache (200 entries) keyed by pipeline-prefix hash. The prefix hash covers (circuit QPY + all node types & params up to the current step). If the user changes only the last block, all preceding steps return instantly from cache (~0ms) instead of re-running (saves minutes for QuBound LSTM / Qshot HDBSCAN). - After each step, a shallow copy of the ctx dict is cached alongside the StepResult. On cache hit, ctx is restored so subsequent steps can pick up where the cached prefix left off. - Cached steps are flagged with from_step_cache=True (new optional field on StepResult) so the frontend can distinguish them. - Cache is process-scoped and resets on container restart. LRU eviction at 200 entries prevents unbounded memory growth. Frontend: - StepResult type extended with optional from_step_cache. - Results pane shows a small "cached" chip on steps served from the intermediate cache, so users can see which steps were instant. Works with the SSE st…1e3019d -
TopBar: remove backdrop-blur that trapped tooltip in compositing layer
Yuchen Yuana84a94a -
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 -
Polish pass: brand cleanup, popover consistency, mobile safety
Yuchen YuanAudit-driven fixes: 1. Branding: - Dockerfile comment: QuAIM → QuDA Studio - package.json name: jqub-quantum-flow-ui → quda-studio-ui - All localStorage keys: jqub.* → quda.* (theme, pane widths, collapsed state, IBM toggle, tour flag). Existing users will see fresh defaults on first visit (acceptable — the old Space URL is gone anyway so there's no continuity to preserve). 2. Popover consistency: - All 4 popovers (Papers, Developers, Support, BlockPicker) now share z-40 instead of a mix of z-30 and z-50. - BlockPicker gets the same mobile-safe positioning as the other three: fixed left-3 top-14 on narrow screens, absolute on ≥sm. - BlockPicker width clamped with min() so it can't overflow on narrow viewports. 3. Pre-hydration script in index.html updated to read quda.theme instead of jqub.theme.95967ab -
Family chips: click to filter tile strip to one category, click again to show all
Yuchen Yuan38f03db -
TipIcon: force opaque background via inline style + bump z to 100
Yuchen Yuanb788eb2
-
BlockPicker: pre-check required blocks + per-family guidance hints
Yuchen Yuan7a9f56e -
Add dropdown BlockPicker for browse-and-select workflow
Yuchen YuanNew "Add blocks" button in the NodePalette header opens a dropdown list showing ALL blocks organised by family (Source / Backend / Algorithm / Metric / Sink). Users can: - Search/filter by name or tagline - Check multiple blocks via checkboxes - See "on canvas" badges for blocks already placed - Hit "Add to canvas" to batch-create all checked blocks (auto- connected via the existing Zustand pendingBlockKinds bridge) The tile strip stays for drag-and-drop (quick access). The dropdown is the structured alternative for building a pipeline from scratch or when there are many blocks to browse. Tile checkboxes from the previous commit are removed — tiles go back to drag-only, keeping them clean. The dropdown handles the multi-select workflow instead.f152600 -
TipIcon: add position prop; TopBar tooltip now opens below to stay in viewport
Yuchen Yuan62faa2c -
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 -
NodePalette: searchable categorised block catalog
Yuchen YuanReplace the flat drag-strip with a structured catalog that scales to 30+ blocks: - Search box: instant filter across label, tagline, family, kind. - Family groups with vertical labels (SOURCE / BACKEND / ALGORITHM / METRIC / SINK) and collapse toggles; collapsed groups show "N hidden" placeholder. - Family chip bar in header for quick toggle visibility per category. - Whole palette collapsible to a thin "N blocks available" bar to reclaim canvas space. - Drag-to-canvas interaction unchanged. - Responsive: mobile stays horizontal-scroll single row; desktop wraps with family dividers. - PaletteTile component unchanged (same size, same paper-link badge, same drag data transfer). Current 9 blocks render identically to before when search is empty and all families are expanded. Adding a new block only requires appending to NODE_CATALOG in nodeCatalog.ts.61bf7f9 -
Support popover: move abbreviation after NSF number per advisor feedback
Yuchen Yuanf73d0cc -
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 -
Support popover: move to far right, NSF logo mark, visual separation
Yuchen Yuan- Move SupportPopover from the Lab/Papers/Developers cluster to after Tour with its own divider, so it sits at the rightmost position and reads as a distinct "acknowledgment" area rather than another nav link. - Replace the Heart icon with an inline SVG NSF globe mark (blue circle with white "NSF" lettering) for instant recognition.afeaa39 -
Add Support popover listing NSF funding acknowledgments
Yuchen YuanNew SupportPopover in TopBar (between Developers and the divider), same UX as Papers/Developers popovers. Lists 5 NSF awards: - 2507948 (SPV) — Synthesis, Profiling, and Verification - 2513431 (QuAIM) — Quantum Cyberinfrastructure - 2440637 (AutoQC) — CAREER: Deployment Automation - 2311949 (TeReQuLe) — Temporal-Reliable Quantum Learning - 2320957 (QuacyTrain) — Quantum Research Workforce Dev Each entry links to the NSF award search page. Footer carries the standard NSF disclaimer.2ab0857 -
Rebrand QuAIM → QuDA Studio (Quantum Design Automation Studio)
Yuchen YuanNew product name across all user-facing surfaces: - TopBar: title + tagline - index.html <title> - WelcomeTour slide 1 gradient heading - FastAPI app title + boot/shutdown log messages - README HF frontmatter (title, short_description) + H1 - config.py module docstring Domain moves from jqub21-quaim.hf.space to qudastudio-app.hf.space (new HF org "qudastudio" under the same jqub21 account).8742007
-
Auto-connect: per-algorithm backend warnings; tour drift fixes
Yuchen YuanAuto-connect was using a single blanket "algorithms that need a noise model will error at run time" warning for any canvas missing a backend. That's only true for QuCAD; QuBound and CompressVQC silently fall back to FakeFez, and Qshot ignores ctx["backend"] entirely (uses its own bundled noise snapshots). Replace the blanket line with per-algorithm advisories driven by an ALGO_BACKEND_DEPENDENCY table: - qucad: "required" (hard error without backend) - qubound, compvqc: "optional" (soft fallback to FakeFez) - qshot: "ignored" (warns the OTHER way: backend wired in front of a qshot-only chain is dead weight) Also drop the misleading "noise profile" dashed-edge label on backend → qshot edges (the edge has no semantic meaning for qshot). Backend → qucad/qubound/compvqc still gets the dashed sidechain styling. Tour slides drifted relative to the current four-algorithm lineup: - WelcomeSlide named only QuCAD/QuBound/CompressVQC; add Qshot. - PipelineSlide split algorithms into "mutate c…2316315 -
Comment-vs-behavior audit: fix four real mismatches
Yuchen Yuan- run_cache: docstring claimed `_normalize_node` drops node id, code actually keeps it. Rewrite docstring to match behavior + explain why the cache still hits in practice (frontend presets and precompute script both use the same n1, n2... convention). - precompute_preset_results: qshot preset existed in frontend but was missing from the script's PRESETS dict, so qshot+ry_chain_6q always cache-missed. Add it. - viz/Sparkline: docstring said "non-negative integers" but the code defensively handles negatives (Math.min(...data, 0)) and short arrays (returns null on len<2). Rewrite docstring to match. - ResultsPane: EmptyHint said QuBound takes "about 2 minutes" while RunningHint says "1-3 minutes" for QuBound or Qshot. Unify both to 1-3 min and mention both slow paths.8e6747e -
Extract shared TipIcon; add hover-tooltip on family badge + live-IBM chip
Yuchen YuanPull the inline ⓘ tooltip from NodeParamEditor.FieldLabel into a shared `TipIcon` component so other places that need the same 'short label, long explanation behind a hover' affordance can reuse it without copying the named-group / no-aria-label / pointer-events gotchas. (Three iterations earlier in this session were spent re-discovering each one.) Two concrete spots where the shared component now adds context: * QNode family badge (SOURCE / BACKEND / ALGORITHM / METRIC / SINK). Useful tag for someone fluent in workflow-editor lingo, opaque to a non-quantum first-time visitor. New per-family hint explains what each role does in plain language. * TopBar 'live ibm: ...' status chip. Already had a long native `title` tooltip, but native titles race our CSS tooltips and have the 1-2 s display delay. Replaced with TipIcon next to the chip text — instant, theme-styled, and the chip stays clickable to toggle live mode. NodeParamEditor.FieldLabel collapses to a thin call-site…0f6846e -
Param hint: scope group-hover to a NAMED Tailwind group
Yuchen YuanReported: hovering anywhere on a node card (not the ⓘ icon) made every param tooltip pop up at once. Cause: QNode's .node-card already carries class="group" to drive the × delete button's hover-reveal, and Tailwind's unnamed `group-hover:` matches ANY ancestor with class `group`. So three tooltips with plain `group-hover:block` were latching onto the node-card group. Switch the icon wrapper to a named group (`group/tip`) and update the children to `group-hover/tip:block` / `group-focus/tip:block`. Tailwind v3 scopes named groups strictly, so only hovering the icon itself fires the tooltip.f6e6b69 -
Param hint tooltip: drop aria-label so native fallback can't race ours
Yuchen YuanUser report: the CSS tooltip was being preempted by a 1-2 second delayed bubble. Tracked it down to `aria-label` on the icon wrapper — when the element also carries `cursor: help`, browsers (macOS Chrome especially) treat it like `title` and render the delayed native tooltip on top of our instant CSS one. Fix: remove `aria-label` and `role=img` from the wrapper. The tooltip span itself contains the visible hint text and carries `role=tooltip`, so screen readers read it without the duplicate native overlay. The HelpCircle icon picks up `aria-hidden=true` so it isn't announced as a separate element. Also added `tabIndex=0` + `group-focus:block` so keyboard users tabbing through the params can read each hint without a mouse, and a small focus-ring for accessibility.28ba56f