Commit b0c8421
authored
Replace OT cursor tracking with Automerge cursors in presence (#129)
* test: cover OT cursor tracking race cases before refactor
Adds usePresence.test.ts with five regression tests covering PR #94
(cursor tracking across concurrent local edits) and PR #110 (end-of-line
cross-line flash guard). Tests are written at the decoration-position
level so they survive the Automerge cursor refactor tracked in #113.
* refactor(presence): replace OT offset tracking with Automerge cursors (#113)
Remote cursor/selection travel as Automerge cursor strings anchored to
['text'] and resolve on the receiver against its local doc. Deletes the
OT machinery (transformOffset, peerStateRef, anticipatingEditRef,
same-line guard) and the onDidChangeContent OT effect; modelVersion
stays as a re-render trigger.
`move: 'before'` for selection end is a no-op in automerge 2.2.9 — using
default 'after' everywhere; deviation recorded in the plan.
* test(presence): lock in sender-side cursor ordering
* test: pin automerge cursor semantics as probe fixture1 parent a217956 commit b0c8421
6 files changed
Lines changed: 1352 additions & 221 deletions
File tree
- claude-notes/plans
- hub-client/src
- hooks
- services
Lines changed: 491 additions & 0 deletions
Large diffs are not rendered by default.
0 commit comments