Skip to content

Conversation

@sean-brydon
Copy link
Member

Summary

  • Add email templates for monthly proration billing notifications
  • ProrationInvoiceEmail: Sent when invoice is created for additional seats
  • ProrationReminderEmail: Sent 7 days later if invoice remains unpaid

Changes

  • React email templates using V2BaseEmailHtml
  • BaseEmail classes for rendering
  • Billing email service functions (sendProrationInvoiceEmails, sendProrationReminderEmails)
  • Translation keys for email content

Test plan

  • Verify email templates render correctly
  • Verify translation keys are correct
  • Type check passes

Add email templates for monthly proration billing notifications:

- ProrationInvoiceEmail: Sent when invoice is created for additional seats
- ProrationReminderEmail: Sent 7 days later if invoice remains unpaid

Includes:
- React email templates using V2BaseEmailHtml
- BaseEmail classes for rendering
- Billing email service functions
- Translation keys for email content

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sean-brydon sean-brydon force-pushed the feat/proration-email-templates branch from fea5046 to b23fdaa Compare January 26, 2026 14:26
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

);
}

await Promise.all(emailsToSend);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promise.allSettled() ?

@sean-brydon sean-brydon marked this pull request as ready for review January 26, 2026 15:20
@graphite-app graphite-app bot added consumer ready-for-e2e core area: core, team members only labels Jan 26, 2026
@graphite-app graphite-app bot requested a review from a team January 26, 2026 15:20
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 7 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/emails/templates/proration-reminder-email.ts">

<violation number="1" location="packages/emails/templates/proration-reminder-email.ts:68">
P2: Use the existing translation keys for the plain-text body instead of embedding the English string directly so the reminder email localizes correctly.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


protected getTextBody(): string {
const formattedAmount = (this.proration.proratedAmount / 100).toFixed(2);
return `Reminder: Your invoice of $${formattedAmount} for team ${this.team.name} is still unpaid. Please pay to avoid restrictions on adding new users.`;
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Use the existing translation keys for the plain-text body instead of embedding the English string directly so the reminder email localizes correctly.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/emails/templates/proration-reminder-email.ts, line 68:

<comment>Use the existing translation keys for the plain-text body instead of embedding the English string directly so the reminder email localizes correctly.</comment>

<file context>
@@ -0,0 +1,70 @@
+
+  protected getTextBody(): string {
+    const formattedAmount = (this.proration.proratedAmount / 100).toFixed(2);
+    return `Reminder: Your invoice of $${formattedAmount} for team ${this.team.name} is still unpaid. Please pay to avoid restrictions on adding new users.`;
+  }
+}
</file context>
Fix with Cubic

@github-actions
Copy link
Contributor

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

@devin-ai-integration
Copy link
Contributor

I reviewed the Cubic AI feedback for this PR. The issue identified at packages/emails/templates/proration-reminder-email.ts:68 regarding using translation keys for the plain-text body has a confidence score of 8/10.

Per my instructions, I'm only addressing issues with a confidence score of 9/10 or higher. Since this issue is below that threshold, I'm skipping it for now. The PR author or reviewers can decide whether to address this feedback manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only ready-for-e2e size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants