Skip to content

Conversation

@felixfeng33
Copy link
Collaborator

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

@codesandbox
Copy link

codesandbox bot commented Dec 13, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot
Copy link

changeset-bot bot commented Dec 13, 2025

🦋 Changeset detected

Latest commit: a17120e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@platejs/yjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
plate Ready Ready Preview, Comment Dec 13, 2025 0:20am

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Dec 13, 2025
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.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +300 to +304
customSharedType ?? (ydoc.get('content', Y.XmlText) as Y.XmlText);

// Only apply initial value if ydoc is empty (no content from server)
if (sharedRoot.length === 0 && value !== null) {
let initialNodes = value as Value;

Choose a reason for hiding this comment

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

P1 Badge Avoid seeding doc before initial sync completes

After racing the provider sync against a 5s timeout, this block always seeds the shared document whenever it is empty and value is not null, which includes the default undefined case. If a provider simply takes longer than 5s to deliver the server state, we will insert create.value() locally before the first sync and that default paragraph will then be merged with the late-arriving server content, reintroducing the phantom paragraph the previous implementation avoided by waiting for the first onSyncChange before applying any initial value.

Useful? React with 👍 / 👎.

@felixfeng33 felixfeng33 merged commit 7b1fb73 into main Dec 13, 2025
5 checks passed
@felixfeng33 felixfeng33 deleted the revert/yjs branch December 13, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants