Workflow drafts: a conflict overwrites the other tab, and save failures are dropped #1944
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#1944
Reference in new issue
Block a user
putDraftfailures are retried after 500 ms even on a 409, writing this tab's text over another tab's edit and clearing the "changed elsewhere" message.dropDraftignores the write result, and an in-flight write returns false with no error, so publish and restore can leave a stale draft with no message.Done when: a conflict is shown and never retried over; every failed draft write is reported where it happened.
Fixed in
f4b7652a. The editor remembers the stored draft it last saw for the open workflow; a write that finds anything else stored stops and shows 'This draft changed in another tab or by Archie' with Load latest and Replace with mine. A server 409 is never retried over; retries happen only while another write is in flight. Discard and Publish now report a draft that wasn't removed. Reproduced first with two pages editing one workflow's YAML 300-600 ms apart: the first page's edit vanished with no message. After: the first edit survives and the second page gets the conflict; both buttons verified; sequential edits and single-page editing still save. No test: it's a timing race, so the fix rules it out by checking what's stored before every write. task check passed.