-
Notifications
You must be signed in to change notification settings - Fork 19
Implement Real-Time Presence Indicators in Collaborative Writing Sessions #37
Copy link
Copy link
Open
Labels
assignedThis issue has been taken and is currently being worked onThis issue has been taken and is currently being worked onfeatureNew functionality or modules being added to the projectNew functionality or modules being added to the projectfrontendIssues related to UI, CSS, React, or browser-side logic.Issues related to UI, CSS, React, or browser-side logic.level2Intermediate tasks (building components, responsive design)Intermediate tasks (building components, responsive design)
Metadata
Metadata
Assignees
Labels
assignedThis issue has been taken and is currently being worked onThis issue has been taken and is currently being worked onfeatureNew functionality or modules being added to the projectNew functionality or modules being added to the projectfrontendIssues related to UI, CSS, React, or browser-side logic.Issues related to UI, CSS, React, or browser-side logic.level2Intermediate tasks (building components, responsive design)Intermediate tasks (building components, responsive design)
Writers collaborating on a draft currently have no visibility into who is actively viewing or editing the document. This reduces collaboration awareness and can lead to simultaneous edits without context.
Current Behavior
Users can collaborate on drafts
No indication of active participants
No live cursor or presence awareness
Users cannot distinguish whether a draft is actively being edited
Expected Behavior
Users should see:
Active user avatars
Live join/leave status
Cursor presence indicators
Current editing activity status
Proposed Solution
Use Socket.IO presence channels:
Events:
user:joined
user:left
cursor:moved
user:typing
UI additions:
👤 Sarah editing...
👤 John viewing
👤 Emma typing...
Optional enhancements:
Different cursor colors per user
Active collaborator count
Idle detection
"Last active" timestamps
Technical Considerations
Backend:
Track active rooms using Redis
Manage connection cleanup
Handle stale socket sessions
Frontend:
Presence provider/context
Cursor synchronization
Optimistic updates
Acceptance Criteria
✅ Users appear/disappear in real time
✅ Presence updates without refresh
✅ Cursor indicators remain synchronized
✅ Stale users removed after disconnect
✅ No duplicate presence entries