TheYuchen commited on
Commit
130ee8d
·
1 Parent(s): 5d99076

Toolbar: intentional two-row design — hierarchy, single CTA, consistent controls

Browse files

The 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 a 900px viewport (advisory, not load-bearing):
row 2's worst case (~380px with padding) then fits the band center
(>=412px at 768 with default panes).
- Consistency sweep: every control h-8 (toggle keeps its segmented
style at that height), one border tone, gap-2 rhythm, selects share
btn padding. Mobile (<md) unchanged: row 2 hides as a unit, the Run
FAB flow stays as-is.

frontend/src/components/FlowCanvas.tsx CHANGED
@@ -225,7 +225,16 @@ export function FlowCanvas() {
225
  // Nothing observed for ANY canvas kind → an "estimate" would be
226
  // pure fiction; show nothing until at least one run is archived.
227
  if (costEst.knownS <= 0 && unknownN > 0) return null;
 
 
 
 
 
 
 
 
228
  let text = `est ~${formatSeconds(costEst.knownS)}`;
 
229
  if (unknownN > 0) text += ` + ${unknownN} unknown`;
230
  let title =
231
  `Estimated from ${costEst.sampleRuns} archived run(s) in this ` +
@@ -243,13 +252,13 @@ export function FlowCanvas() {
243
  if (unknownN > 0) {
244
  title += ` No history yet for: ${costEst.unknownKinds.join(", ")}.`;
245
  }
246
- if (replicateCount > 1 && pinnedSeed == null) {
247
  const extra = replicateExtraS(
248
  costEst,
249
  nodes.map((n) => ({ id: n.id, kind: (n.data as QNodeData).kind })),
250
  replicateCount,
251
  );
252
- text += ` · ×${replicateCount} ≈ ${formatSeconds(costEst.knownS + extra)}`;
253
  title +=
254
  ` Replicate approximation: the deterministic prefix is served ` +
255
  `from cache after run 1; only stochastic blocks (sampled ` +
@@ -1249,43 +1258,79 @@ export function FlowCanvas() {
1249
  circuitTag={sampleKey ?? circuit?.name ?? "no circuit"}
1250
  />
1251
  )}
1252
- {/* No overflow-x clip here: CSS spec forces overflow-y to auto
1253
- when overflow-x is auto, which would clip the dropdowns
1254
- (PresetPicker, MoreMenu) that anchor below this row. On
1255
- mobile the Run button drops out (md:flex) and the FAB
1256
- replaces it, so the remaining icon-only items fit easily.
1257
-
1258
- flex-wrap + min-h-12 (not a fixed h-12): the action cluster's
1259
- visibility is keyed to VIEWPORT breakpoints (md:/lg:) but this
1260
- row lives in a RESIZABLE center column — at a 1280-1440px
1261
- window with default side panes the column is only ~550-700px
1262
- wide while lg: still shows every label, and with the optional
1263
- chips present (pinned seed / cost estimate) the row used to
1264
- overflow and clip the Run button off the right edge. Wrapping
1265
- keeps every control reachable at any pane width; when one
1266
- line fits (the common wide case) min-h-12 renders pixel-
1267
- identical to the old fixed row. */}
1268
- <div className="min-h-12 shrink-0 border-b border-edge px-3 sm:px-4 py-1 flex flex-wrap items-center justify-between gap-x-2 sm:gap-x-4 gap-y-1">
1269
- {/* ---- LEFT: workspace + AUTHORING cluster --------------------
1270
- Two-cluster toolbar (authoring vs evidence). Everything on
1271
- this side describes or edits the COMPOSITION — mode toggle,
1272
- block/link counters, preset, wiring, figure snapshot,
1273
- clear, overflow menu — and none of it changes what the next
1274
- run MEASURES. Rarely-used authoring actions (Share,
1275
- Export .py) live in the ⋯ menu at EVERY width: reachable,
1276
- but two fewer buttons of permanent chrome. min-w-0 +
1277
- flex-wrap so the cluster wraps instead of clipping in a
1278
- narrow center column. Counters: full text on ≥sm; on <sm an
1279
- icon pair (Box = "blocks", Link2 = "links") — a bare "5·4"
1280
- was unreadable in user testing. */}
1281
- <div className="flex flex-wrap items-center gap-1.5 sm:gap-2 gap-y-1 min-w-0 text-xs text-mute">
1282
- <WorkspaceToggle />
1283
- <span className="hidden sm:inline text-edge">·</span>
1284
- <span className="hidden sm:inline">{nodes.length} blocks</span>
1285
- <span className="hidden sm:inline text-edge">·</span>
1286
- <span className="hidden sm:inline">{edges.length} links</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1287
  <span
1288
- className="sm:hidden flex items-center gap-1"
 
 
 
 
 
 
 
 
 
1289
  aria-label={`${nodes.length} blocks, ${edges.length} links`}
1290
  >
1291
  <Box className="w-3 h-3" aria-hidden="true" />
@@ -1294,88 +1339,82 @@ export function FlowCanvas() {
1294
  <Link2 className="w-3 h-3" aria-hidden="true" />
1295
  <span className="tabular-nums">{edges.length}</span>
1296
  </span>
1297
- <PresetPicker onPick={loadPreset} />
1298
- {/* Frequent authoring actions as buttons at ≥md (labels at
1299
- ≥lg); below md they live in the ⋯ menu instead (its
1300
- Auto-connect/Clear rows are md:hidden — mirrored
1301
- visibility, exactly one reachable copy at any width). */}
1302
- <button
1303
- onClick={runAutoConnect}
1304
- disabled={nodes.length < 2}
1305
- className="btn hidden md:inline-flex disabled:opacity-40 disabled:cursor-not-allowed"
1306
- title={
1307
- edges.length > 0
1308
- ? "Re-wire all blocks into a source→backend→algorithm→metric→sink chain (replaces existing links)"
1309
- : "Wire all blocks into a source→backend→algorithm→metric→sink chain"
1310
- }
1311
- aria-label="Auto-connect all blocks"
1312
- >
1313
- <Wand2 className="w-3.5 h-3.5" />
1314
- <span className="hidden lg:inline">Auto-connect</span>
1315
- </button>
1316
- {/* Paper-figure export of the whole canvas (hybrid path:
1317
- foreignObject SVG + hi-res PNG; provenance embedded). */}
1318
- <FigureExportButton
1319
- className="hidden md:inline-flex"
1320
- getTarget={() => wrapperRef.current}
1321
- name="canvas"
1322
- view="canvas"
1323
- getGraph={() => buildSharePayload(nodes, edges, sampleKey)}
1324
- />
1325
- <button
1326
- onClick={clearGraph}
1327
- className="btn hidden md:inline-flex"
1328
- title="Clear the canvas"
1329
- aria-label="Clear canvas"
1330
- >
1331
- <Trash2 className="w-3.5 h-3.5" />
1332
- <span className="hidden lg:inline">Clear</span>
1333
- </button>
1334
- {/* ⋯ overflow menu (ALL widths): Share + Export .py always
1335
- live here; Auto-connect + Clear join below md. */}
1336
- <MoreMenu
1337
- canAutoConnect={nodes.length >= 2}
1338
- hasEdgesToReplace={edges.length > 0}
1339
- canClear={nodes.length > 0 || edges.length > 0}
1340
- canExport={nodes.length > 0}
1341
- onAutoConnect={runAutoConnect}
1342
- onShare={handleShareFromMenu}
1343
- onExport={exportPython}
1344
- onClear={clearGraph}
1345
- />
 
 
 
1346
  </div>
1347
- {/* ---- RIGHT: EVIDENCE cluster --------------------------------
1348
  Everything here shapes or prices the evidence the next Run
1349
  buys: pinned seed, replicate count, optional-stopping
1350
- target, cost estimate, and Run itself. Visually separated
1351
- from authoring (divider + faint group label at ≥lg) so the
1352
- toolbar reads as two questions — "what am I composing?" vs
1353
- "what will the next run measure?". min-w-0 (NOT shrink-0)
1354
- is what lets flex-wrap actually engage; justify-end keeps
1355
- continuation lines right-aligned, so Run stays in the
1356
- bottom-right corner where the eye expects it. The divider
1357
- is lg-gated: in the 768-1024 band the wrapped cluster made
1358
- the border-l + pl-3 read as a clipped stray rule next to
1359
- the label, so below lg the grouping is implied by spacing
1360
- alone; below md every control here is hidden anyway (the
1361
- Run FAB takes over). */}
1362
  <div
1363
  role="group"
1364
- aria-label="Evidence controls for the next run"
1365
- className="flex flex-wrap items-center justify-end gap-1.5 sm:gap-2 gap-y-1 min-w-0 lg:border-l lg:border-edge/60 lg:pl-3"
1366
  >
1367
- <span
1368
- className="hidden lg:inline text-[9px] uppercase tracking-wider text-mute/70 select-none"
1369
- title="Controls for the next run's evidence: replicates, stopping target, seed, estimated cost."
1370
- >
1371
- evidence
1372
- </span>
1373
  {/* Pinned-seed chip: visible whenever the next run will replay
1374
  a specific draw instead of sampling fresh. The × clears the
1375
  pin and returns to fresh sampling. */}
1376
  {pinnedSeed != null && (
1377
  <span
1378
- className="chip !border-accent/50 !text-accent hidden md:inline-flex items-center gap-1"
1379
  title={`Next run replays root seed ${pinnedSeed} exactly. Click × to return to fresh draws.`}
1380
  >
1381
  seed {pinnedSeed}
@@ -1398,7 +1437,7 @@ export function FlowCanvas() {
1398
  value={replicateCount}
1399
  onChange={(e) => setReplicateCount(Number(e.target.value))}
1400
  disabled={running}
1401
- className="btn hidden md:inline-flex !px-1.5 cursor-pointer disabled:opacity-40"
1402
  title={`${GLOSSARY.replicate} Distributions build up in the fidelity card and the run history. Fast after run 1: the unchanged deterministic prefix is served from cache, so replicates 2..N only re-run the stochastic steps.`}
1403
  aria-label="Replicate count"
1404
  >
@@ -1422,7 +1461,7 @@ export function FlowCanvas() {
1422
  )
1423
  }
1424
  disabled={running}
1425
- className="btn hidden md:inline-flex !px-1.5 cursor-pointer disabled:opacity-40"
1426
  title={`${GLOSSARY.precisionTarget} Off = run every requested measurement. The target is archived with the run and restored on replay, so an early stop reproduces exactly.`}
1427
  aria-label="Precision target"
1428
  >
@@ -1439,25 +1478,26 @@ export function FlowCanvas() {
1439
  {/* cost-estimate chip: what will pressing Run cost, judged
1440
  from this browser's own archived step timings. Sits next
1441
  to Run so the price tag is read together with the
1442
- trigger. Mute styling on purpose — it's advisory, not a
1443
- gate. */}
 
 
1444
  {costChip && (
1445
  <span
1446
  data-marker="cost-estimate"
1447
- className="chip hidden md:inline-flex whitespace-nowrap"
1448
  title={costChip.title}
1449
  >
1450
  {costChip.text}
1451
  </span>
1452
  )}
 
 
 
1453
  <button
1454
  onClick={runPipeline}
1455
  disabled={running || !circuit}
1456
- // Hidden on mobile — the bottom-right Run FAB takes over
1457
- // there, and dropping this button frees the toolbar to
1458
- // fit the remaining icons without horizontal overflow
1459
- // (which used to clip the PresetPicker dropdown).
1460
- className="hidden md:flex btn-primary disabled:opacity-50 disabled:cursor-not-allowed"
1461
  aria-label={running ? "Running" : "Run pipeline"}
1462
  >
1463
  {running ? (
 
225
  // Nothing observed for ANY canvas kind → an "estimate" would be
226
  // pure fiction; show nothing until at least one run is archived.
227
  if (costEst.knownS <= 0 && unknownN > 0) return null;
228
+ // Copy contract (toolbar row 2): replicates=1 -> "est ~35s";
229
+ // N>1 -> "est ~35s each · ≈2m total". The ×N multiplier is NOT
230
+ // repeated here — the replicate select one slot to the left
231
+ // already states it (the old "… · ×5 ≈ 1m 59s" said ×5 twice in
232
+ // adjacent controls). "each" ≈ the first full run; the tooltip
233
+ // keeps the honest replicate approximation (cached prefix, only
234
+ // stochastic blocks re-run) and the cost-anchor provenance.
235
+ const showTotal = replicateCount > 1 && pinnedSeed == null;
236
  let text = `est ~${formatSeconds(costEst.knownS)}`;
237
+ if (showTotal) text += " each";
238
  if (unknownN > 0) text += ` + ${unknownN} unknown`;
239
  let title =
240
  `Estimated from ${costEst.sampleRuns} archived run(s) in this ` +
 
252
  if (unknownN > 0) {
253
  title += ` No history yet for: ${costEst.unknownKinds.join(", ")}.`;
254
  }
255
+ if (showTotal) {
256
  const extra = replicateExtraS(
257
  costEst,
258
  nodes.map((n) => ({ id: n.id, kind: (n.data as QNodeData).kind })),
259
  replicateCount,
260
  );
261
+ text += ` · ≈${formatSeconds(costEst.knownS + extra)} total`;
262
  title +=
263
  ` Replicate approximation: the deterministic prefix is served ` +
264
  `from cache after run 1; only stochastic blocks (sampled ` +
 
1258
  circuitTag={sampleKey ?? circuit?.name ?? "no circuit"}
1259
  />
1260
  )}
1261
+ {/* ================== CANVAS TOOLBAR =========================
1262
+ An INTENTIONAL two-row toolbar at every width ≥ 768px —
1263
+ predictable beats adaptive raggedness. The old single
1264
+ flex-wrap row broke at an arbitrary, pane-width-dependent
1265
+ point: the evidence cluster dangled left on a ragged second
1266
+ line and its border-l + 9px "evidence" micro-label read as
1267
+ floating debris. Two fixed rows are identical at every
1268
+ width; on very wide screens they read as one clean header
1269
+ block, so nothing is lost at the top end either.
1270
+
1271
+ Row 1 — workspace & authoring: "what am I composing?"
1272
+ Row 2 — evidence & execution: "what will the next run
1273
+ measure, and what will it cost?"
1274
+
1275
+ The ROW BOUNDARY itself now carries the grouping semantics
1276
+ the old divider + micro-label tried to carry — both are
1277
+ deleted; the word "evidence" survives in row 2's aria-label
1278
+ where it does its job without adding visual noise.
1279
+
1280
+ Hierarchy: Run is the ONLY accent-colored control in the
1281
+ toolbar. Load preset — a secondary action — used to be an
1282
+ accent2 btn-secondary pill competing with Run for the eye;
1283
+ it is now a standard outline `btn` (see PresetPicker.tsx).
1284
+
1285
+ Consistency sweep (toolbar only): every control is exactly
1286
+ h-8, one border tone (border-edge via .btn), one gap rhythm
1287
+ (gap-2), selects share .btn padding, and the mode toggle
1288
+ keeps its segmented style at the same h-8.
1289
+
1290
+ Overflow: both rows stay overflow:visible — an overflow-x
1291
+ clip would force overflow-y:auto (CSS spec) and clip the
1292
+ dropdowns (PresetPicker, MoreMenu) that anchor below row 1.
1293
+ No wrap is needed by construction: row 2's worst case below
1294
+ a 900px viewport is ×20 select (~78px) + target select
1295
+ (~120px) + Run (~130px) + two gap-2 (16px) ≈ 345px, ≈380px
1296
+ with row padding, and a 768px viewport with the default
1297
+ left pane leaves the center column ~412px (768 − 320 left −
1298
+ 4 resizer − 32 evidence strip). The est chip is the one
1299
+ purely advisory element, so it yields first: hidden below a
1300
+ 900px VIEWPORT (min-[900px]:), where band centers get tight
1301
+ with the full ~480px row. Only a deliberate extreme
1302
+ left-pane drag (center at its 280px clamp floor, App.tsx)
1303
+ can still undercut row 2 — justify-end then spills leftward
1304
+ into the row's own empty half while Run stays pinned in the
1305
+ corner. Below md, row 1 sheds its md-gated buttons and row
1306
+ 2 hides as a unit: the mobile Run-FAB flow is unchanged. */}
1307
+ <div className="shrink-0 border-b border-edge">
1308
+ {/* ---- Row 1: WORKSPACE & AUTHORING -------------------------
1309
+ Everything here describes or edits the COMPOSITION — mode
1310
+ toggle, block/link counters, preset, wiring, figure
1311
+ snapshot, clear, overflow menu — none of it changes what
1312
+ the next run MEASURES. Rarely-used authoring actions
1313
+ (Share, Export .py) live in the ⋯ menu at EVERY width:
1314
+ reachable, but two fewer buttons of permanent chrome.
1315
+ Counters are passive status (mute 11px) parked next to the
1316
+ toggle behind a subtle dot; the ml-auto gulf separates
1317
+ them from the action group — status left, verbs right, no
1318
+ interleaving. Full text on ≥sm; on <sm an icon pair (Box =
1319
+ "blocks", Link2 = "links") — a bare "5·4" was unreadable
1320
+ in user testing. */}
1321
+ <div className="h-10 px-3 sm:px-4 flex items-center gap-2 min-w-0">
1322
+ <WorkspaceToggle className="h-8" />
1323
  <span
1324
+ className="hidden sm:inline text-[11px] text-edge select-none"
1325
+ aria-hidden="true"
1326
+ >
1327
+ ·
1328
+ </span>
1329
+ <span className="hidden sm:inline text-[11px] text-mute whitespace-nowrap">
1330
+ {nodes.length} blocks · {edges.length} links
1331
+ </span>
1332
+ <span
1333
+ className="sm:hidden flex items-center gap-1 text-[11px] text-mute"
1334
  aria-label={`${nodes.length} blocks, ${edges.length} links`}
1335
  >
1336
  <Box className="w-3 h-3" aria-hidden="true" />
 
1339
  <Link2 className="w-3 h-3" aria-hidden="true" />
1340
  <span className="tabular-nums">{edges.length}</span>
1341
  </span>
1342
+ {/* Right-aligned authoring actions — all h-8 outline btns,
1343
+ labels lg-gated (icon-only through the band). Below md
1344
+ Auto-connect/Clear fold into the ⋯ menu (its rows are
1345
+ md:hidden-mirrored — exactly one reachable copy of each
1346
+ action at any width). */}
1347
+ <div className="ml-auto flex items-center gap-2">
1348
+ <PresetPicker onPick={loadPreset} />
1349
+ <button
1350
+ onClick={runAutoConnect}
1351
+ disabled={nodes.length < 2}
1352
+ className="btn h-8 hidden md:inline-flex disabled:opacity-40 disabled:cursor-not-allowed"
1353
+ title={
1354
+ edges.length > 0
1355
+ ? "Re-wire all blocks into a source→backend→algorithm→metric→sink chain (replaces existing links)"
1356
+ : "Wire all blocks into a source→backend→algorithm→metric→sink chain"
1357
+ }
1358
+ aria-label="Auto-connect all blocks"
1359
+ >
1360
+ <Wand2 className="w-3.5 h-3.5" />
1361
+ <span className="hidden lg:inline">Auto-connect</span>
1362
+ </button>
1363
+ {/* Paper-figure export of the whole canvas (hybrid path:
1364
+ foreignObject SVG + hi-res PNG; provenance embedded). */}
1365
+ <FigureExportButton
1366
+ className="hidden md:inline-flex h-8"
1367
+ getTarget={() => wrapperRef.current}
1368
+ name="canvas"
1369
+ view="canvas"
1370
+ getGraph={() => buildSharePayload(nodes, edges, sampleKey)}
1371
+ />
1372
+ <button
1373
+ onClick={clearGraph}
1374
+ className="btn h-8 hidden md:inline-flex"
1375
+ title="Clear the canvas"
1376
+ aria-label="Clear canvas"
1377
+ >
1378
+ <Trash2 className="w-3.5 h-3.5" />
1379
+ <span className="hidden lg:inline">Clear</span>
1380
+ </button>
1381
+ {/* ⋯ overflow menu (ALL widths): Share + Export .py always
1382
+ live here; Auto-connect + Clear join below md. */}
1383
+ <MoreMenu
1384
+ canAutoConnect={nodes.length >= 2}
1385
+ hasEdgesToReplace={edges.length > 0}
1386
+ canClear={nodes.length > 0 || edges.length > 0}
1387
+ canExport={nodes.length > 0}
1388
+ onAutoConnect={runAutoConnect}
1389
+ onShare={handleShareFromMenu}
1390
+ onExport={exportPython}
1391
+ onClear={clearGraph}
1392
+ />
1393
+ </div>
1394
  </div>
1395
+ {/* ---- Row 2: EVIDENCE & EXECUTION --------------------------
1396
  Everything here shapes or prices the evidence the next Run
1397
  buys: pinned seed, replicate count, optional-stopping
1398
+ target, cost estimate, then Run — one right-aligned group
1399
+ ending in the toolbar's single CTA, so the row reads
1400
+ left-to-right as "under these conditions, at this price →
1401
+ RUN", with Run in the bottom-right corner where the eye
1402
+ expects the trigger. Nothing floats on the left. Hidden
1403
+ below md as a unit (every control in it was individually
1404
+ md-gated before): the mobile Run FAB replaces it.
1405
+ border-edge/40 = an internal seam, quieter than the
1406
+ toolbar's outer border. */}
 
 
 
1407
  <div
1408
  role="group"
1409
+ aria-label="Evidence and execution — controls for the next run"
1410
+ className="hidden md:flex h-10 px-3 sm:px-4 border-t border-edge/40 items-center justify-end gap-2"
1411
  >
 
 
 
 
 
 
1412
  {/* Pinned-seed chip: visible whenever the next run will replay
1413
  a specific draw instead of sampling fresh. The × clears the
1414
  pin and returns to fresh sampling. */}
1415
  {pinnedSeed != null && (
1416
  <span
1417
+ className="chip !border-accent/50 !text-accent"
1418
  title={`Next run replays root seed ${pinnedSeed} exactly. Click × to return to fresh draws.`}
1419
  >
1420
  seed {pinnedSeed}
 
1437
  value={replicateCount}
1438
  onChange={(e) => setReplicateCount(Number(e.target.value))}
1439
  disabled={running}
1440
+ className="btn h-8 cursor-pointer disabled:opacity-40"
1441
  title={`${GLOSSARY.replicate} Distributions build up in the fidelity card and the run history. Fast after run 1: the unchanged deterministic prefix is served from cache, so replicates 2..N only re-run the stochastic steps.`}
1442
  aria-label="Replicate count"
1443
  >
 
1461
  )
1462
  }
1463
  disabled={running}
1464
+ className="btn h-8 cursor-pointer disabled:opacity-40"
1465
  title={`${GLOSSARY.precisionTarget} Off = run every requested measurement. The target is archived with the run and restored on replay, so an early stop reproduces exactly.`}
1466
  aria-label="Precision target"
1467
  >
 
1478
  {/* cost-estimate chip: what will pressing Run cost, judged
1479
  from this browser's own archived step timings. Sits next
1480
  to Run so the price tag is read together with the
1481
+ trigger. Mute styling on purpose — advisory, not a gate —
1482
+ which is also why IT is the element that yields below a
1483
+ 900px viewport (see the width contract above): glanceable
1484
+ info, never load-bearing. */}
1485
  {costChip && (
1486
  <span
1487
  data-marker="cost-estimate"
1488
+ className="chip hidden min-[900px]:inline-flex whitespace-nowrap"
1489
  title={costChip.title}
1490
  >
1491
  {costChip.text}
1492
  </span>
1493
  )}
1494
+ {/* The toolbar's one accent-colored control. The whole row
1495
+ md-gates, so no hidden/md:flex here — on mobile the
1496
+ bottom-right Run FAB takes over. */}
1497
  <button
1498
  onClick={runPipeline}
1499
  disabled={running || !circuit}
1500
+ className="btn-primary h-8 disabled:opacity-50 disabled:cursor-not-allowed"
 
 
 
 
1501
  aria-label={running ? "Running" : "Run pipeline"}
1502
  >
1503
  {running ? (
frontend/src/components/MoreMenu.tsx CHANGED
@@ -103,7 +103,8 @@ export function MoreMenu({
103
  <button
104
  type="button"
105
  onClick={() => setOpen((v) => !v)}
106
- className="btn"
 
107
  title="More actions"
108
  aria-label="More actions"
109
  aria-haspopup="menu"
 
103
  <button
104
  type="button"
105
  onClick={() => setOpen((v) => !v)}
106
+ // h-8: the canvas toolbar's uniform control height.
107
+ className="btn h-8"
108
  title="More actions"
109
  aria-label="More actions"
110
  aria-haspopup="menu"
frontend/src/components/PresetPicker.tsx CHANGED
@@ -16,15 +16,21 @@ export function PresetPicker({ onPick }: { onPick: (key: string) => void }) {
16
 
17
  return (
18
  <div ref={rootRef} className="relative">
 
 
 
 
 
 
19
  <button
20
  type="button"
21
  onClick={() => setOpen((v) => !v)}
22
- className="btn-secondary"
23
  title="Load a preset pipeline onto the canvas"
24
  aria-label="Load a preset pipeline"
25
  >
26
  <Layers className="w-3.5 h-3.5" />
27
- <span className="hidden sm:inline">Load preset</span>
28
  <ChevronDown className="w-3.5 h-3.5" />
29
  </button>
30
  {open && (
 
16
 
17
  return (
18
  <div ref={rootRef} className="relative">
19
+ {/* Standard outline `btn`, deliberately NOT btn-secondary: the
20
+ canvas toolbar reserves accent color for exactly one control
21
+ (Run). The old accent2 pill made this secondary action read
22
+ as a competing CTA. h-8 = the toolbar's uniform control
23
+ height; the label lg-gates like its Auto-connect/Clear row
24
+ siblings (icon + chevron still signal the dropdown). */}
25
  <button
26
  type="button"
27
  onClick={() => setOpen((v) => !v)}
28
+ className="btn h-8"
29
  title="Load a preset pipeline onto the canvas"
30
  aria-label="Load a preset pipeline"
31
  >
32
  <Layers className="w-3.5 h-3.5" />
33
+ <span className="hidden lg:inline">Load preset</span>
34
  <ChevronDown className="w-3.5 h-3.5" />
35
  </button>
36
  {open && (