Renders a StatifierUI.EventLog.t() as Markdown a host hands to
Kino.Markdown.new/1, per the sui-t36.5 plan's Phase 3.
render/2 is a pure function over the log and the StatifierUI.EventLog.Labels.t()
that resolves its indexes - it names Kino only in this moduledoc and
calls nothing under Kino.*. sui-t36.8 owns wrapping the returned string
in an actual Kino.Markdown widget.
Structure
A header line naming the session (and a drop warning when the log's
truncated? is true), then one block per macrostep - a collapsible
<details>/<summary> by default, or a plain ### Macrostep <n> heading
with collapsible: false - each holding a Markdown table with one row per
round, that round's notes (a raised-cause line, its executed content, a
budget-exhausted line), and the macrostep's round-less effect.* messages
listed last under their own heading. A footer names session.halted/
session.terminated/session.unroutable when the log carries one.
exited and entered render through Labels.states/2 in list order
(ADR-0011): this module never re-sorts either list.
Summary
Functions
Renders log as a Markdown string.
Types
@type open_selector() :: :last | :all | :none | [non_neg_integer()]
@type opt() :: {:labels, StatifierUI.EventLog.Labels.t()} | {:collapsible, boolean()} | {:open, open_selector()}
Functions
@spec render(StatifierUI.EventLog.t(), [opt()]) :: String.t()
Renders log as a Markdown string.
Options:
:labels- aLabels.t()to resolve indexes with. Defaults toLabels.from_log(log).:collapsible- wraps each macrostep in<details>/<summary>whentrue(the default), or renders a plain### Macrostep <n>heading with no HTML whenfalse.:open- which macrosteps start open when:collapsibleistrue::last(the default, opens the highest-numbered macrostep),:all,:none, or a list of macrostep numbers.