Yjs/Prosemirror-versions demo appears to garbage collect deletions on refresh

Hello!

I’ve been playing around with the y-prosemirror editor integration and attempting to implement a version history. Despite disabling garbage collection on my frontend and server, it appears that garbage collection still happens at some point after refreshing the page and fetching the ydoc, making deletions inaccessible (which greatly decreases the value of any document history)

The y-prosemirror demo itself also appears to garbage collect deletions as going to the site and viewing previous version only shows additions, and never deletions. To reproduce and see what I am talking about:

  1. Make an addition to the text at the demo site
  2. Take a snapshot
  3. delete a portion of the text
  4. take another snapshot

If you view the snapshots you made without refreshing, you’ll see the deletions. Then, if you refresh, only the additions remain accessible in the snapshot history.

Has anyone encountered this? Is anyone able to actually successfully disable garbage collection so that a snapshot history contains all deletions at all times?

I will continue to research this topic and post what I learn here in case I am able to solve the issue, but any assistance would be greatly appreciated :slight_smile:

I will add that my server is based on the y-websocket demo server but with my own custom MongoDB persistence layer. The rest of the logic, however remains the same