Commit History
-
Tier 2: "+ Add block" chooser popover (marker: block-chooser)
TheYuchenBlockPicker rewritten from a multi-select checkbox dropdown into THE single chooser surface, anchored under the one permanent "+ Add block" button now sitting in canvas-toolbar row 1 (after the workspace toggle, btn h-8 idiom). Width min(480px, 90vw), max-height ~380px with internal scroll, useDismissOn for Escape/outside-click. Content teaches the grammar the shelf used to spell out: five stage sections in pipeline order (Source → Backend → Algorithm → Metric → Sink), each a 10px uppercase header + the shelf's one-line tagline, then compact h-9 rows — icon, name, plugin badge, on-canvas count dot (live multiset from the canvasKinds bridge), full description as the title tooltip. Plugins list inside their declared family's section and keep their delete ×. Interactions: click = add via the pendingBlockKinds bridge and KEEP the popover open (multi-add by clicking; the row flashes "added ✓"); rows stay draggable with the unchanged application/reactflow payload so drop + splice-on-edge w…3e44751
-
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 -
Pickers: live on-canvas badges, honest zero-states, upload retry + spinner
TheYuchen- BlockPicker reads real canvas kinds (store bridge): "on canvas" badges are live, and defaults already placed are not pre-checked (no duplicate input/output on every Add blocks round-trip) - NodePalette zero-state accounts for the family filter and offers "Show all families" - CircuitPicker: file input resets after handling (same file re-uploads), upload button shows its busy spinner, circuit picks lock while runningdee698c
-
Typography audit: 9px floor, label/decimal convergence, conventions note
TheYuchenInventoried font sizes, label casing, chip styles and number formatting across the seven views. The system is already largely convergent; three real drifts fixed, and the convention is now written down next to the tokens (index.css UI-conventions block): - 9px floor: the only two sub-9px labels (CompareView "divergence point", BlockPicker "plugin" suffix) bumped from 8px to 9px. - Section-label convention: FinalMetrics' uppercase labels were the one instance missing tracking-wider. - Compact-line decimals: the fidelity card's across-runs line mixed a 2dp mean with a 1dp range in one sentence — now 1dp like every other strip/board stat (headline metrics and mono detail lines stay 2dp; targets stay whole pp). Deliberately NOT churned (documented instead): tracking-widest on palette family badges (distinct role), micro-chips in 28px history rows and tab count badges (px exceptions), CompareView's 2dp Δ (it sits in a 2dp mono detail line).2e22380
-
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
-
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 -
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 -
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
-
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