Redesign ts-react-chat: clean up UI and merge in ts-react-media (fal) example
Open
@jherr is already working on this.
Since Sep 17, 2026.
waiting-on: maintainer
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 331
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 160
Description
Background
The examples/ts-react-chat example has grown organically and the UX no longer reflects the SDK's structure well:
routes/index.tsxis 642 lines — the home page IS the chat, mixing landing/navigation with the chat surface.routes/server-fn-chat.tsxis a 113-line near-duplicate that exists only to demo wiringuseChatto a TanStack Start server function (added in #509). Same feature, different connection adapter.- The sidebar lists every generation type as a separate route (
generations.image,generations.speech,generations.audio,generations.transcription,generations.video,generations.summarize,generations.structured-output), making the example feel like a directory rather than a product. - Meanwhile,
examples/ts-react-mediais a separate, cleaner example that demonstrates fal image/video generation with a tabbed UI — but a new user has to discover it on its own.
Proposal
Redesign ts-react-chat so it works as a single, cohesive demo app:
1. Separate home from chat
- Home page becomes a real landing screen with a prominent "Start chatting" entry point + cards/links for the other demos.
- Move chat to a dedicated
/chatroute.
2. Collapse the server-fn duplicate
- Delete
routes/server-fn-chat.tsx. - On the chat page, expose connection mode (HTTP API route vs. server function) as a toggle/setting so users can see both wirings in one place.
3. Merge in ts-react-media
- Pull the fal-powered image/video generators from
examples/ts-react-mediaintots-react-chatso a single example covers chat + media generation end-to-end. - Keep the tabbed image/video UX from
ts-react-media; consolidate with the existinggenerations.image/generations.videoroutes (the existing ones use OpenAI; the media example uses fal — show both as provider options). - Once merged in, delete
examples/ts-react-media.
4. Sidebar / IA cleanup
- Group generations under a single "Media" section with provider tabs rather than one route per provider/type.
- Reduce visual noise; the current sidebar has ~10 entries.
Out of scope
- No changes to the SDK itself — example-only refactor.
- Other framework examples (
ts-solid-chat,ts-vue-chat,ts-svelte-chat) follow separately if this lands well.
Context
Discussed in #509 (server-functions PR) — defer the UX work so #509 stays focused on the SDK surface.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.