Module headless
Expand description
Driving a ui app without a display.
--shots renders a cold-start frame offscreen but never delivers input,
so it can’t answer does a change survive a restart? FrameHarness does:
it stands up the app’s widget tree over a Taffy layout at a fixed
viewport and feeds it the same WindowEvents winit would, through the
same Widget::handle_event the
live app uses — nothing stubbed, including CRDT mutations.
Every app launched through the standard lifecycle takes a
--headless-drive '<json>' flag:
ebook --headless-drive '{"actions":[{"click_named":"library_item[0]"}]}'
ebook --headless-drive '{"dump":"/tmp/after.json"}'The first process changes state and exits (flushing its store); the second loads the store and dumps the document as JSON. Diffing the two dumps is the persistence proof for the app’s document.
Modules§
- host_
media - A retained component’s local media lane for in-process hosts. Requests retain their exact component lifetime; a reply cannot reach a replacement.
- system_
search - Portable system search. Hosts supply admitted identities and resolve inert selections.
Structs§
- Accessibility
Audit - Result of auditing the same semantic tree exported to assistive technology.
- Accessibility
Issue - One deterministic accessibility-contract violation found in a laid-out retained or synthetic semantic node.
- Control
- One control as the exported accessibility tree carries it now.
- Frame
Harness - Frame
Options - Construction options for
FrameHarness::for_root_with. - Frame
Output - Frame
Render Input - Borrowed paint input without constructing an accessibility snapshot.
- Frame
Schedule - The canonical display-independent frame pipeline.
- Framed
- A
FrameHarnessover one concrete root that reads as that root. - Inspection
Node - One node in a developer inspection snapshot.
- Inspection
Snapshot - A coherent post-layout snapshot of the retained and semantic trees.
- Invocation
- Invoke one action the app publishes, by its
(resource, action)address, through the same door every other caller uses. No coordinates: the scenario names what to do, not where to click. - Native
AppAudit - Runtime proof over the app’s actual laid-out widget and resource trees.
- Native
AppIssue - One reason an app cannot yet be certified as fully action-native.
- Relayout
Stats - What one completed
FrameHarness::relayoutdid with its layout tree. - Root
Dispatch - What the root reported for one
FrameHarness::dispatch_to_root_outcome. - Semantic
Expectation - Semantic outcome required at this point in a saved scenario.
- Spec
Enums§
- Action
- One thing to do to the app.
- Control
Input - What a person can do to a control.
- Frame
Demand - Why a widget asks a live host for a frame
(
FrameHarness::frame_requesters).
Constants§
- ACCESSIBILITY_
AUDIT_ VERSION - Current machine-readable accessibility-audit report format.
- CONTROL_
RESOURCE_ PREFIX - Resource id prefix of a projected control (
ui:<percent-encoded node>). - DEFAULT_
VIEWPORT - Viewport the driver lays out at unless a spec overrides it. Matches the
default
--shotsviewport so a driven frame and a screenshot agree. - NATIVE_
APP_ AUDIT_ VERSION - Current machine-readable Tilo-native contract report format.
Functions§
- parse_
spec - Parse and strictly validate one complete headless-driver payload.
- run_
component - Drive the same prepared component with existing actions, audit, and output formats. Returns 0 for success, 1 for an action/output failure, and 3 for durability failure.
- viewport
- A logical
(width, height)as a harness viewport.