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
🐛 Bug: a2ui-renderer: RendererProps.children is typed (id) => ReactNode, but list templates need (id, basePath) #7800
The renderer can forward each item's basePath with no type error, and the list shows "Bolt A" and "Bolt B".
❌ Actual Behavior
(a) children(node.id) compiles, but each row resolves name against the surface root, so the list renders with empty text and no error or warning.
(b) children(node.id, node.basePath) renders correctly, but fails type-checking: TS2554: Expected 1 arguments, but got 2.
createCatalog passes A2UI's buildChild straight through as children (create-catalog.tsx:125), and buildChild is (id: string, basePath?: string) => ReactNode (a2ui-react/adapter.tsx:36). RendererProps.children (create-catalog.tsx:48) narrows it to (id: string). The built-in ChildList does pass node.basePath.
The repo's own renderers work around this with a cast, (children as any)(item.id, item.basePath): 58 call sites in 29 files, including every beautiful-chat/declarative-generative-ui/renderers.tsx in the showcase and the examples/integrations/*/declarative-generative-ui/renderers.tsx files.
Related, not part of this issue: props is typed as the schema's input (z.infer), so a ChildList prop is typed as string[] | { componentId, path }, while the renderer actually receives the resolved { id, basePath }[]. That is why the cast on props.items is needed. Happy to open a separate issue if that's useful.
Screenshots
No response
𝌚 CopilotKit Version
`@copilotkit/a2ui-renderer` 1.79.0 (`main` at c619451f); first seen on 1.67.1.
I have a fix with a test ready: type`children` as `(id: string, basePath?: string) => React.ReactNode` and document when to pass `basePath`. It's backward compatible, since existing one-argument calls still type-check. I'll open the PR and link it here.
⚠️ This is an AI-generated response. We've escalated this to our engineering team — someone will follow up in this thread shortly.
The type mismatch you've identified is real and the root cause is exactly what you traced: RendererProps.children in create-catalog.tsx:48 is typed as (id: string) => React.ReactNode, while the underlying buildChild that gets passed through at line 125 is (id: string, basePath?: string) => React.ReactNode. The built-in ChildList components in both catalog/basic and catalog/minimal already call buildChild(node.id, node.basePath) — so the implementation supports it, the public type just doesn't expose it.
Your proposed fix (widening RendererProps.children to (id: string, basePath?: string) => React.ReactNode) is backward compatible and matches what the internals already do. The PR is the right path — engineering will verify and merge from there.
🤖 Generated by CopilotKit AI Support · Documentation
Activity
copilotkit-outpost-bot commentedon Oct 13, 2026
The type mismatch you've identified is real and the root cause is exactly what you traced:
RendererProps.childrenincreate-catalog.tsx:48is typed as(id: string) => React.ReactNode, while the underlyingbuildChildthat gets passed through at line 125 is(id: string, basePath?: string) => React.ReactNode. The built-inChildListcomponents in bothcatalog/basicandcatalog/minimalalready callbuildChild(node.id, node.basePath)— so the implementation supports it, the public type just doesn't expose it.Your proposed fix (widening
RendererProps.childrento(id: string, basePath?: string) => React.ReactNode) is backward compatible and matches what the internals already do. The PR is the right path — engineering will verify and merge from there.🤖 Generated by CopilotKit AI Support · Documentation
Was this helpful? React with 👍 or 👎
fix(a2ui-renderer): type RendererProps.children as (id, basePath?) (C…
fix(a2ui-renderer)!: type createCatalog renderer props as the binder …