Repository navigation
Route Chat React / RN work by the installed SDK major, and update AI guidance - #97
Merged
Merged
Conversation
…guidance Chat SDK majors can change how an app reads state, lays out channels and threads, and configures the client. The stream-react and stream-react-native skills now pin the installed Chat major, read only that major's docs, and use the SDK's AI migration guides to detect and translate code from another major. The skills name no "current" major; the installed package and its docs decide. - Add stream-react/chat-versions.md and stream-react-native/references/CHAT-VERSIONS.md: pin the major (stream-chat range from the SDK's own package.json), use the versioned docs id or the site's v<major>/llms.txt, stop when no docs exist, find the migration guide for a pair through the SDK repo's ai-docs/, and read its old -> new reference before writing Chat code. - Make the routing in SKILL.md, RULES.md, migrate.md, DOCS.md, the blueprints and the Sendbird files version-agnostic; files compiled against a version say so. - AI: the components ship in the SDKs (stream-chat-react/ai-components, stream-chat-react-native/ai-components, stream-chat-expo/ai-components); the standalone @stream-io/chat-react-ai and @stream-io/chat-react-native-ai packages are deprecated. Drop guidance that only applied to them. - AI: add a Generative UI (A2UI, OpenUI) section to the React guide, and a docs-gated step to the RN guide.
oliverlaz
requested review from
MartinCupela,
martinmitrevski and
myandrienko
November 6, 2026 12:13
oliverlaz
added a commit
to GetStream/stream-chat-react
that referenced
this pull request
Nov 6, 2026
…takes a message (#3415) Ticket: https://linear.app/stream/issue/REACT-1307 ### 🎯 Goal The v14 -> v15 AI migration guide covered `channel.data.name` / `.image` moving under `custom`, but not the app's own fields on messages, users and members, nor `stream-chat` v10's `channel.sendMessage({ message })` request shape. Agents writing v15 code with the guide (via the Stream agent skills) put their own fields at the top level of an outgoing message, and called `channel.sendMessage({ text, custom })`. TypeScript catches the first only in an inline object literal; plain JS catches neither. ### 🛠 Implementation details `ai-docs/ai-migration-v14-v15.md`, 4 lines added, no other rows re-padded: - **Quick reference:** `channel.sendMessage({ text, priority })`, `message.priority`, a field set in `doSendMessageRequest` -> `channel.sendMessage({ message: { text, custom: { priority } } })`, `message.custom?.priority`, augment `CustomMessageData`. - **Breaks that do not fail to compile:** a field of the app's own reads `undefined`, or a field set on an outgoing message is not where the app reads it back. - **Section 17:** "Your own fields are custom data on every object", covering reads, writes, `sendMessage({ message })`, the send-handler form, typing through `Custom*Data`, filters, partial updates, and a link to stream-chat-js' [custom-data entry](https://github.com/GetStream/stream-chat-js/blob/release-v10/ai-docs/v10-breaking-changes.md#custom-data). Checked against `stream-chat` `release-v10`: `MessageRequest.custom?: CustomMessageData`, and `OperationParams<'send'>` carries `message?: MessageRequest`. Tested with subagents writing a v15 send handler and a generative-UI assistant from the guide: with this change they set `custom.client_tag` and call `sendMessage({ message: { ... } })`. Companion change in the agent skills: GetStream/agent-skills#97 ### 🎨 UI Changes None (docs only). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Expanded the v10 migration guide with quick-reference and runtime guidance for migrating custom fields on messages, users, members, reactions, attachments, and events. * Clarified that custom fields belong under `custom` for reads and writes, and that message sends use a nested `message` object. * Added notes on preserving custom fields in handlers and retries, plus how partial updates retain flat `set` and `unset` keys. * Added troubleshooting guidance for app-owned fields that are missing or read from the wrong location. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
myandrienko
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
stream-chat-reactv15 and Stream Chat React Native v10 (both onstream-chatv10) change how an app reads state, lays out channels and threads, and configures the client. The skills sent agents to the unversioned docs id, which is whichever major is "Latest", and the RN Chat blueprints (mandatory on every turn) are v9 code. In a baseline test on a v10 RN project, an agent detected10.0.0-rc.5but still wrote v9 code (ChannelList filters/sort, object sorts,<Channel thread threadList>) because the v9 docs were "the closest documented API".What changes
Version routing, without naming a "current" major
skills/stream-react/chat-versions.mdandskills/stream-react-native/references/CHAT-VERSIONS.md:stream-chatmust satisfy the SDK's ownstream-chatrange;chat-sdk/<sdk>/v<major>, or the site'sv<major>/llms.txtwhen the CLI doesn't list it), and stop if none exist;ai-docs/(GitHub API listing; the title names the pair; release branch for unreleased majors);SKILL.md,RULES.md,migrate.md,DOCS.md, the blueprints and the Sendbird files route through these files instead of naming v14/v15 or v9/v10. Files compiled against a specific version (Sendbird mapping, design cheat-sheet, RN blueprints) say so in their first lines.AI guidance
stream-chat-react/ai-components,stream-chat-react-native/ai-components,stream-chat-expo/ai-components. The standalone@stream-io/chat-react-aiand@stream-io/chat-react-native-aiare marked deprecated, with a pointer to the docs' migration sections; guidance that only applied to them is removed.Testing
Subagent runs (Sonnet) on small v15 React / v10 RN fixtures, before and after (no install, no type-check):
ChannelPaginator,<Thread thread>besideChannel,enableOfflineSupportonChatclient.config,custom.client_tagstream-chat-expo/ai-components, dictation via the Expo config plugin,StreamTheme; reports A2UI as unavailable on RNai-components+a2ui/openuientry points, pinned peers, one host, backend contract,sendMessage({ message })The React custom-field and
sendMessage({ message })fixes depend on a companion change to the v15 AI migration guide in GetStream/stream-chat-react: GetStream/stream-chat-react#3415claude plugin validate . --profile directory --strictpasses. All added text is ASCII; local links resolve.Known gaps