Linora

0203. Presence interest management: per-recipient frames, viewport filtering, follow, idle suppression

Status: Accepted (2026-11-28). Wave 3, R1. Refines the presence rules of 0007 and the presence fan-out of 0201. Contract: follow in shared/src/presence.ts, PRESENCE_VIEW_MARGIN, MAX_VISIBLE_CURSORS, VIEWPORT_RELAY_MS in shared/src/limits.ts (PROTOCOL_VERSION 3).

Context

The 100k run (WP-H, 2026-11-27) found presence fan-out to be 85-90% of the frames the server writes, at about 7 us per frame (half of it kernel time):

Decision

The owner still merges presence per room tick. The gateway builds one frame per recipient (presence.ts buildFrame, called from Gateway.onPresenceRoom).

Alternatives

Consequences