Commit History
-
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