Y.UndoManager history example

Is there an example of a similar network panel in GitHub - automerge/trellis: Trello clone / sample app for Automerge persistence library for yjs? I found an example for prose, but it relies on snapshots. I would like to have something like gitlab diffs. Those. I would like to see the differences with the last or selected snapshot for each stack-item.

How to achieve this behaviour? How to decode stackItem or delta/etc in human readable format?

Something like:
Bob - ${stackItem.meta.msg}. Replace ${stackItem[?]} on position ${stackItem[?]}:

print(diff(doc, stackItem[?]));

Perhaps some hints where this is in the existing codebase? As I understand it, this has already been implemented when highlighting names in prosemirror. But it’s still difficult for me to separate the prosemirror from the decoder.

There is a Y.logUpdate(Uint8Array) that might be helpful. It is marked as experimental. I haven’t done anything similar to what you’re describing though.

Also similar: https://text-crdt-compare.surge.sh/