Problem
The Hocuspocus database extension overwrites Document.content from Yjs state on every debounced sync (server/src/lib/dbPersistence.ts:65-68), while REST PUT /document/:id writes content directly (document.controller.ts:231-234) — the client autosave path uses it. Last-writer-wins silently discards edits.
Related: #35 (dead autosave hook).
Fix
Pick one source of truth: either derive content from Yjs exclusively (drop REST content writes) or make REST authoritative and stop syncing content from Yjs.
Problem
The Hocuspocus database extension overwrites
Document.contentfrom Yjs state on every debounced sync (server/src/lib/dbPersistence.ts:65-68), while RESTPUT /document/:idwritescontentdirectly (document.controller.ts:231-234) — the client autosave path uses it. Last-writer-wins silently discards edits.Related: #35 (dead autosave hook).
Fix
Pick one source of truth: either derive
contentfrom Yjs exclusively (drop REST content writes) or make REST authoritative and stop syncing content from Yjs.