Skip to content

fix: keep sent message/rfc822 attachment visible after inline unwrapping - #704

Open
guisea wants to merge 1 commit into
bulwarkmail:mainfrom
guisea:fix/sent-attachment-list-hidden-when-unwrapped
Open

fix: keep sent message/rfc822 attachment visible after inline unwrapping#704
guisea wants to merge 1 commit into
bulwarkmail:mainfrom
guisea:fix/sent-attachment-list-hidden-when-unwrapped

Conversation

@guisea

@guisea guisea commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The "empty outer body + message/rfc822 attachment" unwrap heuristic (built for Outlook's blank-body forwards) also matched messages sent via Forward as attachment, which intentionally sends 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 - even though it clearly had one (correct size shown).
  • The message/rfc822 attachment now always stays visible/downloadable in the attachment list, regardless of whether it's also been unwrapped for inline preview. Cleaned up the now-dead embeddedEmailUnwrapped state that this filter was the only reader of.

Test plan

  • npx tsc --noEmit
  • npx eslint components/email/email-viewer.tsx
  • Manually verify: send a message via "Forward as attachment", open it from Sent - attachment now appears in the list with working preview/download.

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.
Copilot AI review requested due to automatic review settings July 28, 2026 23:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 embeddedEmailUnwrapped state and its reset/update paths since it became redundant.
  • Stopped filtering out message/rfc822 attachments from the attachment list after inline unwrapping, ensuring the .eml remains 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.

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