Skip to content

feat(l9-inspector): full envelope JSON + history backfill + readability - #524

Merged
juliarvalenti merged 2 commits into
mainfrom
claude/github-issue-501-cetfke
Aug 15, 2026
Merged

feat(l9-inspector): full envelope JSON + history backfill + readability#524
juliarvalenti merged 2 commits into
mainfrom
claude/github-issue-501-cetfke

Conversation

@juliarvalenti

@juliarvalenti juliarvalenti commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Closes #501. Live-verified against a running SLIM node using the mycelium l9 send utility from #534.

What

The L9 Inspector was hard to use: rows didn't expand to the underlying envelope, and the feed was live-only — a freshly opened tab started empty and any earlier traffic was gone. This makes it a real inspector.

  • Expand rows into the full envelope JSON (original scope) — click a wire row to see the decoded {header, payload} envelope.
  • History backfill — seed the feed from the durable transcript on mount, then append live, the same history-then-live pattern the room chat uses. No more empty tab.
  • Readable expanded view — max-height scroll for big envelopes, dependency-free JSON syntax highlighting, and a hover + rotating-chevron affordance so rows read as clickable.

Backend

  • Extract the live bus-frame builder into persister.l9_bus_frame() (shared by _publish_to_bus), add l9_wire_history() replaying the transcript through that same shape, exposed as GET /rooms/{room}/messages/l9. This preserves the full L9 envelope — the conversational messages API flattens records to text and drops non-chat payloads, so it could never feed the inspector.
  • tests/test_l9_history.py: envelope-intact replay, oldest-first + limit, empty room.

Frontend

  • fetchL9History() seeds frames on mount; live SSE appends with a shared seenIds set so a backfilled row and its live re-push (same envelope id) don't double up.
  • highlightJson() — small tokenizer (keys/strings/numbers/literals), visible text byte-identical.
  • Expanded <pre>: max-h-64 overflow-auto; rows get hover:bg-hairline + a leading chevron that rotates on expand.
  • Tests: backfill-on-mount, dedup-against-live-repush (+ existing 12).

claude and others added 2 commits August 14, 2026 17:15
Each FrameRow in the L9 inspector now toggles open on click to reveal the
raw wire message pretty-printed below the summary line. toL9Frame retains
the source message on the frame, and envelopeJson decodes the transport-
encoded content string so headers, payload data, and parents read as
structure. While any row is expanded the feed pauses tail-following so
incoming frames don't yank the open envelope out of view.

Closes #501

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTpkAUFrPVH8gz6ZUjvgQA
The live L9 inspector was fed only by the SSE bus (no history), so a freshly
opened tab started empty and any earlier traffic was invisible. Backfill it
from the durable transcript, mirroring the room chat's history-then-live design.

Backend: extract the bus-frame builder into l9_bus_frame(), add
l9_wire_history() replaying the transcript through that same shape (envelope
intact — the conversational messages API flattens it to text and drops
non-chat records), exposed as GET /rooms/{room}/messages/l9.

Frontend: fetchL9History() seeds the inspector on mount, then live SSE appends
with an id-dedup set so a backfilled row and its live re-push don't double up.
Also polish the expanded envelope: max-height scroll, dependency-free JSON
syntax highlight, and a hover + rotating-chevron affordance so rows read as
clickable.
@juliarvalenti
juliarvalenti force-pushed the claude/github-issue-501-cetfke branch from 3179af6 to b82f87b Compare August 15, 2026 00:27
@juliarvalenti juliarvalenti changed the title feat(frontend): expand L9 wire-feed rows into full envelope JSON feat(l9-inspector): full envelope JSON + history backfill + readability Aug 15, 2026
@juliarvalenti
juliarvalenti merged commit 7f8cf0b into main Aug 15, 2026
5 checks passed
@juliarvalenti
juliarvalenti deleted the claude/github-issue-501-cetfke branch August 15, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L9 inspector: expand a wire-feed row into full envelope JSON

2 participants