matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: Discarding an email does not work

Open Marwan051 opened this issue 8 months ago • 2 comments

Describe the bug

When composing an email and then trying to discard it, the email remains in the drafts. This is caused because there's only 2 options when trying to close an email you are composing which are:

  • y: This one closes the composing page and saves the email to drafts
  • n: This one closes the modal and continues with the email composition

There's nowhere for an option to close the composing page and delete the email.

To reproduce

  1. Start composing an email
  2. Discard it
  3. Go to drafts and observe the email still being there (note if the drafts were empty before you need to go to some other page and back to the main page as you need to force a re-render for the drafts page to appear)

Expected behavior

There should be 3 buttons when asking to discard an email:

  • y: This should discard the email and delete it entirely and close the compose page
  • n: This should save the email in drafts and close the compose page
  • c/esc: This should close the modal and return to the email composing(This already exists but there's no visual for it)

Screenshots

No response

Matcha version

0.27.0

Go version

No response

OS

Linux mint 22.2

Terminal

No response

Additional context

No response

Marwan051 avatar Mar 19 '26 17:03 Marwan051

#236 . Well, this design seems a bit flawed. esc is already used to get into this state (discard) and pressing it again doesn't make sense and may lead people to be stuck in a loop. Pressing c is also weird on a question "Discard the message?`. Drafts take up not a lot of space, so I don't really see a problem in some being saved without a choice. Maybe, design along the lines of "Are you sure you want to exit?" "save | continue | delete" could work. Again, don't see a problem, unless you write a million emails a day, it's actually quite nice, as i can get back to writing emails i thought i'd not.

I am open to any remakes though.

andrinoff avatar Mar 19 '26 18:03 andrinoff

The problem isn't primarily in the amount of space used as much as it that the app is giving the user a choice that they can not do in that page.

Marwan051 avatar Mar 19 '26 18:03 Marwan051