code wiki / (root) / nx_dashboard.nx

nx_dashboard.nx

buildroot/runtime/nx_dashboard.nx

7242 B195 linesdepth 5pulls 11 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_dashboard.nx -- end-to-end batch-audit dashboard renderer. The capstone tying the sovereign-log roadmap into one consumable artifact: takes a CBOR span buffer (any source), extracts every BATCH_CLOSE rollup via nx_trace_query, renders an HTML page via nx_html_emit, writes to fd. Per the user's "live fire testing + see how its testing, innovating, improving" directive: this is what produces the page they actually look at. Pure NishiLang from binary up; no SQLite / Python / template engine. Caller flow: 1. Compile nx_dashboard via nxc2 -> nx_dashboard.elf 2. Pipe a CBOR span stream into stdin (or load from log file) 3. Run nx_dashboard --fd=1 > batch_audit.html 4. Open batch_audit.html in any browser The smoke test below constructs a synthetic 2-batch stream in memory so we can exercise the end-to-end render without a live batch. Production usage swaps the in-memory stream for an actual log-bytes read. genealogy_id: cqrs_projection + grafana_dashboard_pattern lineage_id: sovereign_substrate_dashboard_v1

dependencies 8 imports · 1 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_cbor.nx nx_trace_emit.nx nx_trace_query.nx nx_html_emit.nx nx_batch_audit_sidecar.nx nx_dashboard.nx nx_dashboard_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_cbor.nxnx_trace_emit.nxnx_trace_query.nxnx_html_emit.nxnx_batch_audit_sidecar.nx

imported by: nx_dashboard_test.nx

structs

none

consts

85const NX_DASH_KEY_N_SCENES: nx_int = 0x5C01
86const NX_DASH_KEY_N_VIOLATIONS: nx_int = 0xCC07
87const NX_DASH_KEY_OUTFIT_BAND: nx_int = 0x0FBA
88const NX_DASH_KEY_OUTFIT_DISTINCT: nx_int = 0xFBD1
89const NX_DASH_KEY_POSE_BAND: nx_int = 0xB05E
90const NX_DASH_KEY_POSE_DISTINCT: nx_int = 0xBD15

functions

47func _dash_util_badge_kind(util_band: nx_int) -> nx_int
54func _dash_util_badge_label(util_band: nx_int) -> *u8
67func _dash_lookup_attr(slot: *i64, key_hash: nx_int, default_val: nx_int) -> nx_int
94func nx_dashboard_render_row(fd: nx_int, slot: *i64) -> nx_int
133func nx_dashboard_render(fd: nx_int, title: *u8,