Collaborative Presence
Summary
Section titled “Summary”Use Loro’s EphemeralStore (from loro::awareness) to sync ephemeral per-peer state — selections, focus, cursor positions, and other presence indicators — across collaborators in real-time. Not persisted, not undo-tracked, auto-expires on timeout.
Builds on the Selection Trait RFC (Selection Trait) by backing Selectable/Focusable storage with EphemeralStore for collaborative scenarios. Single-user mode continues to work with plain ephemeral structs.
Key Ideas
Section titled “Key Ideas”- Loro EphemeralStore — timestamp-based LWW key-value store, designed for exactly this (cursors, selections, presence). Supports granular sync (only changed keys), auto-expiry via timeout.
- Not persisted, not undo-tracked — ephemeral by design. Entries expire after inactivity timeout.
- Per-peer state — each collaborator has their own selection/focus. Remote selections rendered as visual indicators (colored outlines, name labels).
- Sync via
encode/apply— binary payloads, fits existing sync protocol.
Status
Section titled “Status”Stub RFC — design to be fleshed out after the Selection Trait RFC (Selection Trait) is implemented.
Dependencies
Section titled “Dependencies”- the Selection Trait RFC (Selection Trait) — defines the
Selectable/Focusabletraits that this RFC backs with EphemeralStore