Commit Graph

4 Commits

Author SHA1 Message Date
alan b00b434c5d 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).
2026-10-19 22:23:58 +01:00
alan ff70b3796f web: run-detail polish — bigger graph, artifact counts, tighter stage pane
- the run Graph tab drops the guidance paragraph and the graph fills ~70vh;
- the Artifacts collapsible carries the visit's count in its title (the body keeps
  the reason line only when there is nothing to show);
- the stage panel's section padding and gaps are reduced.
2026-10-19 20:05:47 +01:00
alan 94d4ff02d3 web: run detail Graph tab with executed styling and stage panes (R5)
Add the run detail's Graph tab (between Summary and Input), reusing the
shared src/graph.js renderer (P6) rather than a second renderer. In run
mode a visited stage is executed (solid fill + border), an unvisited one
hollow with a dashed muted border; a terminal is executed only when a
visit resolved to it; a route is executed only when a recorded visit
produced that outcome (solid with an arrowhead, success first, error
last, others alphabetical, `error*` for the fallback). The Executed /
Not executed legend shows only for a run. While the run executes the
current stage carries a pulsing halo (static under prefers-reduced-motion)
and a ticking elapsed badge; a finished run shows neither. Clicking a
stage opens the existing visit pane at that stage's latest visit, and
Back/Escape return focus. The empty state is the exact
"This server did not include the run graph."

extend src/graph.js with the run-mode inputs (runState-driven executed
styling, legend, active halo/elapsed badge); keep app.js to wiring.
Extend graph.test.mjs with focused run-mode unit tests and ui-smoke.mjs
with the run 438 / run 440 / live-run captures. Mark R5 done in
web/PARITY.md.

Checks: node --check on every touched file; cd web && node --test test/
(178 pass, 0 fail); cd web && node test/ui-smoke.mjs --out captures
(UI SMOKE PASS, captures 28-31).
2026-10-19 04:05:37 +01:00
alan 9456f8a319 web: workflow graph rendering in the pipeline detail (P6)
Close P6 of web/PARITY.md: the pipeline detail's Graph tab now renders the
pipeline's workflow graph — stage nodes in declaration order, labelled outcome
edges, and the #failure/#success terminals on a shared lower row — plus a
definition pane opened from a node.

- src/graph.js (new): reusable `mount(container, graph, options) -> { unmount }`
  plus the pure helpers it is built from (layout, edges, `error*`, lanes,
  fit/clamp/zoom, hit-test, stage-definition fields). Definition view only, so
  the run-detail Graph tab (R5) can reuse it. Mirrors WorkflowGraph.kt,
  GraphPalette.kt, GraphSemantics.kt, StageDetailPane.kt and RunGraphTab.kt.
- src/app.js: wiring only — mount the graph in the Graph tab, drop the previous
  mount on every re-render.
- styles.css: the .graph-* styles in the app's dark palette.
- test/graph.test.mjs (new): focused unit tests for the pure helpers, no DOM.
- test/ui-smoke.mjs: open "Plan and land", switch to Graph, capture the graph,
  a stage pane and the expanded view, and assert the zoom/pan clamps and the
  empty-pane wording against the live server.
- PARITY.md: P6 done with the 2026-10-19 captures; P3 notes the Graph tab now
  renders the graph; R5 stays todo.

Checks: node --check on all five touched JS/MJS files; `node --test test/`
137 pass / 0 fail; `node test/ui-smoke.mjs --out ../captures` UI SMOKE PASS
against ws://127.0.0.1:8080/connect.
2026-10-19 03:26:50 +01:00