Expand description
Multi-surface synchronized edit sessions: broadcast, handoff, and replay.
One resource can be open in MANY surfaces at once. The SurfaceHub owns
the single CANONICAL value for every resource and is the one coordination
point: a committed edit on any surface is applied to the canonical store and
then BROADCAST – as a Scene plus a Scene diff – to every surface/pane
viewing that resource, including the surface that issued the edit. This
avoids trying to make N independent transports share events; the hub is the
shared state.
Edits flow through the universal default lens: an Intent is proposed and
committed through edit:default, yielding the universal {op: set-value, value: <proposed>} operation, which is applied to the canonical store and
recorded in an append-only EditRow ledger carrying the issuing
operator and logical tick. Two surfaces editing the same resource therefore
apply in submit order (last write wins), and the ledger is replayable:
replay re-applies it to a seed state and reproduces the same canonical
state, proving the edit log is auditable.
Handoff (SurfaceHub::handoff) opens an already-held resource on a second
surface so subsequent edits broadcast to both.
Structs§
- Broadcast
- One re-rendered Scene pushed to a surface/pane after a canonical edit.
- EditRow
- One append-only ledger row: a committed edit, attributed and replayable.
- Surface
Hub - The canonical multi-surface coordination point.
Functions§
- replay
- Re-apply a ledger to a seed canonical state, yielding the final state.