Undo (Ctrl+Z) does not restore deleted emails when deletion is done via Delete key in versions >= 1.17.2

Description

Since Mailspring version 1.17.2, undoing an email deletion using Ctrl+Z no longer works when the email is deleted using the Delete (DEL) key.
This worked correctly in version 1.17.1. The issue is present in all versions starting from 1.17.2.
The problem occurs on multiple accounts, including Microsoft Outlook and a standard IMAP account.

To Reproduce…

Steps to reproduce the behavior:

  1. Open Mailspring

  2. Select an email in the inbox

  3. Press the Delete (DEL) key to delete the email

  4. Press Ctrl+Z to undo the deletion

Expected Behavior

The deleted email should be restored to its original folder (Inbox or previous folder), as it was in version 1.17.1.

Screenshots

Nothing happens when pressing Ctrl+Z.
The email remains in the Deleted folder.
No error message or notification is shown.

Setup

OS and Version:

  • Windows 10 22h2 19045.6809
    Installation Method:
  • EXE installer downloaded from the official GitHub releases
    Mailspring Version:
  • Affected: 1.17.2 and later
  • Last working version: 1.17.1
    Email Account Types:
  • Microsoft Outlook
  • Standard IMAP account
    (The issue occurs on all tested accounts)
    Keyboard Layout:
  • AZERTY

Additional Context

The issue is 100% reproducible.
No relevant errors were found in the logs.
The problem appears to be a regression introduced in version 1.17.2.

Thank you so much for identifying the version to revert to! I just reinstalled 1.17.1 and will stay on it until this issue is fixed.

This is where the auto-update feature of Mailspring bites you in the ass. :frowning:

Hi everyone – this should be resolved in Mailspring 1.19.0, which was just released. Sorry for the hassle, we’ve added some automated test coverage to avoid regressions in this in the future. It looks like a Typescript upgrade caused a change to property initialization and made mail operations default-not-undoable.

Thanks for your patience!

Hi,

Thanks for the quick fix and for looking into this issue. I’ve updated to Mailspring 1.19.0 and can confirm that the problem with Ctrl+Z not restoring emails deleted via the Delete key is now resolved on my side.

Thanks again!