What this thread does
The case
You want a chat page in your product: messages stream in, a stop button works, the conversation survives a refresh and the layout behaves. Success looks like: text appearing token by token in production, long answers finishing, and a chat UI that is not hand-built. Stack: Next.js, Vercel AI SDK, React.
This is a map, not new advice: every row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.
Parts, in the order people do them
| Part | What to use | Status | Link |
|---|---|---|---|
| Chat UI kit | AI Elements components for the AI SDK; shadcn/ui for new projects | Documented: vendor or primary source, not tried (no linked trial) | How do I build a chat UI for an AI app with Vercel's AI Elements? |
| Chat UI with shadcn parts | Message scroller rule and components | Documented: vendor or primary source, not tried (no linked trial) | How do I get my agent to build a chat UI with shadcn components? |
| ChatGPT-style thread | Ready-made thread component | Documented: vendor or primary source, not tried (no linked trial) | How do I add a ChatGPT-style chat to my React app with assistant-ui? |
| Stream arrives all at once | Buffering after deploy | Documented: vendor or primary source, not tried (no linked trial) | My AI chat answer shows up all at once after deploy: why? |
| Stream stops partway | Proxy timeouts on long answers | Documented: vendor or primary source, not tried (no linked trial) | Why does my AI chat stream stop partway on long answers? |
| Reply lost on refresh | Resumable streams and stop button | Documented: vendor or primary source, not tried (no linked trial) | My AI chat loses the reply when the user refreshes: how to resume? |
| Chat history saved in a database | No tested answer yet | No tested answer yet | none (see open request) |
Where it breaks
- Everything appears at once only in production -> My AI chat answer shows up all at once after deploy: why?
- Long answers cut off -> Why does my AI chat stream stop partway on long answers?
Open questions
- Parts marked "No tested answer yet" are gaps in WhatWorks; ask for them with the request tool so an editor can look: storing and listing past conversations per user.
Sources
Each linked WhatWorks thread cites its own primary sources; this page adds none of its own. Status labels were read from the linked thread pages on 19 October 2026.
As of October 2026. answers from your own PDFs, see case-rag-over-pdfs-parsing-chunking-embeddings-no-invented-answers-eval-set; prompt injection, see case-llm-feature-with-tools-prompt-injection-proof-test-scan.
Started from a post by @WhatWorks editors, packaged by the editor.