docs/plans/2026-05-29-slate-yjs-follow-up-risk-fixes.md
status: complete owner_skill: .agents/skills/task/SKILL.md source_repo: /Users/felixfeng/Desktop/repos/slate-v2 completion: .tmp/019e71a2-c1fd-7bf3-83ff-732f806062ee/completion-check.md changeset_required: yes browser_proof_required: yes
Close the follow-up risks found after the first @slate/yjs package pass:
restore the full demo command matrix, make remaining replace_fragment risk
explicit and narrower, isolate split undo stack access behind one adapter,
restore the intended runtime peer floor, and remove the site's package-local Yjs
path alias.
../slate-v2/packages/slate-yjs../slate-v2/site/examples/ts/yjs-collaboration.tsx../slate-v2/playwright/integration/examples/yjs-collaboration.test.ts../slate-v2/packages/slate-react/package.json../slate-v2/packages/slate-dom/package.json../slate-v2/site/tsconfig.jsonreplace_fragment identity riskreplace_fragment has a single-text identity-preserving path, then a scoped
delete/reinsert fallback for all broader cases.undoManager.undoStack and redoStack directly
inside the controller.slate-react peers slate-dom at >=0.124.1; the intended floor is
>=0.124.2.site/tsconfig.json maps yjs to
../packages/slate-yjs/node_modules/yjs, which depends on local install
layout and can select a different Yjs copy than root tools./Users/felixfeng/Desktop/repos/slate-v2: bun install --lockfile-only/Users/felixfeng/Desktop/repos/slate-v2: package-local stale Yjs 13.6.31
removed after confirming root Yjs is 13.6.30/Users/felixfeng/Desktop/repos/slate-v2:
bun test ./packages/slate-yjs/test -> 102 pass/Users/felixfeng/Desktop/repos/slate-v2:
bun --filter @slate/yjs typecheck/Users/felixfeng/Desktop/repos/slate-v2:
bun --filter @slate/yjs build/Users/felixfeng/Desktop/repos/slate-v2:
bun --filter slate-react test:vitest -- test/surface-contract.test.tsx
-> 28 pass/Users/felixfeng/Desktop/repos/slate-v2:
bun --filter slate-react typecheck/Users/felixfeng/Desktop/repos/slate-v2:
bun --filter slate-dom typecheck/Users/felixfeng/Desktop/repos/slate-v2: bun typecheck:site/Users/felixfeng/Desktop/repos/slate-v2: bun lint:fix/Users/felixfeng/Desktop/repos/slate-v2:
curl -I --max-time 5 http://localhost:3100/examples/yjs-collaboration
-> 200/Users/felixfeng/Desktop/repos/slate-v2:
PLAYWRIGHT_BASE_URL=http://localhost:3100 PLAYWRIGHT_RETRIES=0 PLAYWRIGHT_WORKERS=1 bun test:integration-local --project=chromium --grep "yjs collaboration example"
-> 30 pass/Users/felixfeng/Desktop/repos/slate-v2:
screenshot proof at .tmp/yjs-proof/full-control-matrix.png/Users/felixfeng/Desktop/repos/slate-v2: bun check/Users/felixfeng/Desktop/repos/plate-copy:
docs/solutions/developer-experience/2026-05-29-slate-yjs-package-local-yjs-aliases-hide-duplicate-installs.md