Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Jan 27, 2026

For #12320

Change

  • Addresses a timing issue when updating drafts.
  • Since drafts are immutable, updating a draft deletes the old message and creates a new one.
  • If the user is quick or the sync is slow, the draft being deleted can still appear in the list after closing the composer.
  • Reopening that envelope/draft leads to a state where further edits fail.

Trade off

  • Good: The draft is gone right away, no confusion.
  • Bad: UX is meh. Depending on the imap server, it might take a while until the new draft appears. One could assume that it just didn't worked on the draft is lost. I've tried to trigger a sync right after the draft being saved, but that didn't work out (the backend usually takes a few bits to process, we don't have the current search query available in that scope).

Addresses a timing issue when updating drafts.

Since drafts are immutable, updating a draft deletes the old message and
creates a new one.

If the user is quick or the sync is slow, the draft being deleted can
still appear in the list after closing the composer.

Reopening that envelope/draft leads to a state where further edits fail.

This change removes the envelope from the store to avoid this problem.

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb
Copy link
Contributor Author

kesselb commented Jan 27, 2026

/backport to stable5.6

@ChristophWurst ChristophWurst merged commit 3947717 into main Jan 29, 2026
41 checks passed
@ChristophWurst ChristophWurst deleted the bug/noid/timing-issue-save-draft branch January 29, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants