Commit 25cc9ce
committed
feat(admin): the graph HTML export, and review hardening across the pipeline (issue #54)
Two things in one PR, both issue #54: the browser artifact, and the
fixes from the three-agent review that ran against the whole delivery.
The export. /dispatch graph html renders the same assembled model as
every other graph surface into ONE self-contained HTML file: inline
SVG/CSS/JS, zero external requests, works over file://, nothing
listens anywhere. Node-RED shape language (pale category chips, 20px
grid, ports, status dots, group rects per folder) on the repo's dark
chrome; hand-rolled Sugiyama-lite layout; evidence-labelled wires with
a legend, the caps line, and the honesty counters. The page carries
its own refresh: a Reload button, off/5s/30s auto-reload, a live
staleness stamp, and hash-persisted view state, which the STABLE
artifact path makes useful: the command overwrites <graphDir>/graph.html
atomically (tmp+rename), so an open tab picks up a re-run without
losing its pan/zoom. The URL prints before the spawn; over SSH or
without a display the spawn is skipped and said; --no-open always
skips it; a write failure names the path and never opens.
The hardening, every item CONFIRMED by an executing reviewer and now
pinned by a regression test:
- joinRunsToTriggers guarded only the index RANGE, so an in-range
triggers.json edit slid one trigger's run history onto whatever
entry took its row. The persisted triggerType (sitting unused) now
must agree; the same-type-reorder residual is named in
REQ-TOPOLOGY-GRAPH and pinned.
- chainRefused counters folder-scoped (same-folder-only chaining makes
same-named flows different flows).
- Observed edges into unreachable folders minted phantom
missing-at-HEAD endpoints off a read that never happened; now
dropped into the counter.
- LIST trigger rows carried the display position, not the raw file
index: with a garbage entry above, x+y deleted the wrong entry and
reported the real trigger gone while it kept firing.
- Esc from a GRAPH-entered trigger drill returned to LIST, discarding
the operator's graph position.
- collectGraphInputs' folder-cap flag never reached the model, so the
cap banner could never fire; folderless cron entries lost their
config edge; unreadable injected dirs vanished silently; the mention
heuristic tested only the first occurrence; the file:// URL was
concatenated rather than pathToFileURL'd.
- In the page: under-row routes collided with the next row of chips,
the pan/zoom mapping ignored preserveAspectRatio letterboxing,
every background pan wiped the selection, #sel=constructor threw at
load, and parallel wires stacked their labels into garble. All fixed
and mutation-verified.
Specs: DES-ADMIN-VIA-PI-EXTENSION AMENDED (the artifact; a file with
no server is not a surface, and the socket-to-file substitution is
DES-JOB-OUTBOX-CHAINING's own); DES-QUEUE-BULLMQ-OVER-CUSTOM's 'drops
the web surface entirely' REWORDED to 'the served web surface' rather
than argued around; NEW REQ-GRAPH-HTML-EXPORT; REQ-TOPOLOGY-GRAPH (b)
AMENDED to a promise the persisted fields can keep; NEW OQ-024 (the
opener-spawn WATCH residual); SECURITY.md export paragraph;
docs/graph.md and README updated.
Also repaired in passing, because this commit's own pre-push scan
caught it: six literal NUL bytes in graph-model.mjs and two in
read-model.mjs, written as template-literal separators by an agent
where spaces belonged (the recurring trap CLAUDE-adjacent history
records twice). They were functionally invisible (both sides of every
Map key used the same byte, and the NULs sat past git's 8000-byte
binary-detection window, which is why no Bin marker ever showed), but
a control byte in source is a control byte in source. Replaced with
the spaces they were meant to be; the whole tree now scans clean.
Verified end to end: the artifact generated from a real fixture
deployment renders in headless Chrome with pan/zoom, tooltips,
highlight, refresh controls and no console errors.
Suite in the CI posture: 2166 pass, 0 skipped; admin bundle builds.
Signed-off-by: Rob Boerman <robboerman@live.nl>1 parent 1250123 commit 25cc9ce
18 files changed
Lines changed: 1927 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
385 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
521 | 525 | | |
522 | 526 | | |
523 | 527 | | |
524 | | - | |
| 528 | + | |
| 529 | + | |
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
| |||
757 | 762 | | |
758 | 763 | | |
759 | 764 | | |
| 765 | + | |
760 | 766 | | |
761 | 767 | | |
762 | 768 | | |
| |||
781 | 787 | | |
782 | 788 | | |
783 | 789 | | |
| 790 | + | |
784 | 791 | | |
785 | 792 | | |
786 | 793 | | |
| |||
1708 | 1715 | | |
1709 | 1716 | | |
1710 | 1717 | | |
1711 | | - | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
1712 | 1725 | | |
1713 | 1726 | | |
1714 | 1727 | | |
| |||
1754 | 1767 | | |
1755 | 1768 | | |
1756 | 1769 | | |
| 1770 | + | |
1757 | 1771 | | |
1758 | 1772 | | |
1759 | 1773 | | |
| |||
2131 | 2145 | | |
2132 | 2146 | | |
2133 | 2147 | | |
2134 | | - | |
2135 | | - | |
2136 | | - | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
2137 | 2155 | | |
2138 | 2156 | | |
2139 | 2157 | | |
| |||
0 commit comments