Commit History
-
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchenAudit backlog (docs/AUDIT_BACKLOG.md) wave 3, canvas area: - node ids: module counter kills the same-millisecond collision - touch drag cancel clears the splice highlight; restore-pulse timer held in a ref (cleared on re-restore/unmount) - cost effect reads nodes through a ref (stale closure) - ARCHIVE_WINDOW (runStore) consolidates the 50/100/200/500 listRuns caps; countRuns()/countRunsByConfig() back every displayed total (board header, config-context bar); exportArchive scans unbounded; listRunsByConfig keeps the newest window instead of an arbitrary primary-key subset; import preserves synthesized run_ids (no dupes on re-import) - stale post-run encodings: ribbons/edge labels dim at 0.45 when the live structural hash diverges from the run's hash - RibbonEdge: role=img on the aria-labelled group; deltaSize null (unknown) no longer renders as pass-through; "ops" -> "gates" - replicate loop: sticky progress notice (outlives the 4s fade) and per-iteration clearLivePr…728039f -
Toolbar: intentional two-row design — hierarchy, single CTA, consistent controls
TheYuchenThe canvas toolbar's single flex-wrap row broke at an arbitrary, pane-width-dependent point: the evidence cluster dangled left on a ragged second line, its 9px "evidence" micro-label read as floating debris, and the accent2 "Load preset" pill competed with Run for the eye. Replace it with a deliberate two-row layout at every width >=768: - Row 1 (workspace & authoring): mode toggle, dot, counters (mute 11px), then ml-auto actions — Load preset (now a standard outline btn; PresetPicker drops btn-secondary), Auto-connect, figure export, Clear, the overflow menu. - Row 2 (evidence & execution): right-aligned seed chip / xN select / target select / est chip / Run — the toolbar's only accent control. The "evidence" label + lg divider are deleted; the row boundary carries the grouping, the word lives in the row's aria-label. - Est chip copy: "est ~35s" at N=1; "est ~35s each · ~2m total" at N>1 — the xN multiplier is no longer duplicated next to the select. Chip yields below…130ee8d
-
Toolbar calm-down: authoring vs evidence clusters
TheYuchenThe canvas toolbar mixed authoring (preset, wiring, share, export, clear) with evidence controls (replicates, target, seed, cost, Run). Now two visually separated clusters: LEFT = workspace toggle + authoring (counters, preset, Auto-connect, camera, Clear, ⋯ menu); RIGHT = evidence group (pinned seed, ×N, precision target, cost chip, Run) behind a md-gated divider with a faint "evidence" group label — the toolbar reads as "what am I composing?" vs "what will the next run measure?". Share + Export .py are demoted into the ⋯ MoreMenu at EVERY width (their rows always render; Auto-connect/Clear rows are md:hidden so exactly one reachable copy of each action exists at any width) — two fewer permanent buttons, plus the Theater button already removed by the three-scales commit. ShareButton toolbar instance and its import dropped; MoreMenu's stale breakpoint-close guard removed; NextStepsHint points at the ⋯ menu for Export .py.7ece09e
-
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 -
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
-
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 -
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: 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
-
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