News for hackers. Stuff that matters.
Re:How to build undo/redo in a multiplayer environment by Li... by Xeoncross on Thursday June 09, 2022 @11:55AM (#31682793)
For deleted items, could you not store a memo of the object in addition to the user-local changes they did?

So if you undo a change to an object that was delete by a different user, you can restore that object first to the last known state, then apply the undo?

I'm not sure this makes sense for other cases besides object deletion.

Re:How to build undo/redo in a multiplayer environment by Li... by guillaumesalles on Thursday June 09, 2022 @12:07PM (#31682958)
Yes that's good way to implement it!

But I'm still not sure this is the default behavior that we want, even it's only for deletion. I think it's more of a UX problem than an engineering problem as explained here: https://news.ycombinator.com/item?id=31682073

To take another example, for rich text editing, I don't think undoing a formatting operation on text that has been deleted at the same time should reinsert the text.