Skip to content

fix(super-editor): prefer collaboration bootstrap over local file init#2539

Closed
harbournick wants to merge 1 commit intomainfrom
nick/fix-collab-init
Closed

fix(super-editor): prefer collaboration bootstrap over local file init#2539
harbournick wants to merge 1 commit intomainfrom
nick/fix-collab-init

Conversation

@harbournick
Copy link
Collaborator

No description provided.

@harbournick harbournick self-assigned this Mar 24, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5a2c38915

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Collaboration startup must own room classification before we initialize
// from a local file source. Otherwise the editor can render local content
// while the shared room remains blank until a later async seed.
if (props.options.ydoc && props.options.collaborationProvider) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard collaboration-first init for providers without events

Switching initializeData to prefer the collaboration path means sessions that pass both fileSource and collaboration options now always execute waitForSync, which unconditionally uses provider.on/off. Because CollaborationProvider allows those methods to be absent, an unsynced provider shim (or partial adapter) will now throw or hang before editor creation, and the local file never loads; this is a regression from the previous ordering where file-backed startup bypassed sync waiting. Please gate on the event API (or reuse the existing provider-sync helper) so this path cannot deadlock/crash.

Useful? React with 👍 / 👎.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant