-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
Description
Related
- ADR-0072
- PR #4380 comment from @Crash--
Description
A thread can contain emails spread across multiple mailboxes. Emails belonging to Trash, Drafts, or Templates should not appear in the thread view and should be excluded from thread-aware actions.
Rationale
- Trash: user already deleted the email β it should not reappear in thread view
- Drafts: not yet sent β should not be shown as part of the conversation
- Templates: not a real email in the conversation
Tasks
- After
ThreadExpansionService.expandThreads()returns, filter out emails whosemailboxIdscontain Trash, Drafts, or Templates mailbox IDs - Resolve Trash/Drafts/Templates mailbox IDs from
MailboxDashboardControlleror session capabilities - Apply the filter to both:
- Thread detail view (displaying emails within a thread)
- Thread-aware actions (do not perform actions on filtered-out emails)
- Handle edge case: if all emails in a thread are filtered out, hide the thread from the list or handle gracefully
Acceptance Criteria
- Emails in Trash do not appear in thread view
- Emails in Drafts do not appear in thread view
- Emails in Templates do not appear in thread view
- Thread actions only apply to non-filtered emails
- A thread containing only filtered emails is hidden or handled gracefully
Reactions are currently unavailable