#463

feat(react-email): warn when content is dropped silently

Openharold18mwants to merge intofrom

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.warn naming the type and element key before returning null.
  • Children on a standard leaf component (slots: [] in standardComponentDefinitions, e.g. Link > Image): console.warn with 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 --noEmit clean.

🤖 Generated with Claude Code

Activity

4
copilot-pull-request-reviewer[bot]reviewed5d ago
copilot-pull-request-reviewer[bot]5d ago

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.

vercel[bot]5d 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.

vercel[bot]5d ago

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

ProjectDeploymentActionsUpdated
json-render-chat-sdk-demo Errorv0Nov 7, 2026 9:23pm UTC