improvement(email): reply-to help@sim.ai for lifecycle and billing emails#5487
Conversation
…ails - onboarding follow-up (5-day), payment-failed, and abandoned-checkout emails now reply-to the shared help inbox instead of a personal address - added getHelpEmailAddress() and reused it in the help route to remove the duplicated inline expression
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Lifecycle and billing notification emails (onboarding follow-up, abandoned checkout, payment failed) still use Docs on Reviewed by Cursor Bugbot for commit de04785. Configure here. |
Greptile SummaryThis PR routes replies on lifecycle (onboarding follow-up), billing (payment-failed, abandoned-checkout), and help confirmation emails to the shared
Confidence Score: 5/5Safe to merge — the change is additive, isolated to email reply-to wiring, and backed by a new test that verifies the correct address reaches sendEmail. All three call sites perform a mechanical swap of one well-understood expression for a named utility with identical semantics; no branching logic or auth paths are touched. The new invoices.test.ts case confirms the end-to-end wiring, and the existing test suite remains green. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Trigger as Trigger (lifecycle / Stripe webhook)
participant Handler as Email Handler
participant Utils as email/utils.ts
participant Mailer as sendEmail()
participant Recipient as User Inbox
Trigger->>Handler: event fires
Handler->>Utils: getPersonalEmailFrom() returns from
Handler->>Utils: "getHelpEmailAddress() returns help@sim.ai"
Handler->>Mailer: "sendEmail with from and replyTo help@sim.ai"
Mailer->>Recipient: delivers email
Recipient-->>Handler: "user replies routed to help@sim.ai"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Trigger as Trigger (lifecycle / Stripe webhook)
participant Handler as Email Handler
participant Utils as email/utils.ts
participant Mailer as sendEmail()
participant Recipient as User Inbox
Trigger->>Handler: event fires
Handler->>Utils: getPersonalEmailFrom() returns from
Handler->>Utils: "getHelpEmailAddress() returns help@sim.ai"
Handler->>Mailer: "sendEmail with from and replyTo help@sim.ai"
Mailer->>Recipient: delivers email
Recipient-->>Handler: "user replies routed to help@sim.ai"
Reviews (2): Last reviewed commit: "fix(email): address Greptile review feed..." | Re-trigger Greptile |
- add a sendEmail assertion locking in the payment-failure email's replyTo - clarify getPersonalEmailFrom() JSDoc so it doesn't overstate replyTo's scope
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit de04785. Configure here.
Summary
getHelpEmailAddress()inlib/messaging/email/utils.tsand reused it in the help route, removing a duplicated inline expressionType of Change
Testing
bun run type-checkclean on changed filesvitest run lib/billing/webhooks/invoices.test.tspassingbunx biome checkclean on changed filesChecklist