Merging 2 docs with different histories (excluding Text/Array)

@erin Erin Masatsugu
Wed, 12 Nov 2025 16:05:00 +0000

~The merging won’t happen based on the timestamps in each doc?~ EDIT – Ah I see the timestamps are relative / only meaningful within a doc

The scenario I tried to illustrate above is where yjs docs are ephemeral + re-built periodically from a different serialization format in our DB. And I’m trying to figure out if we can ever merge client changes from the older doc with the server’s fresh doc.

What do you mean by diff and apply the differences? Is that different than what I had in the code snippet?