Skip to main content

Module headless

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§

AccessibilityAudit
Result of auditing the same semantic tree exported to assistive technology.
AccessibilityIssue
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.
FrameHarness
FrameOptions
Construction options for FrameHarness::for_root_with.
FrameOutput
FrameRenderInput
Borrowed paint input without constructing an accessibility snapshot.
FrameSchedule
The canonical display-independent frame pipeline.
Framed
A FrameHarness over one concrete root that reads as that root.
InspectionNode
One node in a developer inspection snapshot.
InspectionSnapshot
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.
NativeAppAudit
Runtime proof over the app’s actual laid-out widget and resource trees.
NativeAppIssue
One reason an app cannot yet be certified as fully action-native.
RelayoutStats
What one completed FrameHarness::relayout did with its layout tree.
RootDispatch
What the root reported for one FrameHarness::dispatch_to_root_outcome.
SemanticExpectation
Semantic outcome required at this point in a saved scenario.
Spec

Enums§

Action
One thing to do to the app.
ControlInput
What a person can do to a control.
FrameDemand
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 --shots viewport 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.