Skip to content

✨ feat(collaboration): add editor collaboration contract#178

Open
Innei wants to merge 2 commits into
masterfrom
codex/feat-editor-collaboration
Open

✨ feat(collaboration): add editor collaboration contract#178
Innei wants to merge 2 commits into
masterfrom
codex/feat-editor-collaboration

Conversation

@Innei

@Innei Innei commented Jun 22, 2026

Copy link
Copy Markdown
Member

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

🔀 Description of Change

This PR adds the editor-level collaboration contract for Lexical/Yjs based collaboration.

  • Adds the collaboration prop integration to Editor with a stable EditorCollaborationConfig type.
  • Adds ReactCollaborationPlugin, Y.Doc binding helpers, user awareness initialization, cursor container ownership, bootstrap/hydrate behavior, and stale cursor sync recovery.
  • Exports collaboration types from both package root and @lobehub/editor/react for business integration.
  • Adds a behavior test for synchronizing Lexical updates through a shared Y.Doc.
  • Adds a standalone Hono + Vite React business demo that covers workspace page rooms, first-open bootstrap, snapshot hydrate, re-enter, reconnect, read-only observer, complex nodes, and room reset.

📝 Additional Information

Validation performed:

  • pnpm type-check
  • pnpm exec vitest run --silent='passed-only' src/plugins/collaboration/__tests__/utils.test.ts
  • pnpm build
  • cd examples/collaboration-business-demo && pnpm type-check
  • cd examples/collaboration-business-demo && pnpm build

No related issue was found for the collaboration API work.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @Innei, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobe-editor Ready Ready Preview, Comment Jun 23, 2026 2:55pm

Request Review

@github-actions

Copy link
Copy Markdown

👍 @Innei


Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@pkg-pr-new

pkg-pr-new Bot commented Jun 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@lobehub/editor@178

commit: 248ac2b

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant