nx_render_journal.nx
buildroot/runtime/nx_render_journal.nx
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
imports: nx_syscalls.nx
imported by: nx_browser_demo_test.nxnx_ux_score.nxnx_ux_triangulate_w3c_kat_test.nx
structs
| 44 | struct RenderJournalEntry |
| 57 | struct RenderJournal |
consts
| 39 | const NX_JOURNAL_MAX_ENTRIES: i64 = 1024 |
| 40 | const NX_JOURNAL_KIND_RECT: i64 = 1 |
| 41 | const NX_JOURNAL_KIND_EVENT: i64 = 2 |
| 42 | const NX_JOURNAL_KIND_NAV: i64 = 3 |
| 55 | const NX_JOURNAL_ENTRY_BYTES: i64 = 64 |
| 63 | const NX_JOURNAL_BYTES: i64 = 32 |
functions
| 65 | func nx_journal_new() -> *RenderJournal |
| 75 | func _journal_at(j: *RenderJournal, idx: i64) -> *RenderJournalEntry |
| 79 | func nx_journal_log_rect(j: *RenderJournal, intent: *u8, |
| 93 | func nx_journal_log_event(j: *RenderJournal, intent: *u8, calls 1: _journal_at |
| 108 | func nx_journal_log_nav(j: *RenderJournal, intent: *u8, calls 1: _journal_at |
| 124 | func _journal_put_dec(buf: *u8, off: *i64, v: i64) -> i64 |
| 141 | func _journal_put_hex8(buf: *u8, off: *i64, v: i64) -> i64 called by 1: nx_journal_dump_to_fd |
| 155 | func _journal_put_str(buf: *u8, off: *i64, s: *u8) -> i64 called by 1: nx_journal_dump_to_fd |
| 165 | func nx_journal_dump_to_fd(j: *RenderJournal, fd: i64) -> i64 |
| 216 | func nx_journal_dump_to_file(j: *RenderJournal, path: *u8) -> i64 |
| 224 | func main() -> i64 |