Open the same draft in two browser tabs.
In Tab A, change the title from Launch notes to What’s new in v2. Save. 200 OK.
In Tab B, change only the description. Save. Another 200 OK.
Refresh. The new description is there, but the title is back to Launch notes. Tab B never touched the title. So why did it change?
The browser sent more than you edited
The form sends the whole draft on every save. Tab B still has the old title, so its request sends that title along with the new description. The API saves both.
The clue is in DevTools → Network: look at the second request’s payload, not just its status.
Make the second save fail on purpose
When both tabs load version 7, the API returns ETag: "7". Each tab sends If-Match: "7" on save: only apply this update if I’m still editing version 7.
PostgreSQL checks the version in the same statement that writes the change:
UPDATE drafts
SET title = $1,
description = $2,
version = version + 1
WHERE id = $3 AND version = $4
RETURNING version;
Tab A updates the draft to version 8. Tab B still sends version 7, so its update matches no rows. The API returns 412 Precondition Failed instead of overwriting the title.
Keep the edit the server rejected
Tab B should keep the unsaved description and let the user review the latest draft. Automatically resending the old form with the new version would just bring the bug back.
The test isn’t whether both saves succeed. It’s whether the new title stays saved and the unsaved description stays editable.