feat(cli): surface the composite doc in the graph viewer (#125)

The viewer threads the model's doc through normalizeModel into both
composite view states — appended to INFO.B (collapsed box) and INFO.C
(expanded cluster frame) — and shows the root composite's doc as a muted
header line (#rootdoc span in GRAPH_HEAD, empty when absent; the DOM
population sits in the browser-only block, the same boundary as the
breadcrumb). viewer_tooltip.mjs pins the doc'd cases beside the
byte-exact un-doc'd pins; sample-model.json gains the additive doc key;
e2e drives aura graph over a nested-doc blueprint into the emitted page.

closes #125
This commit is contained in:
2026-07-11 20:18:32 +02:00
parent 953d04a774
commit 62f6592ef6
6 changed files with 103 additions and 4 deletions
+5
View File
@@ -37,6 +37,7 @@ const GRAPH_HEAD: &str = r#"<header>
<b>aura graph</b>
<span id="crumb"></span>
<span class="sub">hover · [+] expand · body drill</span>
<span id="rootdoc" class="sub"></span>
</header>
<div id="stage"></div>
<div id="tip"></div>
@@ -261,6 +262,10 @@ mod tests {
);
// the chart-only toggle control must not leak onto the graph page
assert!(!html.contains("xmode-toggle"), "chart toggle leaked onto the graph page");
assert!(
html.contains(r#"<span id="rootdoc" class="sub"></span>"#),
"the graph header carries the (empty) root-doc slot"
);
}
fn sample_chart_data() -> ChartData {