Closed NovemLinguae closed 7 months ago
Happened again to me just now. Here's an example.
And here's an interesting edge case. A decline after an accept. Which declines the redirect.
This is a duplicate of #116
With the latest AfC drive I've seen three editors edit conflict to review a draft and the script overwrite each in turn.
What I would suggest is to check for new edits being made to the page every 5 or 10 seconds. If new changes are detected, show a notice saying "This draft has been recently edited N times by USERNAME. Reload to see the latest changes". Ideally, any half-written comment in the text box should be preserved across the reload.
The API call to do this is very cheap since we just have to fetch the metadata of newer revisions – not the content, and this will be empty most of the time.
Checking for conflict only when the user is actually accepting/declining wastes their time as they need not have done that if someone had already done so in the interim. This also handles the case of commenting conflicts.
I had this happen today. It is possible to overwrite somebody else's AFC decline, if they finalize their decline while you're writing yours.
Possible solution: When the reviewer presses the decline button, have AFCH check the page history, and if there have been any edits within the last 10 minutes, give the reviewer a warning when submitting.
Possible solution # 2: When AFCH loads, save the current time. When the reviewer presses the decline button, have AFCH check the page history, and if there have been any edits since the saved time, notify the submitter of an edit conflict.
edit: Looks like it can happen with comments, too. And with one person accepting, one person commenting. So any combination of types is probably possible.
https://en.wikipedia.org/w/index.php?title=Draft:Jointed_Boiler_Locomotive&type=revision&diff=1009914671&oldid=1009913368&diffmode=source