The event bus
The event bus is a lightweight pub/sub channel any widget can fire into or listen on, enabling inter-widget reactions without a backend round-trip. Standard events:
This lets, say, a Pomodoro widget dim a focus dashboard when a break begins, or a “refresh
all” button update every live card at once.
Reactive data binding (data_bound)
The data_bound widget polls a backend endpoint on an
interval and renders the result. This means no JIT code and no manual refresh:
Point it at any API endpoint (like system metrics, a widget data route, or a
custom one) for a self-updating readout.
Pipelines
Thepipeline widget chains reactive stages (fetch → transform → filter →
count / extract), so you can compose a small data flow declaratively (fetch JSON, pull a
field, filter rows, show a count) and have it refresh as a unit.
Offline cache
Tier 2 widgets fetch through, an in-memory HTTP cache with per-endpoint TTL. When the network is unavailable, widgets fall back to the last cached response. so a weather or stock card still shows its last known value offline instead of erroring.Persistent widget state
Tier 3 widgets read/write through, which wraps the/api/store/{key} endpoints with in-memory caching to avoid redundant network
calls on rebuilds. This is the client half of persistent widgets.
Render telemetry & self-correction
The shell tracks A2UI render failures so they’re observable in production, not just in debug logs. Two sources feed it:- Component-level error handling (caught build errors)
- The layout validator rejecting malformed subtrees
/api/ui_telemetry and can be
fed back to the agent so it learns to avoid component shapes that don’t render. This creates a feedback
loop that improves generated UIs over time.