-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Partner invite email updates #2965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a new API to aggregate partner invite rewards and bounties, updates partner-invite flows to include this data when sending emails, and updates/introduces email templates to render rewards and bounties in invitation messages. Changes
Sequence DiagramsequenceDiagram
participant Action as Partner Action
participant API as getPartnerInviteRewardsAndBounties
participant DB as Prisma DB
participant EmailSvc as Email Service
participant Template as Email Template
Action->>API: request rewards/bounties (programId, groupId)
API->>DB: getGroupOrThrow(groupId)
API->>DB: query active bounties (time + group filters)
DB-->>API: group + bounties
API-->>Action: { rewards: [...], bounties: [...] }
rect rgba(200,220,255,0.25)
Note over Action,Template: Build email payload with program, partner name, rewards, bounties
Action->>Template: render(payload)
Template-->>EmailSvc: formatted message
end
EmailSvc->>Action: send result (non-blocking)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code graph analysis (2)packages/email/src/templates/program-network-invite.tsx (1)
apps/web/lib/actions/partners/create-program.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/web/lib/actions/partners/create-program.ts(2 hunks)apps/web/lib/actions/partners/invite-partner-from-network.ts(2 hunks)apps/web/lib/actions/partners/invite-partner.ts(2 hunks)apps/web/lib/actions/partners/resend-program-invite.ts(2 hunks)apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts(1 hunks)packages/email/src/templates/program-invite.tsx(4 hunks)packages/email/src/templates/program-network-invite.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
apps/web/lib/actions/partners/create-program.ts (2)
packages/email/src/index.ts (1)
sendEmail(6-29)apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts (1)
getPartnerInviteRewardsAndBounties(19-99)
apps/web/lib/actions/partners/resend-program-invite.ts (2)
packages/email/src/index.ts (1)
sendEmail(6-29)apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts (1)
getPartnerInviteRewardsAndBounties(19-99)
apps/web/lib/actions/partners/invite-partner-from-network.ts (3)
packages/email/src/index.ts (1)
sendEmail(6-29)packages/email/src/templates/program-network-invite.tsx (1)
ProgramNetworkInvite(19-148)apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts (1)
getPartnerInviteRewardsAndBounties(19-99)
apps/web/lib/actions/partners/invite-partner.ts (2)
packages/email/src/index.ts (1)
sendEmail(6-29)apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts (1)
getPartnerInviteRewardsAndBounties(19-99)
apps/web/lib/api/partners/get-partner-invite-rewards-and-bounties.ts (1)
apps/web/lib/api/groups/get-group-or-throw.ts (1)
getGroupOrThrow(4-52)
packages/email/src/templates/program-network-invite.tsx (1)
packages/ui/src/footer.tsx (1)
Footer(106-344)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
Summary by CodeRabbit