Skip to content

Remove dead Cloudflare email id handling - #145

Merged
kentcdodds merged 1 commit into
mainfrom
cursor/fix-cloudflare-email-id-1fbc
Apr 9, 2026
Merged

kentcdodds merged 1 commit into
mainfrom
cursor/fix-cloudflare-email-id-1fbc

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Apr 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • remove the unused messageId field from the Cloudflare email API envelope type
  • stop exposing an id field from sendCloudflareEmail, since /email/sending/send no longer returns one
  • tighten the existing email API integration test to assert the exact success shape

Testing

  • npx vitest run packages/worker/src/app/email/cloudflare-email.node.test.ts
  • npm run typecheck
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes

    • Removed message identifier support from Cloudflare email API integration. Email send results no longer include the message ID field, returning only success status instead.
  • Tests

    • Updated test assertions to reflect removal of message ID from email send results.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@coderabbitai

coderabbitai Bot commented Apr 9, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fcce651a-9eb3-484c-933f-323df0e0ea0f

📥 Commits

Reviewing files that changed from the base of the PR and between ecd5af3 and 76170f0.

📒 Files selected for processing (2)
  • packages/worker/src/app/email/cloudflare-email.node.test.ts
  • packages/worker/src/app/email/cloudflare-email.ts

📝 Walkthrough

Walkthrough

Removed support for Cloudflare API response message identifiers. The CloudflareApiEnvelope type no longer parses messageId, and CloudflareSendResult removes the optional id field. Tests updated to reflect the simplified return shape.

Changes

Cohort / File(s) Summary
Test Assertion Updates
packages/worker/src/app/email/cloudflare-email.node.test.ts
Updated test assertions to expect the simplified return object { ok: true } instead of checking ok and id properties separately.
API Type and Implementation
packages/worker/src/app/email/cloudflare-email.ts
Removed messageId from CloudflareApiEnvelope result type and removed optional id field from CloudflareSendResult. Updated sendViaCloudflareApi to no longer extract or return message identifiers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 No more message IDs to track,
The Cloudflare path stays nice and black,
Simplified response, clean and true,
Just { ok: true } will do! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-cloudflare-email-id-1fbc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kentcdodds
kentcdodds marked this pull request as ready for review April 9, 2026 23:24
@kentcdodds
kentcdodds merged commit 20c34e9 into main Apr 9, 2026
14 of 16 checks passed
@kentcdodds
kentcdodds deleted the cursor/fix-cloudflare-email-id-1fbc branch April 9, 2026 23:25
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