Guard the confirmation on a single-message delete

Testkamo-internal
Shipped
September 2, 2026 at 4:57 AM UTC
Author
Kamo
Commit
239f666

A member reported deleting the wrong email from /messages: the row's trash icon fired straight through to the API, so one stray click on the right edge of a row took the mail out of the list with nothing left to click back. Every action on the selection bar already went through MailConfirmDialog; the per-row delete and the message menu's Delete were the two that did not. The fix routes both through a pendingDelete state and one runPendingDelete runner, the same shape the bulk actions use. The dialog names the message it caught, since "Delete this email?" alone does not tell the member whether the click landed on the row they meant. It reuses the existing **************** plurals at count 1 ("Delete this email?" / "It moves to Trash."), so no new dictionary keys. That change went out inside c38340ad, which swept it up from the shared working tree while it was still uncommitted. This commit adds the guard that was missing when the bug was written: **************** already covered the selection bar and the folder menu, and carried a comment noting the per-row delete as the one it deliberately did not reach. It reaches it now — all four assertions fail against 3a198ad0, the last commit before the fix. The `#` keyboard shortcut still deletes the selection without asking; it is a typed expert action rather than a mis-click, so it is left alone.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing