Real-Time Collaboration: Update sync provider event name and modal handling#74904
Merged
ingeniumed merged 2 commits intoWordPress:wpvip/rtc-pluginfrom Jan 29, 2026
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
c026df2 to
86cafc6
Compare
0d0ed65 to
d03eee6
Compare
Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events.
Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
d03eee6 to
0589761
Compare
ingeniumed
approved these changes
Jan 29, 2026
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Jan 29, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
that referenced
this pull request
Jan 31, 2026
…modal handling (#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
that referenced
this pull request
Jan 31, 2026
…modal handling (#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Jan 31, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
that referenced
this pull request
Feb 3, 2026
…modal handling (#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 4, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 4, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 5, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 5, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 6, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
shekharnwagh
added a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 6, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
that referenced
this pull request
Feb 9, 2026
…modal handling (#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 14, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 16, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
pushed a commit
to Automattic/gutenberg
that referenced
this pull request
Feb 16, 2026
…ndling (WordPress#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object.
chriszarate
added a commit
that referenced
this pull request
Feb 17, 2026
* Real-time collaboration: Add sync connection error handling (#74075) * Add sync connection error handling Creates a provider-agnostic system for sync providers to report connection errors and display appropriate UI to users. * Consolidate sync connection state into core-data Removes the separate syncConnectionStore and moves connection state management into core-data. Sync providers now receive an onStateChange callback to report connection status for both entities and collections. * Remove sync package dependency from editor Moves sync error message handling from @wordpress/sync into editor utils. * Use event emitter pattern for provider status events Replace callback injection with event listener pattern for reporting provider connection status. Providers now expose an on() method that allows attaching listeners after creation, rather than receiving callbacks as constructor parameters. * Document sync provider connection state types Adds JSDoc to OnStateChangeCallback, ProviderCreatorOptions, SyncConnectionError, SyncConnectionState, and SyncConnectionStatus. * Real-time collaboration: Add provider 'connecting' status (#74826) * Real-time collaboration: Update sync provider event name and modal handling (#74904) * Rename sync provider status event to prevent conflicts Renamed the event from 'status' to 'sync-connection-status' to make it unique and avoid conflicts. This ensures sync-specific connection state events are distinct from generic provider status events. * Show sync disconnection modal for all disconnect states Previously, the modal only appeared when connectionState.error existed. This meant users might be disconnected without seeing any indication if the disconnection didn't include a specific error object. * Real-time collaboration: Add connection status events to HTTP polling provider Adds event emitter to HTTP polling provider to report connection state changes. When the provider connects or disconnects, it emits sync-connection-status events that update core-data and trigger the disconnection modal for users. * Real-time collaboration: Improve sync connection modal with debounce Debounces initial modal display by 5s to prevent flicker during page load. Updates selector to return all connection statuses and makes onStatusChange callback mandatory for consistent error handling * Fix the handler issue in manager * Import BlockCanvasConver from private API * Restore return annotation * Fix useSelect comparison warning * Simplify implementation to onStatusChange * Remove getSyncErrorMessages export * Fix type * Fix serialize performance issue * Fix resolver test --------- Co-authored-by: Alec Geatches <alec.geatches@automattic.com> Co-authored-by: ingeniumed <ingeniumed@users.noreply.github.com> Co-authored-by: chriszarate <chris.zarate@automattic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Improves sync connection state handling added in #74075 by fixing event name conflicts and ensuring the disconnection modal displays in all disconnect scenarios.
Why?
Two issues were discovered when integrating with the WebSocket provider - Automattic/real-time-collaboration#145:
Event name conflicts: The WebSocket provider has a built-in
'status'event that conflicts with our sync connection status event. These default WebSocket events don't include custom fields like'error', causing issues when our customSyncConnectionStateevents overlap with them.Hidden disconnections: The sync connection modal only appeared when
connectionState.errorexisted. This meant users could be disconnected without seeing any indication if the disconnection didn't include a specific error object, leading to confusion about why editing was disabled.How?
'status'to'sync-connection-status'to avoid conflicts with WebSocket provider eventsstatus !== 'disconnected'instead of checking for error presence