feat(backend): send Wrapper transactional email - #39
Merged
Merged
Conversation
Port Resend, Autumn/Resend webhooks, and brand templates so welcome, billing, and deletion mail can go out in production. Also land the Homebrew formula install path, sign-in layout, and ops doc updates still sitting in the tree.
Keep generated API files aligned with oxfmt so the format check does not fail after the email pipeline codegen.
Claim Autumn and Resend events before side effects, keep the original grace window on duplicate downgrades, and drop the local Resend smoke script that hardcoded a personal inbox.
Overlapping Autumn cancel/expired/past_due jobs now serialize on the same emailState row, so only the first mutation is allowed to send.
…window A failed in-flight send no longer clears a later claim after the user upgrades and downgrades again.
feat(backend): send Wrapper transactional email
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 454272d. Configure here.
Skip the Apple-path deletion mail so Better Auth onDelete is the single sender, and claim the Pro upgrade mail when hasPro flips to true.
3 tasks
adapter.deleteOne does not run Better Auth onDelete, so Apple-only deletes must send the confirmation themselves. Upgrade mail is claimed with planUpgradedEmailSent and released if the send fails.
Unset planUpgradedEmailSent now means a legacy Pro user, not a retry. Failed sends set the flag to false so only those can claim again.
fix(backend): send plan and deletion emails only once
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
dev.Test plan
/webhook/autumnand/webhook/resendare no longer 404wrapper.shin productionNote
Medium Risk
Touches billing webhooks, account lifecycle emails, and deletion flows; misconfigured secrets or webhook handling could affect plan state or duplicate notifications, though idempotency and claim/release logic reduce replay risk.
Overview
Adds Resend-backed transactional email on Convex: React Email templates (welcome, Pro upgrade, plan downgrade, access restricted, account deleted, collaborator),
@convex-dev/resendintegration, and sends tied to signup, Autumn plan changes, account deletion, and a daily cron for users still on Free seven days after downgrade.Webhook HTTP routes on the Convex
.siteorigin verify Svix signatures and idempotently process Autumncustomer.products.updated(Pro upgrade/downgrade → internal plan handlers) and Resend delivery/bounce events (email state updates). New schema tables trackemailStateandprocessedWebhookclaims; account deletion clears email state.Release and docs: Homebrew tap workflow validates
HOMEBREW_TAP_TOKENagainstheycupola/homebrew-tapand installs CLI binaries frombin/paths; env examples andENVIRONMENTS.mddocument Autumn/Resend secrets and webhook URLs;OPERATIONS.mdreflects current branch protection; privacy policy and sign-in UI mention Resend and rename social sign-in layout classes.Reviewed by Cursor Bugbot for commit f824a8b. Bugbot is set up for automated code reviews on this repo. Configure here.