feat(l9-inspector): full envelope JSON + history backfill + readability - #524
Merged
Conversation
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
force-pushed
the
claude/github-issue-501-cetfke
branch
from
August 15, 2026 00:27
3179af6 to
b82f87b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #501. Live-verified against a running SLIM node using the
mycelium l9 sendutility 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.
{header, payload}envelope.Backend
persister.l9_bus_frame()(shared by_publish_to_bus), addl9_wire_history()replaying the transcript through that same shape, exposed asGET /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()seedsframeson mount; live SSE appends with a sharedseenIdsset 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.<pre>:max-h-64 overflow-auto; rows gethover:bg-hairline+ a leading chevron that rotates on expand.