Repository navigation
feat(email): branded React Email magic-link template - #5
Conversation
Replaces the plain-text sign-in email with a React Email component
that matches the site's editorial-technical aesthetic: helpbase
wordmark ("?" square + wordmark), near-black primary CTA, cool-
neutral palette, Geist-ish system-font stack (Geist doesn't render
reliably across email clients), 10-min expiry copy, hairline
divider, footer with helpbase.dev link.
- apps/web/emails/sign-in-magic-link.tsx: new component with
PreviewProps for `pnpm -F web email` preview. Table-based
wordmark so Outlook doesn't mangle alignment. Hardcoded hex
approximations of the shadcn oklch tokens (oklch doesn't render
in email clients).
- apps/web/lib/auth.ts: Better Auth's magic-link sender now passes
`react:` to Resend. Plain-text fallback is kept explicit (tuned
copy, not a stripped-down HTML dump). `MAGIC_LINK_EXPIRES_MINUTES`
constant keeps the plugin's `expiresIn` and the email copy in
sync.
- apps/web/package.json: `@react-email/components` as dep;
`react-email` as dev dep for local preview; `pnpm -F web email`
script.
- scripts/sync-templates.mjs: add `emails/` to HOSTED_TIER_EXCLUDES
so scaffolded projects don't drag in @react-email/components.
- CHANGELOG: unreleased entry.
Typecheck clean. 51 web tests pass. Scaffolder dry-run confirms
emails/ is excluded (33 hosted-tier files skipped, up from 32).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 50 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Removes the bg-foreground "?" square from both the site header and the magic-link email wordmark. DESIGN.md updated to reflect. - apps/web/components/header.tsx: logo is now the plain "helpbase" Link, no icon container or hidden-on-mobile breakpoint needed - apps/web/emails/sign-in-magic-link.tsx: wordmark Section is now a single Text node, drops the wordmark table - DESIGN.md: header left-side description updated Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Required by `pnpm -F web email` — the React Email CLI renders templates through this runtime. Caught on first run of the preview server. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-runs pnpm sync:templates after the header.tsx edit so the scaffolded project templates and the shadcn registry output match apps/web. Drift gate caught this on the first CI run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
pnpm -F web emailspins up the local React Email preview at port 3001emails/or@react-email/componentsFiles
apps/web/emails/sign-in-magic-link.tsx— new component + PreviewPropsapps/web/lib/auth.ts—deliverMagicLink()now passesreact:to Resend; plain-text fallback kept explicit.MAGIC_LINK_EXPIRES_MINUTESconstant keeps the plugin's expiry and the email copy in sync.apps/web/package.json—@react-email/components(dep),react-email(dev),emailscriptscripts/sync-templates.mjs—emails/added toHOSTED_TIER_EXCLUDESDesign notes
@/emailsTailwind configbox-borderon the CTA button per React Email guidanceTest plan
sync:templates --dry-runconfirmsemails/excluded (33 hosted files skipped, was 32)pnpm -F web email→http://localhost:3001renders the templatehelpbase login --email you@x.com, confirm email renders correctly in inboxcurl-style view in Gmail source)🤖 Generated with Claude Code