Skip to content

Adding the submitting partner information#3424

Merged
steven-tey merged 3 commits intomainfrom
referrall-email-partner-info
Feb 5, 2026
Merged

Adding the submitting partner information#3424
steven-tey merged 3 commits intomainfrom
referrall-email-partner-info

Conversation

@marcusljf
Copy link
Collaborator

@marcusljf marcusljf commented Feb 5, 2026

When a partner submits a referral, append their information to the email as well.

CleanShot 2026-02-05 at 10 36 02@2x

Summary by CodeRabbit

  • New Features

    • Partner referral notification emails now include a "Submitted by" block showing partner name, email (if present), and avatar.
    • Referral notifications now carry partner and program context so emails display partner details alongside referral info for clearer attribution.
  • Style

    • Adjusted email layout/padding to accommodate the new partner block.

When a partner submits a referral, append their information to the email as well.
@vercel
Copy link
Contributor

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dub Ready Ready Preview Feb 5, 2026 8:49pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

notifyPartnerReferralSubmitted now accepts program and partner objects (removing internal program lookup) and includes partner data in the PartnerReferralSubmitted email template; submit-referral passes program and partner through to the notifier.

Changes

Cohort / File(s) Summary
Notification Handler
apps/web/lib/api/referrals/notify-partner-referral-submitted.ts
Signature changed to accept program: Pick<Program, "workspaceId"> and `partner: Pick<Partner, "name"
Email Template
packages/email/src/templates/partner-referral-submitted.tsx
Added public partner prop (name, email, image); renders a "Submitted by" block with avatar, name, and optional email; adjusted layout/padding and template payload.
Submit Referral Action
apps/web/lib/actions/referrals/submit-referral.ts
Program enrollment query extended to include partner; call site updated to pass program and partner into notifyPartnerReferralSubmitted.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SubmitAction as SubmitReferralAction
  participant Notifier as notifyPartnerReferralSubmitted
  participant EmailSvc as EmailService/Template

  User->>SubmitAction: submit referral
  SubmitAction->>Notifier: notifyPartnerReferralSubmitted({ referral, program, partner })
  Notifier->>EmailSvc: render PartnerReferralSubmitted template (referral + partner)
  EmailSvc->>EmailSvc: compile/send email payload
  EmailSvc-->>Notifier: send result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hop a tiny data stream,
Passed partner name into the scheme.
An avatar and email, clear and bright,
Now referrals show who sent the light. ✨📬

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: adding partner information to the email notification when a partner submits a referral.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch referrall-email-partner-info

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.

@steven-tey
Copy link
Collaborator

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

✅ Actions performed

Full review triggered.

@steven-tey steven-tey merged commit fead4cc into main Feb 5, 2026
10 of 11 checks passed
@steven-tey steven-tey deleted the referrall-email-partner-info branch February 5, 2026 20:57
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