web: clearer workflow graph labels, routes and kinds

- Gaps between stages are sized from the widest straight-route label, so a chip
  never reaches into either box; a source's forward routes fan across its side
  instead of sharing a 20px band.
- A label prefers the widest horizontal run that can hold it; when only a stub
  exists the chip moves onto the edge's longest run and sits beside a vertical
  one, keeping clear of both the box and the neighbouring label.
- Hovering a wire or its chip highlights the route and dims the rest.
- System-added routes (the parser's implicit error fallback) draw dotted with a
  legend entry, distinct from declared routes and executed state.
- Lanes are 34px apart, so a dense definition no longer doubles the canvas height.
- The graph opens expanded by default and remembers a collapse (graphPrefs.js).
This commit is contained in:
2026-10-19 22:23:58 +01:00
parent 1eaedf5c53
commit b00b434c5d
8 changed files with 313 additions and 58 deletions
+24 -1
View File
@@ -27,12 +27,25 @@
.graph-content { position: absolute; top: 0; left: 0; will-change: transform; }
.graph-edges { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.graph-edge-path { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.graph-edge-path {
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
/* The canvas ignores the pointer so panning works; a wire takes the pointer
back on its own stroke only, which is what makes hover-highlighting work. */
pointer-events: stroke;
transition: opacity 120ms ease-out;
}
.graph-edge-path.not-executed { stroke-width: 2.5; stroke-dasharray: 14 10; }
/* A system-added route (implicit error fallback): dotted, not merely dashed. */
.graph-edge-path.fallback { stroke-dasharray: 2 8; stroke-linecap: round; }
.graph-edge-path.hot { stroke-width: 5; }
.graph-edges.has-hot .graph-edge-path:not(.hot) { opacity: 0.3; }
.graph-arrowhead path { fill: var(--text); fill: context-stroke; }
.graph-node-layer, .graph-label-layer { position: absolute; top: 0; left: 0; }
.graph-label-layer { pointer-events: none; }
.graph-edge-label { pointer-events: auto; transition: opacity 120ms ease-out; }
.graph-node {
position: absolute;
@@ -93,6 +106,15 @@
font-size: 11px;
white-space: nowrap;
}
.graph-edge-label.fallback { border-style: dotted; }
/* A label on a vertical run sits beside it, centred on the wire's midpoint. */
.graph-edge-label.vertical { transform: translate(-50%, -50%); }
.graph-edge-label.hot {
border-color: var(--accent);
color: var(--color-text);
background: var(--color-surface-2);
}
.graph-label-layer.has-hot .graph-edge-label:not(.hot) { opacity: 0.45; }
.graph-controls { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.graph-control {
@@ -141,6 +163,7 @@
border-bottom: 4px solid transparent;
}
.graph-legend-swatch.not-executed { border-top-style: dashed; }
.graph-legend-swatch.fallback { border-top: 2px dotted var(--muted); }
/* The live active stage (R5): a ring around the node plus a soft glow, pulsing
while the run executes and static when the user prefers reduced motion. */