Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f79b258
feat(emails): transactional emails for top-up and KiloClaw purchase
kilo-code-bot[bot] Apr 28, 2026
4cb8526
fix(emails): add fixture vars for creditsTopUp and kiloClawSubscripti…
Apr 29, 2026
b41f989
fix(emails): dedupe kiloclaw subscription-started email by activation…
evanjacobson May 4, 2026
2782917
fix(emails): recover top-up confirmation email on duplicate webhook r…
evanjacobson May 4, 2026
320faac
docs(emails): acknowledge known gaps in insert-before-send email markers
evanjacobson May 5, 2026
807e268
refactor(emails): surface non-benign Stripe errors in receipt lookup
evanjacobson May 5, 2026
6c139e1
perf(emails): short-circuit duplicate-settlement change-log scan
evanjacobson May 5, 2026
c3995c6
Renamed top_up_email_log to transactional_email_log
evanjacobson May 5, 2026
62349d5
Use JSDoc comments inm credits.ts and credit-billing.ts
evanjacobson May 5, 2026
62b84aa
Reduce redundant comments
evanjacobson May 5, 2026
ef6793b
Remove all KiloClaw Subscription logic
evanjacobson May 5, 2026
5c76bb5
undo migration
evanjacobson May 5, 2026
efdaf51
Redo migrations
evanjacobson May 5, 2026
ea24f64
chore(db): regenerate transactional email migration
evanjacobson May 5, 2026
5353e10
Fix type error
evanjacobson May 5, 2026
176204f
Format file
evanjacobson May 5, 2026
d4d4788
fix(credits): protect top-up confirmation emails
evanjacobson May 5, 2026
2446610
Show Stripe link in test email
evanjacobson May 5, 2026
1bb024a
fix(credits): make top-up email recovery atomic
evanjacobson May 5, 2026
c8ee308
chore(db): regenerate transactional email migration
evanjacobson May 5, 2026
4645895
fix(emails): preserve subscription-started helper after rebase
evanjacobson May 5, 2026
9911255
fix(emails): register subscription-started subject
evanjacobson May 5, 2026
32dc685
test(emails): restore KiloClaw subscription email coverage
evanjacobson May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/src/emails/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ Every template must include this branding footer below the content table:
| `clawEarlybirdExpiresTomorrow.html` | `expiry_date`, `claw_url`, `year` | `30` |
| `clawComplementaryInferenceEnded.html` | `claw_url`, `year` | — |
| `accountDeletionRequest.html` | `email`, `year` | — |
| `creditsTopUp.html` | `heading`, `intro`, `amount_usd`, `credits_usd`, `purchase_date`, `credits_url`, `receipt_section`, `year` | — |
| `kiloClawSubscriptionStarted.html` | `plan_name`, `price_usd`, `billing_period`, `next_billing_date`, `manage_url`, `year` | — |
211 changes: 211 additions & 0 deletions apps/web/src/emails/creditsTopUp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ heading }}</title>
</head>
<body
style="
margin: 0;
padding: 0;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background-color: #ffffff;
color: #1a1a1a;
"
>
<table width="100%" cellpadding="0" cellspacing="0" style="background-color: #ffffff">
<tr>
<td align="center" style="padding: 40px 20px">
<table width="520" cellpadding="0" cellspacing="0">
<!-- Header -->
<tr>
<td style="padding: 40px 40px 20px">
<h1
style="
margin: 0;
font-size: 24px;
font-weight: 700;
color: #1a1a1a;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
{{ heading }}
</h1>
</td>
</tr>
<!-- Body -->
<tr>
<td style="padding: 0 40px 20px">
<p
style="
margin: 0 0 16px;
font-size: 14px;
line-height: 22px;
color: #333;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
{{ intro }}
</p>
</td>
</tr>
<!-- Detail box -->
<tr>
<td style="padding: 0 40px 20px">
<table
width="100%"
cellpadding="0"
cellspacing="0"
style="background-color: #f6f6f4; border: 1px solid #ebebea; border-radius: 10px"
>
<tr>
<td style="padding: 16px 20px">
<p
style="
margin: 0 0 8px;
font-size: 13px;
line-height: 20px;
color: #555;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
<strong style="color: #1a1a1a">Amount:</strong> ${{ amount_usd }} USD
</p>
<p
style="
margin: 0 0 8px;
font-size: 13px;
line-height: 20px;
color: #555;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
<strong style="color: #1a1a1a">Credits:</strong> ${{ credits_usd }} USD
</p>
<p
style="
margin: 0;
font-size: 13px;
line-height: 20px;
color: #555;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
<strong style="color: #1a1a1a">Date:</strong> {{ purchase_date }}
</p>
</td>
</tr>
</table>
</td>
</tr>
<!-- CTA -->
<tr>
<td style="padding: 0 40px 20px">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center" style="padding: 10px 0 20px">
<a
href="{{ credits_url }}"
style="
display: inline-block;
padding: 10px 20px;
background-color: #1a1a1a;
color: #ffffff;
text-decoration: none;
border-radius: 7px;
font-size: 13px;
font-weight: 600;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
View your balance
</a>
</td>
</tr>
</table>
<p
style="
margin: 0;
font-size: 13px;
line-height: 20px;
color: #555;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
{{ receipt_section }}
</p>
</td>
</tr>
<!-- Sign-off -->
<tr>
<td style="padding: 0 40px 40px; border-top: 1px solid #ebebea">
<p
style="
margin: 20px 0 0;
font-size: 14px;
line-height: 20px;
color: #333;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
If you have any questions, reply to this email — we're here to help.
</p>
<p
style="
margin: 16px 0 0;
font-size: 14px;
line-height: 20px;
color: #333;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
— The Kilo Team
</p>
</td>
</tr>
</table>
<!-- Branding Footer -->
<table width="520" cellpadding="0" cellspacing="0">
<tr>
<td align="center" style="padding: 30px 20px; border-top: 1px solid #eee">
<p
style="
margin: 0;
font-size: 11px;
color: #ccc;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif;
"
>
© {{ year }} Kilo Code, Inc<br />455 Market St, Ste 1940 PMB 993504<br />San
Francisco, CA 94105, USA
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Loading