refactor: remove unused Customer.io transactional email codepath#1498
Open
evanjacobson wants to merge 5 commits intomainfrom
Open
refactor: remove unused Customer.io transactional email codepath#1498evanjacobson wants to merge 5 commits intomainfrom
evanjacobson wants to merge 5 commits intomainfrom
Conversation
Production has been on Mailgun. Removes email-customerio.ts, customerio-node dependency, EMAIL_PROVIDER config, and CIO provider option from admin email testing page. CIO user deletion in external-services.ts is preserved (different API keys, used for marketing audience cleanup).
14 tasks
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (11 files)
Reviewed by gpt-5.4-20260305 · 528,467 tokens |
evanjacobson
commented
Mar 24, 2026
Contributor
Author
There was a problem hiding this comment.
most of these will be filtered out after #1356 merges
17 tasks
The jest.mock for @/lib/email only provided sendOrganizationInviteEmail, but the email-testing-router (loaded transitively via the router tree) now imports subjects from @/lib/email at module level. Add the missing exports to the mock.
…-Org/cloud into improvement/remove-customerio-email
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
Removes the unused Customer.io transactional email codepath. Production has been on Mailgun.
email-customerio.tsand removedcustomerio-nodedependencyEMAIL_PROVIDERconfig and routing logic —send()always uses Mailguntemplatesobject (CIO template ID mapping), madesubjectsthe single source of truthcreditsVars(removed CIO Liquid-only variables)Note:
external-services.tsCIO user deletion is preserved — it uses different API keys (CUSTOMERIO_SITE_ID/CUSTOMERIO_API_KEY) for marketing audience cleanup.Verification
npx tsc --noEmit— no type errorspnpm lint— cleanVisual Changes
Reviewer Notes
CUSTOMERIO_EMAIL_API_KEYandEMAIL_PROVIDERfrom Vercel. KeepCUSTOMERIO_SITE_IDandCUSTOMERIO_API_KEY(used byexternal-services.tsfor marketing user deletion).