Skip to content

Route Chat React / RN work by the installed SDK major, and update AI guidance - #97

Merged
oliverlaz merged 1 commit into
mainfrom
skills/chat-sdk-major-routing
Nov 6, 2026
Merged

oliverlaz merged 1 commit into
mainfrom
skills/chat-sdk-major-routing

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Why

stream-chat-react v15 and Stream Chat React Native v10 (both on stream-chat v10) 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 detected 10.0.0-rc.5 but 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

  • New skills/stream-react/chat-versions.md and skills/stream-react-native/references/CHAT-VERSIONS.md:
    • pin the installed major; the installed stream-chat must satisfy the SDK's own stream-chat range;
    • read only that major's docs (chat-sdk/<sdk>/v<major>, or the site's v<major>/llms.txt when the CLI doesn't list it), and stop if none exist;
    • find the AI migration guide for a pair through the SDK repo's ai-docs/ (GitHub API listing; the title names the pair; release branch for unreleased majors);
    • read the guide's old -> new reference and its list of changes that still compile before writing Chat code.
  • 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

  • The AI 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 are marked deprecated, with a pointer to the docs' migration sections; guidance that only applied to them is removed.
  • React: new "Generative UI: A2UI and OpenUI" section (renderer entry points, pinned peer versions, telling the model what the app can show, the backend moving UI into the message field, one host per conversation, untrusted UI, errors, theming).
  • RN: generative UI is docs-gated; RN has no renderer today, so the skill says so instead of porting web code.

Testing

Subagent runs (Sonnet) on small v15 React / v10 RN fixtures, before and after (no install, no type-check):

Scenario Before After
RN v10: channel list, thread screen, offline v9 API throughout v10 manifest and quick start, ChannelPaginator, <Thread thread> beside Channel, enableOfflineSupport on Chat
React v15: archived list, header, send handler no v15 docs found, custom field at the top level v15 manifest only, slot layout, handler on client.config, custom.client_tag
RN v10: AI screen with dictation, A2UI - stream-chat-expo/ai-components, dictation via the Expo config plugin, StreamTheme; reports A2UI as unavailable on RN
React v15: AI view with A2UI / OpenUI - ai-components + a2ui / openui entry 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#3415

claude plugin validate . --profile directory --strict passes. All added text is ASCII; local links resolve.

Known gaps

  • Agents follow "read the guide's old -> new reference first" loosely when writing new code on a project already on the new major; the docs carried them in the tests.
  • The docs' upgrade pages don't link the AI migration guides; a link there would make the GitHub API discovery step unnecessary.

…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 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 -->
@oliverlaz
oliverlaz merged commit 8fee89a into main Nov 6, 2026
4 checks passed
@oliverlaz
oliverlaz deleted the skills/chat-sdk-major-routing branch November 6, 2026 14:24
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.

2 participants