Rely on backend to strip attachments from the raw email view - #84
Closed
wparad wants to merge 2 commits into
Closed
Conversation
The raw .eml modal rendered base64 attachment/inline-image data inline, bloating the view with content nobody reads there. Add stripAttachmentsFromRawEmail(), which walks MIME part boundaries and replaces attachment/inline-file bodies with a placeholder while leaving headers and the visible text/html body intact. Applied only to the modal's display text; Copy and Download still use the untouched raw source so the .eml stays a faithful reproduction. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V85rptvcLi67TUmaqU1s53
Preview deployedURL: https://email.rhosys.cloud/pr/claude-sanitizer-large-attachments-6d1lbk/ |
The raw email the frontend fetches is now already a display-safe copy with attachments stripped server-side (see the SES-Email-Adapter backend change to the content sanitizer and the /raw endpoint). Copy and Download previously still shipped the full original bytes since only the display text was stripped client-side; stripping in the backend means every consumer of this endpoint gets the stripped copy, so the client-side transform is no longer needed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V85rptvcLi67TUmaqU1s53
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
EmailSignalCard.vue) previously rendered the full raw.emlsource with a client-side transform stripping attachments for display only — Copy and Download still shipped the untouched original bytes with base64 attachment/inline-image data to the client.SES-Email-AdapterPR): the/rawendpoint the frontend fetches from now already returns a display-safe copy with attachments stripped. This reverts the client-sidestripAttachmentsFromRawEmail()helper — no longer needed, and it means Copy/Download get the stripped copy too, matching the backend's intent that consumers of this endpoint never need the full original.Test plan
npx vue-tsc --noEmitnpx eslinton changed files🤖 Generated with Claude Code
https://claude.ai/code/session_01V85rptvcLi67TUmaqU1s53
Generated by Claude Code