feat(ui): message inspector + session panel#38
Merged
Conversation
Selecting a timeline row now unpacks the event in the detail pane: - Normalized fields (id, message id, type, direction, time, error). - Session panel: the session the event correlates into — transaction id, status, connector, start/stop, event count — with a jump-to-first-event control that selects and highlights the session's first event. - Payload tree: a model-owned disclosure tree over the std.json.Value (ui.tree + the ARIA keymap). Flat treeitem rows keyed by a collapse- independent pre-order id, bounded in depth (6), breadth (40), and total node count (100) so a hostile payload can't blow the widget-node budget. - Raw view: the original OCPP-J array, pretty-printed under a byte cap. The literal timeline viewport scroll on jump rides the same runner eject as interactive open (#33); the model-level jump (select + highlight) lands now. Tests: payload-tree object/array/scalar shapes, the depth and breadth bounds, collapse toggling, the session panel + jump wiring, and the a11y sweep over the enriched detail pane. Closes #30
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.
Summary
Turns the detail pane into a real message inspector. Selecting a timeline row
(#28) now unpacks the event completely and shows the session it belongs to.
error code/description for
CallError.status (colored), connector, start/stop, and event count, plus a
Jump to first event control.
std.json.Valuepayload (
ui.tree+ the ARIA keymap: Up/Down roving focus, Left collapses,Right expands, Enter selects). Objects/arrays expand; scalars are leaves
(strings quoted).
Design notes
role=.treeitemrows with depth encoded as indentation, not physically nested containers. The
per-row keymap resolves off each row's own
expandedstate and roving focuswalks document order, so flatness keeps the full ARIA keymap while cutting each
row to ~4 widget nodes — the timeline is windowed, but the detail tree is not,
so node cost matters.
pre-order rank over the bounded payload. The walk always advances the id
counter over every in-bounds node (emitting a row only when visible), so a
collapse bit always names the same node across rebuilds — toggling one node
never shifts another's identity. State is a fixed-size
StaticBitSeton thetrace, reset when the selection changes.
tracked nodes; past them the tree shows a compact
... N more/... truncatedmarker. The raw view is capped at 8 KiB. Payloads are untrusted (ADR-0007), so
the inspector can't be made to blow the widget-node budget or the text layout.
Scope note — timeline scroll on jump
Jump-to-first-event selects and highlights the session's first event and
drives the detail/session panels to it. The literal timeline viewport scroll
is not wired: the zero-config
UiAppexposes no model-driven scroll control (theruntime owns the virtual list's offset, keyed by list id), so revealing an
arbitrary row needs the same runner eject as interactive open — tracked under
#33. For realistic traces the first event is already at the top and visible.
Testing
native test -Dplatform=null— 77 headless tests green (macOS local; CI runsboth OSes). New coverage:
leaf never renders) and the breadth bound (an over-wide array shows a marker),
and the total-node bound.
on_pressdispatch.
the session's first event.
session, raw).
native check --strictclean;native build(ReleaseFast) builds. Living docs(
CURRENT_STATE.md) updated in-branch.Closes #30