Local undo action

I have actions available to the user that only modify some local application state, no document changes, but I would like these to be undoable via the same history plugin undo flow as normal edits since that is how they appear to the user.

My idea was to create a new Step thinking I could get the collab plugin to ignore them (ie no version increment or sendable steps, keeping them totally local) but it does not seem possible.

Do I need to find another way?

Indeed, all steps are picked up by the collab extension, and since the undo history only stores steps, this may be hard to work around.

What is it that you’re trying to achieve? If it’s local application state then why do you store that information in the ProseMirror document?

Per-user visualization settings, I’m not storing it in the document, I simply want to use a single undo flow.

A hacky idea: you could store an invisible Mark on the root node for each user I think ( although it won’t work with YJS unless you patch y-prosemirror ). Or you could create an external history that tracks both editor and visualisation change events, and passes the undo/redo command to the ProseMirror history if that’s on top.