qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Multiple pending suggested edits can collide

Open cellio opened this issue 3 years ago • 4 comments

See the history here: https://meta.codidact.com/posts/282542/history

Edits 3 and 4 came in as suggested edits a few minutes apart. I approved the first one, and when I went to review the second one I saw that it was going to overwrite the change from the first edit. I saved a copy of the text that was about to be deleted, approved the edit (the collision wasn't the editor's fault), and then made edit 5 to fix it.

A few days ago I saw a case of two suggested edits doing the right thing, but they were both from the same person (the user suggested an edit and then wanted to add to it).

We should not allow multiple suggested edits to collide. One way to do that would be to not allow a suggested edit while another is pending; that can be annoying but it's safe. If we can do something more sophisticated in the case where edits are additive (like they were here, that'd be nice. We will never be able to auto-handle all conflicts, though, any more than git can keep you from having to deal with a conflict sometimes. So if we allow more than one pending suggested edit, we'll need to figure out how we handle the messy case (and draw attention to the problem for the edit reviewer).

cellio avatar Jul 04 '21 22:07 cellio

Allowing multiple suggested edits, even if they can be automatically be applied one after another without conflicts is problematic because it gives the impression that the second editor saw and agreed to the changes of the first editor while infact the editor didn't know if them. It's better to use the safe method here, maybe with the possibility for the system to notify an editor who wanted to suggest an edit while another edit was still pending of when this other edit is approved or rejected.

Trilarion avatar Jan 11 '22 21:01 Trilarion

I've seen enough git messes to be concerned about managing multiple suggested edits, yeah. I don't know what the right answer is, but we probably shouldn't allow an edit suggestion while one is pending. A user who can review suggested edits already sees a prompt to do that if there's one pending; the problem here is for users who can't review edits and thus don't know there's one pending.

cellio avatar Jan 11 '22 21:01 cellio

As a side note. The frequency with which these editing collisions occur depends on the time until suggested edits are reviewed. It might be good to keep them short. My experience of the last two months was that some suggested edits can take up to weeks to be reviewed. Maybe the number of suggested edits waiting for longer than say three days should be a number to monitor and should raise an alarm if too large.

Trilarion avatar Jan 11 '22 21:01 Trilarion

Yeah, pending edit suggestions aren't very visible, which is why https://github.com/codidact/qpixel/issues/452 is prioritized in the new roadmap. If we make it easier for people to notice them then they'll get handled more quickly. Adding some sort of "stuff's been waiting too long" alert sounds like a good idea too.

cellio avatar Jan 11 '22 21:01 cellio