Spaces:
Sleeping
Sleeping
Commit History
-
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
-
Neutralise dev-process metadata in code comments
Yuchen YuanEarlier audits caught keyword-level leaks (tokens, paths, emails). This pass goes one level up: comments throughout the codebase narrated the project's history — "Jovin's Streamlit prototype", "the handover snapshot", "Jovin's old prototype's flowChartProto", "Batch 2 circuits", etc. — which read like internal team notes rather than product code, and exposed the development trajectory (research handover → rewrite → packaging) to anyone reading the public repo. Replaced or trimmed the offending comments while keeping legitimate attribution (e.g., "author: Tong Li" in qshot/__init__.py docstring). No behavior change: docstrings + line comments only. Files touched: - qlib/qiskit_utils.py – module docstring rewritten - qlib/qucad.py – default-config attribution generalised - qlib/compvqc.py – "the original prototype did..." → factual - qlib/qshot/__init__.py – "handover snapshot" → "reference code" - app/services/workflow_service.py – Qshot docstring de-narrated - a…fa87757 -
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
-
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 -
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