You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
react-email: unknown component types and children of leaf components are dropped silently #460
Two cases in @json-render/react-email drop content with no error or warning:
Unknown component type → if (!Component) return null (render.tsx#L59).
Children on leaf components (Text, Heading, Link, Button, Image, Hr, Preview) are ignored, since those components only render props.text. A common LLM output like Link > Image just disappears from the HTML.
validateSpec doesn't catch either (it checks missing_child and orphaned_element, but not unknown types or children on leaves).
With LLM-generated specs this is the hardest kind of bug to notice: the email renders fine, just missing pieces. We ended up writing our own validator to catch it.
Proposal: a console.warn in dev for unknown types, and/or a catalog-aware check (e.g. validateSpec(spec, { catalog })) that flags children on components that don't accept them.
Activity