Skip to content

Conversation

@reiyi-lai
Copy link

@reiyi-lai reiyi-lai commented Jan 18, 2026

Issue

  1. JSONL patch format is not documented - structure expected by useUIStream's internal applyPatch function not specified in the README or docs.
  2. apps/web/app/docs/streaming/page.tsx shows /root/children paths which silently fail, as the applyPatch function at packages/react/src/hooks.ts only supports /root and /elements/{key} paths.
  3. Renderer uses wrong prop name - README example shows components={registry} but should be registry={registry}.

Based on packages/react/src/hooks.ts:

  • The patch format uses /root and /elements/{key} paths, not JSON Pointer paths like /children/-
  • send(prompt) takes a string directly, not { prompt }
  • The hook returns isStreaming (not status) and clear() (not reset())

Changes

1. README.md:
Added "API Route Integration" section with:

  • JSONL patch format specification
  • useUIStream hook reference
  • Complete API route example (Next.js + Vercel AI SDK)
  • Context provider for Renderer component
  • Fixed Renderer prop: componentsregistry

2. apps/web/app/docs/streaming/page.tsx:

  • Fixed incorrect path: /root/children/elements/{key} with children array

@vercel
Copy link
Contributor

vercel bot commented Jan 18, 2026

@reiyi-lai is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestions:

  1. Streaming documentation shows incorrect JSON patch path format (/root/children) that silently fails in the actual implementation
  1. README example uses incorrect prop name 'components' instead of 'registry' for the Renderer component
Fix on Vercel

@reiyi-lai reiyi-lai changed the title Add API route documentation with JSONL patch format specification Fix JSONL patch format in /docs and add API route documentation to README Jan 18, 2026
@reiyi-lai reiyi-lai changed the title Fix JSONL patch format in /docs and add API route documentation to README Fix JSONL patch format in /docs and add API route documentation Jan 18, 2026
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