Expand description
UI-6: live() — a component’s collection bound to Plexus streams:
{ rows, status }.
The snapshot method is called once (each data event’s row is its one
object-valued field — summary, ticket — and an event with none, a
page, carries no row; PERF-15: a rows { items } event is a page’s rows
at once, each item read as its own event would be); the changes stream (opened first, with its own
changes_params) is folded by the declaration’s on:
upsert:<field>inserts or replaces, bykey, the item atevent.<field>— only if it matches every key of the snapshot’s params that names a field of the item (parent,epic,status;summaryandlimitname none), so a filtered collection ignores what is not its own, and an item that stops matching is removed;remove:<field>removes the id, or each id of the list, atevent.<field>;laggedruns the snapshot again,resyncingmeanwhile.
status moves pending → live; resyncing on a lagged, or when the
socket drops until LiveCache::reconnected has asked again.
LiveCache shares one subscription between every reader asking the
same snapshot, params, changes and changes params, and keeps it
KEEP_MS past its last reader (LiveCache::sweep closes what has
waited longer).
STUDIO-16: a change is folded as it is heard, and published — the
collection’s value set, its readers drawn — once per animation frame
(Clock::frame): what a collection heard within a frame crosses as
one move, its deltas merged ([Sub::merged]). Any other move (an
answer, a status) publishes at once, the changes waiting carried in it.
Structs§
- Crossing
- FRAME-20: a move of a module’s collection as a subscriber that last saw
move
seenreceives it —seqthe move it now stands at. - Follow
- UI-10: a collection that follows its params; dropping it stops that and releases its reader.
- Live
- A collection as a component reads it.
- Live
Cache - Every
livesubscription of the page. - Live
Query - UI-10: a
liveas declared, before its params are known: the methods, the key, the folds, and how long its params must be quiet before it runs again. - Live
Spec - A
livedeclaration with its params evaluated: what a subscription is keyed by (snapshot, params, changes, changes params) and how it folds. - Manual
Clock - The tests’ clock: moves only when told, running each timer that comes due on the way, in order.
- Module
Live - FRAME-19: a module’s collection —
LiveCache::follow_heldover the spec’s params andwhen, which the module moves withModuleLive::update; the registry owns the timing (debounce_ms). - Module
Spec - FRAME-19: a module’s
livespec —LiveSpec::from_value’s keys, plus what rhx’slivehas:when(a boolean,truewhen left out;falseholds it — nothing asked) anddebounce_ms(how long its params must be quiet before it runs again).whenanddebounce_msare not part of what is shared: two modules asking the same spec, held or not, read one collection once both ask. - Reader
- One reader of a collection; dropping it releases the subscription
(kept
KEEP_MSmore).
Enums§
- Delta
- FRAME-20: what crosses to a module when its collection moves — the fold’s own result by key, not the collection.
- Fold
Rule - One
onrule. - Status
- Where a collection stands.
Constants§
- KEEP_MS
- How long a subscription outlives its last reader, in milliseconds.
Traits§
- Clock
- The clock the cache keeps time by, and its timers (UI-10: a
live’sdebounce_ms).
Functions§
- resolve
- A
livedeclaration’s params resolved against the props:{ "expr" }values evaluated (a prop by name, or a Rhai expression over the props).