fix(core): avoid torn Yjs plugin state during fork merge - #3136
nperez0111 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesForked document plugin state
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ForkYDocExtension
participant ExtensionManager
participant EditorState
participant UndoManager
ForkYDocExtension->>UndoManager: Save original undo and redo stacks
ForkYDocExtension->>ExtensionManager: replaceExtension with resetPluginStateFor
ExtensionManager->>EditorState: Reconfigure plugins with selected state reset
ForkYDocExtension->>ExtensionManager: replaceExtension during merge with resetPluginStateFor
ExtensionManager->>EditorState: Reconfigure plugins with selected state reset
ForkYDocExtension->>UndoManager: Restore saved undo and redo stacks
Merge Risk: ⚪ Minimal · up to The fork and merge changes are mergeable after normal checks; the saved undo and redo history remains available when the old manager is destroyed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change improves collaboration-state consistency without an established new security exposure. Failure recovery and concurrent-edit behavior remain insufficiently verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the cursor’s place, Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
|
Summary
Fixes #3135. This closes the cursor crash left after #2952.
nodeSizeexception without this change.Verification
vp run testinpackages/core: 792 passed, 9 skippedvp run lintinpackages/core: cleanOut of scope
Undoing an accepted merge is a separate existing behavior:
Y.applyUpdateuses the editor as the update origin, which the Yjs undo manager does not track. This PR leaves that origin unchanged.Summary by CodeRabbit