Skip to content

Recover email content omitted by Mailgun - #144

Merged
parterburn merged 2 commits into
mainfrom
paul-cursor/preserve-full-email-body-2b44
Aug 2, 2026
Merged

Recover email content omitted by Mailgun#144
parterburn merged 2 commits into
mainfrom
paul-cursor/preserve-full-email-body-2b44

Conversation

@parterburn

@parterburn parterburn commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • detect when Mailgun stripped-html is only a prefix of the complete trimmed plain reply
  • use the already-cleaned complete plain reply for anomalous truncated HTML, avoiding malformed Gmail nesting and quoted-history leakage
  • preserve rich stripped HTML for normal complete messages
  • enforce exactly three identical <br><br> paragraph separators for the reported four-paragraph case
  • cover persistence, quoted raw HTML, missing raw HTML, rendered DOM, and signature removal

Verification

  • bundle exec rspec spec/models/email_processor_spec.rb spec/features/entries_spec.rb — 45 examples, 0 failures
  • bundle exec rspec — 243 examples, 0 failures, 1 expected pending
  • CI vm-job and CodeFactor pass
  • browser geometry measured paragraph deltas of approximately 38/40/38px (effectively uniform 40px spacing)

uniform_recovered_email_spacing.mp4

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 2, 2026 15:06
Co-authored-by: Paul Arterburn <parterburn@users.noreply.github.com>
Co-authored-by: Paul Arterburn <parterburn@users.noreply.github.com>
@parterburn
parterburn marked this pull request as ready for review August 2, 2026 16:57
@parterburn
parterburn merged commit 52594ea into main Aug 2, 2026
2 checks passed
@parterburn
parterburn deleted the paul-cursor/preserve-full-email-body-2b44 branch August 2, 2026 17:00
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