fix: keep sent message/rfc822 attachment visible after inline unwrapping - #704
Open
guisea wants to merge 1 commit into
Open
fix: keep sent message/rfc822 attachment visible after inline unwrapping#704guisea wants to merge 1 commit into
guisea wants to merge 1 commit into
Conversation
The "empty outer body + message/rfc822 attachment" unwrap heuristic (built for Outlook's blank-body forwards) was also matching Forward as attachment sends, which intentionally use a blank body. Once unwrapped for inline preview, the .eml attachment itself was filtered out of the attachment list, so a sent forward-as-attachment message with a large attached .eml appeared to have no attachments at all.
There was a problem hiding this comment.
Pull request overview
This PR fixes an attachment-list regression where message/rfc822 (.eml) attachments could disappear from the visible attachment list after the app “unwraps” an embedded email for inline preview (notably affecting “Forward as attachment” flows).
Changes:
- Removed the
embeddedEmailUnwrappedstate and its reset/update paths since it became redundant. - Stopped filtering out
message/rfc822attachments from the attachment list after inline unwrapping, ensuring the.emlremains visible/downloadable. - Updated memo dependencies accordingly to reflect the removed state.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
message/rfc822attachment" unwrap heuristic (built for Outlook's blank-body forwards) also matched messages sent via Forward as attachment, which intentionally sends a blank body..emlattachment itself was filtered out of the attachment list, so a sent forward-as-attachment message with a large attached.emlappeared to have no attachments at all - even though it clearly had one (correct size shown).message/rfc822attachment now always stays visible/downloadable in the attachment list, regardless of whether it's also been unwrapped for inline preview. Cleaned up the now-deadembeddedEmailUnwrappedstate that this filter was the only reader of.Test plan
npx tsc --noEmitnpx eslint components/email/email-viewer.tsx