docs/plans/2026-04-09-slate-v2-operation-history-collaboration-integrity-completion-plan.md
Close the operation-history-collaboration integrity lane in
master-roadmap.md
and turn the corresponding open bucket in
release-file-review-ledger.md
from partial to closed-by-proof.
For this lane, "100% completion" means:
slate-yjs ownThe current repo already has strong ingredients:
writeHistory(...), and selection restorationslate-yjs, not a local
packageSo this lane is not open because there is no operation or history model.
It is open because the current proof and docs still stop short of one clean statement:
slate-v2 proves the operation/history substrate that collaboration
layers depend onslate-v2 does not ship its own Yjs adapter or cursor stackRight now that story is still split across:
history/collab row in
true-slate-rc-proof-ledger.mdslate-yjs but does
not clearly mark the boundary between local proof and external adapter workDo not try to close this lane by adding a local Yjs package or a new
multiplayer demo inside slate-v2.
Do not treat collaboration integrity as “ship more collaborative UI”.
Close the lane on the current contract:
slate owns operation meaning and integrityslate-history owns commit-based batch capture and undo/redo correctnessThat matches the current repo reality:
slate-v2 ships slate, slate-history, slate-dom, slate-react,
slate-browser, and slate-hyperscriptslate-yjsset_selection inversionwithNewBatch(...), withoutMerging(...), and writeHistory(...)
on the real write boundaryhistory/collab owner rowThis lane is done when all of the following are true:
operations-contract.ts and history-contract.ts are treated as direct
supporting proof, not unrelated partial rowsslate-v2 proves
the substrate while external slate-yjs owns CRDT/provider integrationbroad API / public surface reconciliation laneFiles:
/Users/zbeyens/git/slate-v2/packages/slate-history/test/integrity-contract.ts (new)Work:
slate operations with current
slate-history batch behaviorReason:
Files:
/Users/zbeyens/git/slate-v2/packages/slate-history/test/integrity-contract.ts (new)Work:
Required test scenarios:
set_selection operations carry properties and newProperties, and
history batches preserve the resulting selection boundariesinsert_fragment remains a valid batch/history record even though
Operation.inverse(...) throws for raw op inversiononChange() can interferewriteHistory(...) remains the real stack-write override pointFiles:
Work:
slate-v2 proves the local operation/history substrateslate-yjs owns CRDT/provider/cursor integrationRequired doc outcome:
Files:
Work:
Primary proof surfaces:
/Users/zbeyens/git/slate-v2/packages/slate-history/test/integrity-contract.tsRequired verification before declaring the lane closed:
yarn exec mocha --require ./config/babel/register.cjs ./packages/slate-history/test/integrity-contract.tsyarn exec mocha --require ./config/babel/register.cjs ./packages/slate/test/operations-contract.ts ./packages/slate-history/test/history-contract.tsyarn test:customyarn lint:typescript/Users/zbeyens/git/slate-v2/packages/slate-history/test/integrity-contract.ts
now owns the lane directlyyarn exec mocha --require ./config/babel/register.cjs ./packages/slate-history/test/integrity-contract.tsyarn exec mocha --require ./config/babel/register.cjs ./packages/slate/test/operations-contract.ts ./packages/slate-history/test/history-contract.tsyarn test:customyarn lint:typescript