Skip to content

Collaborative Presence

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.

  • 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.

Stub RFC — design to be fleshed out after the Selection Trait RFC (Selection Trait) is implemented.

  • the Selection Trait RFC (Selection Trait) — defines the Selectable/Focusable traits that this RFC backs with EphemeralStore