Skip to content

fix(email): route bin/trash action through IMAP delete instead of labels - #430

Merged
Hydralerne merged 3 commits into
oblien:feat/bugfix-batch-2026-09-16from
santhiprakash:fix/email-bin-imap-move-429
Sep 16, 2026
Merged

Hydralerne merged 3 commits into
oblien:feat/bugfix-batch-2026-09-16from
santhiprakash:fix/email-bin-imap-move-429

Conversation

@santhiprakash

@santhiprakash santhiprakash commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Deleted inbox messages were being given an IMAP keyword instead of being moved to Trash. This routes the bin action through the existing delete handler, preserves the selected mailbox in optimistic, context-menu and keyboard deletion, and supports permanent deletion from Bin.

Adapted to the current platform architecture while preserving the original contribution. Targets the bug integration branch for #892; addresses the deletion portion of #429. The separate automatic inbox refresh request remains open.

Validation: four client → tRPC → IMAP driver regressions pass (three fail on main), all 64 mail server tests pass, server TypeScript passes, and the mail client production build passes. The regression fixture substitutes the IMAP connection; it is not a live mailbox test.

The trash icon and "Move to Bin" flow was calling mail.modifyLabels,
which only adds/removes IMAP keywords. On real-mailbox servers like
Dovecot, this leaves the message in INBOX with a visible TRASH tag
instead of moving it to Trash.

Use the existing trpc.mail.bulkDelete path (deleteThreads) which does
messageMove(..., 'Trash') when the source is not Trash and permanently
deletes when it is. Pass the source folder along in the two delete
entry points so the IMAP driver looks in the right mailbox.

Fixes oblien#429
@santhiprakash
santhiprakash force-pushed the fix/email-bin-imap-move-429 branch from c8f0c52 to e5e095b Compare August 5, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants