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).
This commit is contained in:
@@ -610,6 +610,74 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
|
||||
}
|
||||
.graph-control:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* The run-mode legend (R5), pinned top-start opposite the Fit/expand controls.
|
||||
A solid, arrowed swatch means "executed"; a dashed, arrowless one "not
|
||||
executed". Never shown for the definition-only view. */
|
||||
.graph-legend {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 8px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--surface) 85%, transparent);
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.graph-legend-entry { display: inline-flex; gap: 6px; align-items: center; }
|
||||
.graph-legend-swatch {
|
||||
position: relative;
|
||||
width: 26px;
|
||||
border-top: 3px solid var(--muted);
|
||||
}
|
||||
.graph-legend-swatch.executed { border-top-color: var(--text); }
|
||||
/* A small filled arrowhead on the executed swatch, matching the drawn head. */
|
||||
.graph-legend-swatch.executed::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -1px;
|
||||
border-left: 7px solid var(--text);
|
||||
border-top: 4px solid transparent;
|
||||
border-bottom: 4px solid transparent;
|
||||
}
|
||||
.graph-legend-swatch.not-executed { border-top-style: dashed; }
|
||||
|
||||
/* 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. */
|
||||
.graph-node.active {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
|
||||
}
|
||||
.graph-node.active.pulsing { animation: graph-halo-pulse 1.6s ease-in-out infinite; }
|
||||
@keyframes graph-halo-pulse {
|
||||
0%,
|
||||
100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
|
||||
50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 20%, transparent); }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.graph-node.active.pulsing { animation: none; }
|
||||
}
|
||||
|
||||
/* The live elapsed-time badge on the active node. */
|
||||
.graph-elapsed {
|
||||
position: absolute;
|
||||
bottom: -9px;
|
||||
right: 6px;
|
||||
padding: 0 5px;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
|
||||
border-radius: 999px;
|
||||
background: var(--surface);
|
||||
color: var(--accent);
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
/* The definition pane opened from a node click. */
|
||||
.graph-pane {
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user