Closed
Description
Description
TL;DR: When two people edit an issue/PR description simultaneously, the last one to save "wins".
This scenario is not uncommon:
- User files a bug report.
- Developer sees the report, and wants to edit it to clarify some wording or clean up some markdown.
- User sees a typo, and edits the report.
- Developer knows the system, so is faster, and saves their edits first.
- User saves their typo fix
- Now all the edits done by the developer are reverted by the edit from the user.
This problem is quite serious, because:
- There is nothing at all that warns about overwriting someone else's changes.
- There are no historical comments "user X changed the description".
- There is no way to see the history of description changes.
So not only is there data loss, it remains undetected until someone revisits the page and actually notices their work is gone.
A possible first step could be to use an etag to detect simultaneous edits. Then at least a user can be warned that they'll overwrite someone else's changes.
It would be better to have some way to merge those changes, but that's a whole different issue to solve. I think the most important is to prevent these losses; how to solve such collisions gracefully can be dealt with later.
Gitea Version
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Self-built from Git.
Database
PostgreSQL