Skip to content

Adds the event log pane for the inspector - #29

Merged
johnnyt merged 3 commits into
mainfrom
sui-t36.5-event-log-pane
Aug 22, 2026
Merged

Adds the event log pane for the inspector#29
johnnyt merged 3 commits into
mainfrom
sui-t36.5-event-log-pane

Conversation

@johnnyt

@johnnyt johnnyt commented Aug 22, 2026

Copy link
Copy Markdown
Member

Why

The Livebook inspector epic (sui-t36) needs a timeline view: the normalized
trace stream rendered as a readable log keyed by (macrostep, round), one row
per dequeued event with its selected transitions, exit/entry sets, and
raised-cause metadata, collapsible per macrostep. Ordering comes entirely
from the stamps, never arrival order - this is the UI the counters were
designed for (statifier ADR-0020).

What

Three pure modules, no Kino reference (the sui-t36.8 assembly bead owns the
widget wrapper, matching how StatifierUI.Diagram satisfies ADR-0004):

  • StatifierUI.EventLog - a fold from [%Trace.Message{}] into
    macrostep -> round buckets (Macrostep/Round structs). Buckets order by
    (macrostep, round); messages inside a bucket by {microstep, seq}. Routing
    is by round-presence rather than type prefix, so effect.budget_exhausted
    (which carries a round) lands in its round while the other effect.*
    types sit at macrostep level. build/1 refuses mixed-session input with
    {:error, {:mixed_sessions, ids}} rather than merging timelines.
  • StatifierUI.EventLog.Labels - resolves state/t_index/c_index/d_index
    references through the session.start manifest already on the stream.
  • StatifierUI.EventLog.Markdown - collapsible per-macrostep Markdown
    rendering, with a collapsible: false fallback in case <details> does
    not collapse inside a rendered Markdown cell.

Exit/entry sequences are never re-sorted (ADR-0011).

Notes

  • Base choice: main, independent of Serializes datamodel_change as a wire type #27. The pane consumes only trace.*
    messages, which already carry round on main; effect.datamodel_change
    (Serializes datamodel_change as a wire type #27) feeds the datamodel explorer (sui-t36.7), not this pane. Not stacked.
  • Round propagation onto the remaining effect.* types stays out of scope:
    docs/wire-format.md (lines 63 and 856) currently names sui-t36.5 as its
    owner, but that is a wire-format extension beyond this bead's spec and
    needs its own bead; the round-presence routing here makes it a zero-code
    change for this pane when it lands.
  • Gate: full mix quality and mix gate.verify green after every phase and
    after rebase - 307/307 tests, 93.7% coverage; Gettext/Sobelow are the two
    permanent not-applicable skips. The known sui-hmm flake did not fire.
  • Deferred manual verification (needs a live notebook) is recorded in
    docs/plans/260822-sui-t36.5-event-log-pane.md, chiefly whether <details>
    collapses inside a rendered Markdown cell.

Closes sui-t36.5

StatifierUI.EventLog.build/1 groups a session's trace messages into
macrosteps and rounds keyed by their own (macrostep, round) stamps,
never arrival order. Rounds bucket by round then order internally by
(microstep, seq); exit and entry sequences keep the engine's own
emission order per ADR-0011. effect.budget_exhausted attaches to its
round since it is the one core effect that carries one; every other
effect.* attaches to its macrostep. A mixed-session list is refused
rather than merged onto one timeline.

Adds StatifierUI.EventLog.Round and StatifierUI.EventLog.Macrostep as
the structs the fold produces. No Kino reference and no rendering yet;
labels and Markdown output land in later phases of this bead.

Refs: sui-t36.5
StatifierUI.EventLog.Labels turns the wire format's state, transition,
content, and data indexes into human strings, reading only the tables
session.start already carries. origin/2 and owner/2 dispatch on the
"kind" key over the eight origin shapes and five owner shapes,
delegating to the four index resolvers; an unrecognized kind renders
its own name rather than raising, matching the format's additive-field
rule.

from_log/1 finds the first session.start on a log and builds from its
manifest; with none, empty/0 renders every index as a bare "#n" for
the late-attach case. No Kino reference.

Refs: sui-t36.5
StatifierUI.EventLog.Markdown.render/2 turns the log model into a
string a host hands to Kino.Markdown.new/1: one collapsible block per
macrostep (summary, round count, quiescence state), one table row per
round (event, selected transitions, exit/entry sets in the engine's
own order per ADR-0011), a raised-cause note where the dequeue's event
was raised by the platform, a budget note where a round blew ADR-0019's
round budget, and the macrostep's round-less effects listed last under
their own heading. collapsible: false swaps <details> blocks for plain
headings; :open controls which macrosteps start expanded. No manifest
degrades every index to a bare "#n" instead of crashing.

Adds the changelog fragment for the whole bead. No Kino reference in
code, only in moduledoc prose.

Refs: sui-t36.5
@johnnyt
johnnyt merged commit e02e710 into main Aug 22, 2026
1 check passed
@johnnyt
johnnyt deleted the sui-t36.5-event-log-pane branch August 22, 2026 14:56
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.

1 participant