Showing who's editing where:
Features:
- Colored cursors per user
- User avatars in document
- "User is viewing" indicators
- Typing indicators
Implementation:
- WebSocket connection per user per document
- Broadcast cursor position on change
- Debounce updates (every -ms, not every keystroke)
Scaling: For documents with many editors, limit presence updates to viewport. Don't broadcast every cursor move to everyone.
Offline: Cache last known positions. Show stale indicator. Refresh on reconnect.
Leave detection: Heartbeat timeout. Remove cursor after seconds of inactivity.