Pure pane assembly for the Livebook inspector: folds a compiled
Statifier.Machine and a StatifierUI.Trace.Subscriber message list
into the render source each pane displays - Mermaid source for the
configuration diagram, Markdown for the event log and the datamodel
explorer, and a status line from the subscriber's stats/1 snapshot.
No Kino, no process, no session: everything here is testable from a
message list, exactly like the pane modules it composes. The Kino shell
(StatifierUI.Kino) maps these strings into widgets and owns nothing
else.
The active configuration is read from the newest
trace.macrostep_stable message - the quiescent configuration of the
last completed macrostep (docs/wire-format.md). Before any macrostep
has completed in view, the caller-supplied initial configuration
(typically Statifier.Session.snapshot/1's) is used instead.
Summary
Functions
The active configuration messages implies: the newest
trace.macrostep_stable's configuration payload, or
opts[:initial_configuration] (default []) when no macrostep has
stabilized in view.
Markdown for the datamodel explorer pane:
StatifierUI.DatamodelExplorer.build_live/1 over messages, rendered
with the default markers. A build failure renders as a visible error
line, same policy as event_log/1.
Mermaid stateDiagram-v2 source for the configuration pane:
StatifierUI.Diagram.render/2 over active_configuration/2.
Markdown for the event log pane: StatifierUI.EventLog.build/1 rendered
collapsible with the last macrostep open. A build failure renders as a
visible error line rather than raising - the inspector keeps showing
the other panes.
The one-line (plus warnings) status header: session id, subscriber
status, message and drop counts, and one blockquote line per diagnostic.
A :not_recorded or :catch_up_failed diagnostic is what labels the
whole inspector live-only - a partial stream is never presented as
whole (statifier ADR-0049; this bead's precondition note).
Types
@type opt() :: {:initial_configuration, Enumerable.t()}
Options shared by the fold functions.
Functions
@spec active_configuration([StatifierUI.Trace.Message.t()], [opt()]) :: [ non_neg_integer() ]
The active configuration messages implies: the newest
trace.macrostep_stable's configuration payload, or
opts[:initial_configuration] (default []) when no macrostep has
stabilized in view.
@spec datamodel([StatifierUI.Trace.Message.t()]) :: String.t()
Markdown for the datamodel explorer pane:
StatifierUI.DatamodelExplorer.build_live/1 over messages, rendered
with the default markers. A build failure renders as a visible error
line, same policy as event_log/1.
@spec diagram(Statifier.Machine.t(), [StatifierUI.Trace.Message.t()], [opt()]) :: String.t()
Mermaid stateDiagram-v2 source for the configuration pane:
StatifierUI.Diagram.render/2 over active_configuration/2.
@spec event_log([StatifierUI.Trace.Message.t()]) :: String.t()
Markdown for the event log pane: StatifierUI.EventLog.build/1 rendered
collapsible with the last macrostep open. A build failure renders as a
visible error line rather than raising - the inspector keeps showing
the other panes.
@spec status(StatifierUI.Trace.Subscriber.stats()) :: String.t()
The one-line (plus warnings) status header: session id, subscriber
status, message and drop counts, and one blockquote line per diagnostic.
A :not_recorded or :catch_up_failed diagnostic is what labels the
whole inspector live-only - a partial stream is never presented as
whole (statifier ADR-0049; this bead's precondition note).