code wiki / (root) / nx_render_journal.nx

nx_render_journal.nx

buildroot/runtime/nx_render_journal.nx

7860 B226 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind tooltopic render
docsdependenciesstructsconstsfunctions

about

nx_render_journal.nx -- substrate-native UX/CX intelligence layer. First-class observability for every Nishi app deployed via the WSLg-X11 pioneer pattern. REPLACES screen-scraping / pixel-level session recording (Hotjar, FullStory, LogRocket -- ALL refused as surveillance) with substrate-side structured intent logging: each paint/dispatch/navigation op records its OWN intent the moment it happens. The user's screen is never observed; only the substrate's actions are. Substrate honesty over surveillance. Patterns absorbed from best-in-class (without copying their snooping-flavoured implementations): OpenTelemetry traces -> kind + attributes + timestamp per event Honeycomb wide events -> rich attribute set per row Sentry RUM -> error-fingerprint via semantic tag Chrome DevTools -> queryable tree state at any moment React DevTools -> component-intent introspection eBPF -> instrumentation by composition not snooping Patterns explicitly REFUSED: Hotjar / FullStory pixel-stream session-replay Screenshot-every-N-seconds (snoops user content) Keystroke-by-keystroke recording outside form-input boundaries Mouse-trail capture beyond event handler hit-tests API: nx_journal_new() -> *RenderJournal nx_journal_log_rect(j, intent, x, y, w, h, color) nx_journal_log_event(j, intent, kind, x, y) nx_journal_log_nav(j, intent, from_idx, to_idx) nx_journal_dump_to_fd(j, fd) -- structured text nx_journal_dump_to_file(j, path) -- to /tmp/*.log license_tier: ORIGINAL lineage_id: nishi_render_journal_q10

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_render_journal.nx nx_browser_demo_test.nx nx_ux_score.nx nx_ux_triangulate_w3c_kat_test.nx

imports: nx_syscalls.nx

imported by: nx_browser_demo_test.nxnx_ux_score.nxnx_ux_triangulate_w3c_kat_test.nx

structs

44struct RenderJournalEntry
57struct RenderJournal

consts

39const NX_JOURNAL_MAX_ENTRIES: i64 = 1024
40const NX_JOURNAL_KIND_RECT: i64 = 1
41const NX_JOURNAL_KIND_EVENT: i64 = 2
42const NX_JOURNAL_KIND_NAV: i64 = 3
55const NX_JOURNAL_ENTRY_BYTES: i64 = 64
63const NX_JOURNAL_BYTES: i64 = 32

functions

65func nx_journal_new() -> *RenderJournal
called by 2: mainmain calls 1: sys_mmap
75func _journal_at(j: *RenderJournal, idx: i64) -> *RenderJournalEntry
79func nx_journal_log_rect(j: *RenderJournal, intent: *u8,
93func nx_journal_log_event(j: *RenderJournal, intent: *u8,
calls 1: _journal_at
108func nx_journal_log_nav(j: *RenderJournal, intent: *u8,
calls 1: _journal_at
124func _journal_put_dec(buf: *u8, off: *i64, v: i64) -> i64
called by 1: nx_journal_dump_to_fd calls 1: sys_mmap
141func _journal_put_hex8(buf: *u8, off: *i64, v: i64) -> i64
155func _journal_put_str(buf: *u8, off: *i64, s: *u8) -> i64
165func nx_journal_dump_to_fd(j: *RenderJournal, fd: i64) -> i64
216func nx_journal_dump_to_file(j: *RenderJournal, path: *u8) -> i64
224func main() -> i64