Skip to content

RTC: Add session activity notifications#75790

Closed
shekharnwagh wants to merge 7 commits intoWordPress:fix/sync-stale-crdt-doc-on-savefrom
Automattic:add/session-activity-notifications
Closed

RTC: Add session activity notifications#75790
shekharnwagh wants to merge 7 commits intoWordPress:fix/sync-stale-crdt-doc-on-savefrom
Automattic:add/session-activity-notifications

Conversation

@shekharnwagh
Copy link
Copy Markdown
Contributor

@shekharnwagh shekharnwagh commented Feb 20, 2026

What?

Closes #75323

Depends on #75975

Adds snackbar notifications for real-time collaboration session activity: when a collaborator joins, leaves, or saves the post.

Why?

Collaborator avatars in the top bar show who's present, but they're easy to miss. There's no active notification when someone joins, leaves, or saves — you'd only notice by watching the avatars constantly.

How?

  • Adds a useCollaboratorNotifications hook that compares the current and previous collaborator lists to detect joins, leaves, and remote saves.
  • Broadcasts save events to other collaborators via a new lastSaveEvent field on the awareness state.
  • Detects leaves using the isConnected property transition rather than list removal, so the notification fires when the avatar greys out (not after the 5s cleanup delay).
  • Skips notifications during initial load to avoid spurious toasts for users already present.
  • Notification types can be toggled via the editor.collaborationNotifications WordPress filter.

Testing Instructions

  1. Go to Settings > Writing > Enable real-time collaboration.
  2. Open a post for editing in two different browser tabs (or two different browsers for different users).
  3. Verify a "X has joined the post" snackbar appears in the first tab when the second tab opens the post.
  4. Close the second tab. After ~30 seconds, verify a "X has left the post" snackbar appears in the first tab.
  5. With both tabs open, save the post from the second tab. Verify a "Draft saved by X" snackbar appears in the first tab.
  6. Publish the post from the second tab. Verify a "Post updated by X" snackbar appears in the first tab.
  7. Verify no notification appears for your own saves.
  8. Verify no duplicate notifications appear on page load for users already present.

Testing Instructions for Keyboard

No new interactive UI elements are added. Snackbar notifications are announced to screen readers automatically via the existing notice system.

Screenshots or screencast

Screenshot 2026-02-24 at 7 11 17 PM
Notification when a collaborator has left

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration [Package] Core data /packages/core-data [Package] Editor /packages/editor [Type] Feature New feature to highlight in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RTC: [Interface] Notifications for session activity

5 participants