oficina / docs Public

Docs: every edit made while a resync is pending is kept

Local ProseMirror changes made while the document has diverged from the
server are kept as transactions as well as Yjs updates, and replayed
onto the rebuilt document (collab-style rebase) when they can't
integrate as they are; carried edits keep their undo grouping, an undo
while diverged leaves the change out and a redo restores it, and carry
is linear. Known limit: an undo/redo that re-inserts text from a
replayed change is still lost (follow-up). Reviewed by Claude Fable 5.1 (#90).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from feat/replay-while-diverged into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 25cd32a2188e30c9cb12b1f754c52ec1e89d9f74 parent ce485a5
11 files changed, +987 −108
  • AGENTS.md +45 −15
  • fixtures/carry.mjs +215 −49
  • fixtures/carry.test.mjs +314 −1
  • fixtures/editor-entry.js +59 −13
  • fixtures/engines/diverged.mjs +214 −0
  • internal/docs/carry_browser_test.go +48 −0
  • internal/docs/diverged_engines_browser_test.go +50 −0
  • internal/docs/fonts_engines_browser_test.go +6 −1
  • internal/docs/resync_browser_test.go +22 −15
  • internal/docs/static/editor.284edd3ba52d6852.js +14 −0
  • internal/docs/static/editor.7ff107f6ce88eea0.js +0 −14

CI passed — run details

landed from feat/replay-while-diverged

AGENTS.md

Loading diff…

fixtures/carry.mjs

Loading diff…

fixtures/carry.test.mjs

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/engines/diverged.mjs

Loading diff…

internal/docs/carry_browser_test.go

Loading diff…

internal/docs/diverged_engines_browser_test.go

Loading diff…

internal/docs/fonts_engines_browser_test.go

Loading diff…

internal/docs/resync_browser_test.go

Loading diff…

internal/docs/static/editor.284edd3ba52d6852.js

Loading diff…

internal/docs/static/editor.7ff107f6ce88eea0.js

Loading diff…