Adds the Livebook inspector assembly - #34
Merged
Merged
Conversation
StatifierUI.Kino.inspect/3 composes the four merged panes - configuration diagram, datamodel explorer, event injection, event log - over one shared Trace.Subscriber via Kino.Layout. Every process it starts goes through Kino.start_child/1, so re-evaluating the cell terminates them and the session drops the dead subscriber: the clean detach. Compiled only when the optional :kino dependency is present (ADR-0004); otherwise a stub raises with instructions. Trace.Subscriber.attach/3 gains catch_up: true (statifier ADR-0049): the subscription and the recording snapshot happen in one session call, the replayed prefix is folded into the buffer before the live suffix, and an unrecorded session falls back to live delivery with a :not_recorded diagnostic the inspector surfaces as "Live-only" - a partial stream is never presented as whole. StatifierUI.Inspector is the pure pane-assembly fold behind the Kino shell (active configuration from the newest trace.macrostep_stable, pane markdown, the status header), testable without a Livebook runtime. notebooks/inspector.livemd drives a checkout chart end to end and doubles as the milestone's manual acceptance test. Refs: sui-t36.8
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.
Why
The
sui-t36epic's integration piece: the four panes merged over the lastmilestone (configuration renderer, event log, event injection, datamodel
explorer) existed only as pure builders with no assembled surface. This
delivers the public entry point -
StatifierUI.Kino.inspect/3- and the demonotebook that doubles as the milestone's manual acceptance test.
What
StatifierUI.Trace.Subscriber.attach/3gainscatch_up: true(statifierADR-0049, per the bead's precondition note): the replayed prefix from
Statifier.Replay.run/1is folded into the buffer inside the attach call,atomically ordered ahead of the live suffix.
{:error, :not_recorded}falls back to
subscribe/2with a:not_recordeddiagnostic - a partialstream is labeled Live-only, never presented as whole.
StatifierUI.Inspector- the pure pane-assembly fold (activeconfiguration from the newest
trace.macrostep_stable, event log anddatamodel Markdown, the status header). No Kino dependency; this is where
the logic and the tests live.
StatifierUI.Kino- the thin shell, compiled only when the optional:kinodependency is present (ADR-0004; a stub raises otherwise). Allprocesses go through
Kino.start_child/1, so cell re-evaluationterminates them and the session's own monitor drops the dead subscriber:
the clean detach. Injection pane wires fixture-palette buttons and a
free-form name/payload form to
EventInjection.send_draft/3.notebooks/inspector.livemd- a walkable checkout-chart demo withnumbered steps and expected observations per step.
Notes
mix qualitygreen before push (426 tests, 92.3% coverage);mix gate.verifyattests full scope. Gettext and Sobelow are the twopermanently-inapplicable skips this project declares.
not needed for this milestone - sent/not-sent feedback plus the live log
is adequate in a single-user notebook. A caller-supplied correlation id on
Session.send_event/2stays a potential engine change for a futureembedder with exact matching needs; recorded on the bead, nothing filed.
says so where it starts the session.
Closes sui-t36.8.