Components
← All components

Presence

stimeo--presence

A who's-here roster over Action Cable — with zero server-side state.

  • Core

The stimeo--presence controller binds a "who is viewing this page" roster to an Action Cable channel while the server keeps NO presence state: each client broadcasts an appear beacon ({ id, name }) on a heartbeat interval, every client expires peers it hasn't heard from within timeout ms, and leaving is announced best-effort on disconnect and on pagehide (tab close / hard navigation) ({ id, leaving: true }) — a lost notice is caught by the expiry. Newcomers converge in one round trip because clients that hear an unknown peer re-announce themselves (throttled). Your own beacons are ignored via the id value. Rendering is optional and declarative: the count target with its data-zero/-one/-other templates, and the list + template pair (one clone per peer, the name filled into the data-presence-name slot). The data-present and data-present-count hooks plus the join/leave/change events serve custom UIs. The server side is the same thin rebroadcast channel as typing-indicator (this catalog's PresenceChannel is the spec sample plus a fixed-room allowlist for the public deploy). Ships in the opt-in stimeo-ui/cable subpath; the core stays zero-dependency.

running

Open this page in a second tab: the other guest appears in the roster within a heartbeat (your own entry is not listed — own beacons are ignored). Close that tab or navigate it away to see the leave notice remove it; if the best-effort notice is lost, the timeout expiry catches it.

You appear to others as Guest 5657.