githubnext/chopinPublic

Let's compose rich plans together

Undo and redo each person's own document edits

The document editor suppressed Lexical's history in favour of a Yjs undo
manager that was never created, so Cmd/Ctrl+Z did nothing. Register a
Yjs UndoManager per binding that tracks only this client's edits, leaves
peers' and the Planner's alone, skips edits made in reaction to remote
changes, keeps blocks that hold other people's text, and refuses steps
that would insert, remove or restore a protected projection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
C5MAMaggie Appleton and Claude Opus 5.5 authored
8a5e025Patch
Parent838a26c
4 files changed+641-2
StackedSplit
e2e/undo.e2e.ts+139 −0
packages/editor/src/collaboration.tsx+8 −2
packages/editor/src/history.test.ts+340 −0
packages/editor/src/history.ts+154 −0