Skip to content

fix(gmail): honor unnamed attachment dispositions - #197

Open
BigDataDZ wants to merge 1 commit into
CopilotKit:mainfrom
BigDataDZ:codex/fix-unnamed-mail-attachments
Open

BigDataDZ wants to merge 1 commit into
CopilotKit:mainfrom
BigDataDZ:codex/fix-unnamed-mail-attachments

Conversation

@BigDataDZ

Copy link
Copy Markdown
Contributor

An unnamed MIME part explicitly marked Content-Disposition: attachment is currently treated as message content. Opening the inbox or a thread can fetch that attachment unnecessarily, fail when it is unavailable, or merge attached text into the parent body.

Recognize the attachment disposition token in the shared predicate used by both hydration and body extraction. Keep these parts lazy and expose a generic attachment reference when Gmail supplies an attachment ID. Forwarded messages keep their existing .eml fallback; inline text still loads as message content.

Regression tests reproduced the unwanted fetch before the fix and cover remote and embedded text, HTML and multipart attachments, disposition casing/whitespace, inbox/thread reads, and inline remote bodies.

Validation: Google tests 39/39; full suite 486 passed, 3 platform-dependent skips, 0 failed; repository lint, server/mobile/worker typechecks and server build pass. Web/iOS/Android exports passed for the same unchanged mobile/domain sources in this contribution batch. Live Google accounts were not exercised.

This branch has not been deployed

No deployments
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.

1 participant