#463
feat(react-email): warn when content is dropped silently
Closes #460
Two cases in renderToHtml / renderToPlainText dropped content with no signal, which is hard to notice with LLM-generated specs: the email renders, just missing pieces.
Changes
- Unknown component type:
console.warnnaming the type and element key before returningnull. - Children on a standard leaf component (
slots: []instandardComponentDefinitions, e.g.Link > Image):console.warnwith the count of dropped children. It only fires when the registry entry is the standard component, so custom overrides that do render children stay silent.
Warnings only, no behavior change. Same idea as the slot check in the Chat SDK renderer (#451), which rejects children under components without slots.
Tests
- 4 new tests: both warnings, no warning for a custom override that renders children, no warning for a valid example spec. The two warning tests fail without the change.
packages/react-email: 37/37 pass,tsc --noEmitclean.
🤖 Generated with Claude Code
Activity
4copilot-pull-request-reviewer[bot]reviewed5d ago
@harold18m is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated |
|---|---|---|---|
| json-render-chat-sdk-demo | Error | v0 | Nov 7, 2026 9:23pm UTC |
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.