// The workflow graph (P6): a reusable, DOM-light renderer for a pipeline's // parsed definition plus the pure maths and semantics it is built from. // // Mirrors the Android app one-for-one so the browser reaches parity rather than // re-inventing the picture: // ui/graph/WorkflowGraph.kt (layoutGraph, fitScale, clampOffset, zoomAbout, // hitTest, nodeDisplayLabel, rankStages) // ui/graph/GraphPalette.kt (GraphNodeKind, node fills, tonal tint) // data/protocol/GraphSemantics.kt (outcome order, `error*`, stable edge ids) // ui/graph/StageDetailPane.kt (the definition-only stage pane) // ui/screens/RunGraphTab.kt (the two empty states) // // Two deliberate shapes: // // * Everything above `mount` is pure: plain data in, plain data out, no DOM. // `node --test test/graph.test.mjs` exercises it without a browser, and the // run-detail graph (R5) reuses the same helpers when it lands. // * `mount` is the only DOM touchpoint: it appends semantic DOM (a viewport, // one inline for the edges, real