Skip to content

feat: React Native UI components (CopilotChat, useRenderTool, CopilotModal) - #4715

Merged
jpr5 merged 5 commits into
mainfrom
blitz/rn-ui-components/integration
May 22, 2026
Merged

jpr5 merged 5 commits into
mainfrom
blitz/rn-ui-components/integration

Conversation

@jpr5

@jpr5 jpr5 commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add pre-built UI components to @copilotkit/react-native to close the parity gap with the web SDK. The package shipped as headless (hooks + communication layer). This PR adds the React Native equivalents of the web SDK's chat components.

Components

  • CopilotChat — FlatList-based chat with message bubbles, tool call rendering via useRenderToolRegistry, error handling, empty state with suggestion pills, keyboard avoidance, extraData-driven re-renders, FlatListComponent prop for bottom-sheet compatibility
  • CopilotModal — bottom-sheet overlay using @gorhom/bottom-sheet with BottomSheetFlatList for gesture-safe scrolling, configurable snap points, imperative open()/close() API, disableKeyboardAvoiding for double-avoidance prevention
  • AssistantMessage / UserMessage — styled chat bubbles with typing indicator animation
  • CopilotMarkdown — wraps react-native-streamdown (Software Mansion Labs) for streaming markdown in AI responses
  • useRenderTool — registers tools + render functions via RenderToolContext with useSyncExternalStore
  • RenderToolProvider — auto-wrapped in CopilotKitProvider

CR Summary

5-round 7-agent CR loop. Key bugs found and fixed:

  • useRenderToolContext() → useRenderToolRegistry() (runtime crash)
  • Wrong props to render functions ({toolCall} → {args, status})
  • useSyncExternalStore returning same Map ref (no re-renders)
  • JSON.parse crash on streaming tool call arguments
  • Double KeyboardAvoidingView in CopilotModal
  • Missing extraData memoization on FlatList
  • FlatListComponent type incompatibility with BottomSheetFlatList
  • Missing tsdown externals for peer dependencies
  • @ag-ui/client undeclared dependency → import from @copilotkit/shared

Test plan

  • 134 tests passing across 9 test suites
  • 5-round 7-agent CR converged to zero bucket (a) findings
  • Visual testing on iOS simulator
  • Physical device testing via Dev Client

@vercel

vercel Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment May 22, 2026 9:29pm
docs Ready Ready Preview, Comment May 22, 2026 9:29pm
form-filling Ready Ready Preview, Comment May 22, 2026 9:29pm
research-canvas Ready Ready Preview, Comment May 22, 2026 9:29pm
showcase-docs Error Error May 22, 2026 9:29pm
travel Ready Ready Preview, Comment May 22, 2026 9:29pm

Request Review

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@pkg-pr-new

pkg-pr-new Bot commented May 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/@copilotkit/a2ui-renderer@4715

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/@copilotkit/agentcore-runner@4715

@copilotkitnext/angular

pnpm add https://pkg.pr.new/@copilotkitnext/angular@4715

@copilotkit/core

pnpm add https://pkg.pr.new/@copilotkit/core@4715

@copilotkit/react-core

pnpm add https://pkg.pr.new/@copilotkit/react-core@4715

@copilotkit/react-native

pnpm add https://pkg.pr.new/@copilotkit/react-native@4715

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/@copilotkit/react-textarea@4715

@copilotkit/react-ui

pnpm add https://pkg.pr.new/@copilotkit/react-ui@4715

@copilotkit/runtime

pnpm add https://pkg.pr.new/@copilotkit/runtime@4715

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/@copilotkit/runtime-client-gql@4715

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/@copilotkit/sdk-js@4715

@copilotkit/shared

pnpm add https://pkg.pr.new/@copilotkit/shared@4715

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/@copilotkit/sqlite-runner@4715

@copilotkit/voice

pnpm add https://pkg.pr.new/@copilotkit/voice@4715

@copilotkit/vue

pnpm add https://pkg.pr.new/@copilotkit/vue@4715

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/@copilotkit/web-inspector@4715

commit: 600b0c6

@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 8, 2026 04:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 8, 2026 04:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 8, 2026 04:42 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 8, 2026 04:42 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 8, 2026 04:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 8, 2026 04:54 Inactive
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 8, 2026 05:14 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 8, 2026 05:14 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 8, 2026 05:42 Inactive
@jpr5
jpr5 requested a review from tylerslaton May 8, 2026 05:45
@jpr5 jpr5 self-assigned this May 8, 2026
@jpr5
jpr5 force-pushed the blitz/rn-ui-components/integration branch from e509ea2 to 2988ac9 Compare May 22, 2026 19:07
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 22, 2026 19:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 22, 2026 19:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – form-filling May 22, 2026 19:16 Inactive
@vercel
vercel Bot temporarily deployed to Preview – chat-with-your-data May 22, 2026 19:16 Inactive
@jpr5
jpr5 force-pushed the blitz/rn-ui-components/integration branch from d82b2e8 to 735b384 Compare May 22, 2026 20:51
jpr5 added 5 commits May 22, 2026 14:26
…TypingIndicator components

Message bubble components with streaming markdown support, typing indicator animation, and timestamp formatting. Includes unit tests and edge case coverage.
Hook for rendering custom tool UIs in React Native with a store-based context provider. Includes tests for register/unregister, subscriber notification, and error handling.
FlatList-based chat interface and bottom-sheet modal overlay. Includes suggestion pills, keyboard avoidance, custom FlatList support, and comprehensive test coverage.
Add peer dependencies, export new components and hooks from package entry point, integrate RenderToolProvider into CopilotKitProvider, configure vitest and tsdown, add usage documentation.

This branch had an error being deployed

1 failed (outdated), 5 active, and 1 inactive deployments
Preview – research-canvas — 600b0c65 Deployed May 22, 2026 by vercel[bot]
Preview – travel — 600b0c65 Deployed May 22, 2026 by vercel[bot]
Preview – docs — 600b0c65 Deployed May 22, 2026 by vercel[bot]
Preview – form-filling — 600b0c65 Deployed May 22, 2026 by vercel[bot]
Preview – chat-with-your-data — 600b0c65 Deployed May 22, 2026 by vercel[bot]
npm — 600b0c65 Deployed May 22, 2026 by jpr5 via build #5853
Preview – showcase-docs — e509ea2e Deployed May 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant