Merged
Conversation
## 🎯 Goal I missed that iOS and Android have a difference in border mirroring in RTL mode, and only fixed the message reply border for iOS, and not for Android. ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes Before - border is positioned incorrectly on Android: <img width="720" height="1600" alt="Screenshot_20260415_101603_Chat Sample React Native (1)" src="https://github.com/user-attachments/assets/7800c4ea-36b6-4f54-b721-5db1c8447a2a" /> After - Android: <img width="720" height="1600" alt="Screenshot_20260416_172414_Chat Sample React Native" src="https://github.com/user-attachments/assets/8aee0697-728b-43ca-87df-cf9abc3d4555" /> <img width="720" height="1600" alt="Screenshot_20260416_172517_Chat Sample React Native" src="https://github.com/user-attachments/assets/42e39dd2-cf7f-4002-a220-4b0db3288f6e" /> iOS - unchanged: <img width="399" height="801" alt="Screenshot 2026-04-16 at 17 26 36" src="https://github.com/user-attachments/assets/787c665d-5e74-4b09-ab37-5be8f739440e" /> <img width="392" height="794" alt="Screenshot 2026-04-16 at 17 27 02" src="https://github.com/user-attachments/assets/99e50da0-53c3-41e3-b718-951c204a4097" /> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android
…3556) ## Summary Two small V9 cleanups that finish incomplete refactors. ### 1. Remove dead `MessageMenu` component `MessageMenu` was left in the v9 public surface but the overlay path no longer renders it. The source file carried an explicit `// TODO: V9: Either remove this or refactor it, as its logic is offloaded to other components now` note from the original author. Customers who customized `MessageMenu` in v8 had an override that silently no-op'd in v9 — a type error is more helpful. - Deletes `package/src/components/MessageMenu/MessageMenu.tsx` - Drops the `MessageMenu` import + `DEFAULT_COMPONENTS` entry in `defaultComponents.ts` - Drops the `./MessageMenu/MessageMenu` re-export from the components barrel - The surrounding `MessageMenu/` folder stays — `MessageActionList`, `MessageActionListItem`, `MessageReactionPicker`, and `MessageUserReactions` are the live replacements and remain overridable via `WithComponents`. ### 2. Finish `useAudioPlayerControl` → `useAudioPlayer` rename The v9 docs already document `useAudioPlayerControl → useAudioPlayer`, and `src/hooks/useAudioPlayer.ts` was added. But the barrel still exported `useAudioPlayerControl` from the byte-identical older file, so the rename never actually shipped. Internal callers (`AudioAttachment`, `AudioRecordingPreview`) were already importing the new name directly — only the barrel was stale. - `src/hooks/index.ts` barrel now exports `./useAudioPlayer` - `src/hooks/useAudioPlayerControl.ts` deleted (byte-identical duplicate) - No internal call sites needed updating — they already used the new name ## Test plan - [x] `yarn tsc --noEmit` — passes - [x] `TZ=UTC yarn jest src/components/MessageMenu/__tests__/` — 30/30 tests pass - [ ] Smoke test: mount sample app, long-press a message to open the overlay, confirm reactions + actions render (unchanged behavior; MessageMenu wasn't rendering anyway) - [ ] Smoke test: play back an audio attachment (exercises `useAudioPlayer`) ## Related docs updates The v8→v9 human migration guide needs follow-up edits in `docs-content` (separate PR) to reflect: - `MessageMenu` removed (not "still exported but inert") - `useAudioPlayerControl → useAudioPlayer` is now a real rename
## Summary Adds `ai-docs/ai-migration.md` — a compact, machine-friendly v8 → v9 migration reference built for AI coding agents (Claude Code, Cursor, Copilot, etc.). The human-oriented v8 → v9 guide at https://getstream.io/chat/docs/sdk/react-native/basics/upgrading-from-v8/ is ~40k tokens. Loading it wholesale eats most of an agent's context window before any code work begins. This sibling doc is ~4k tokens (5× smaller) — prose rationale stripped, rename tables/decision rules/source pointers kept. Customers point their agent at the raw GitHub URL. It is **not** shipped in the npm package. ### Key agent-oriented features - **§0 primer** tells agents not to trust training data for v9 symbols (their cutoff predates v9) and names the correct `node_modules` path — the installed package is `stream-chat-react-native-core`, not `stream-chat-react-native` (which is the bare-RN wrapper). - **§1 detection greps** let agents scope the work with a single `rg` pass and skip sections whose patterns don't match the customer codebase. - **§3 big-3 structural migrations** enforce ordering: `WithComponents`, 5 component renames, inverted audio semantics — done first because many leaf renames evaporate after the big moves. - **§6 behavior changes** captures runtime-semantic shifts that aren't pure renames (`messageContentOrder` default swap, `deletedMessagesVisibilityType` removal, swipe-to-reply boundary, `MessageActionType.type` field, etc.). - **§7 JSON rename block** is the full v8 → v9 symbol map in a single parseable block for programmatic find/replace. - **§9 verification workflow** gives agents a hard gate: `rg` + `tsc` commands that must come back clean before the agent declares done. ### Stacked on #3556 This PR targets `refactor/v9-finish-message-menu-and-audio-hook` so the guide can accurately claim `useAudioPlayer` is the v9 hook name and `MessageMenu` is removed. GitHub will auto-retarget to `develop` when #3556 merges. ## Test plan - [x] Verified every v9 symbol in the guide resolves in `package/src/` - [x] Verified every `node_modules/` path referenced exists under `package/src/` - [x] Verified every `rg` pattern is syntactically valid (no exit-2 from ripgrep) - [x] Confirmed all "removed" claims in the JSON block are genuinely absent from v9 source (only i18n translation keys and stale JSDoc comments mention them) - [ ] Dogfood check: paste the raw URL into Claude Code on a fresh v8 example app and have it migrate ## Related docs updates Human migration guide edits (correcting the MessageMenu and AudioAttachment claims that this agent guide is also correcting) are a separate PR in the `docs-content` repo.
## 🎯 Goal
This PR introduces a `MessageOverlayWrapper` component so that
integrations can pick which part of the `Message` they want to move to
the contextual menu. The component handles all bookkeeping on its own
and makes sure that a single measurement source (target) is active at a
time.
It comes paired with a `messageOverlayTargetId` for the simple purpose
of performance (self registration would work as well here, however I did
notice that sometimes 2 layout passes had to be done before registration
could be finished, in order for the other portals to unmount - causing a
nasty remount on the first render and so this guards against that).
Usage:
```
import { MessageContent as DefaultMessageContent } from 'stream-chat-react-native';
// ...
const OverlayTargetedMessageContent = (
props: React.ComponentProps<typeof DefaultMessageContent>,
) => (
<MessageOverlayWrapper targetId='message-content'>
<DefaultMessageContent {...props} />
</MessageOverlayWrapper>
);
// ...
<WithComponents overrides={{ MessageContent: OverlayTargetedMessageContent }}>
<Channel
{...otherProps}
messageOverlayTargetId='message-content'
>
{/* channel children */}
</Channel>
</WithComponents>
```
## 🛠 Implementation details
<!-- Provide a description of the implementation -->
## 🎨 UI Changes
<!-- Add relevant screenshots -->
<details>
<summary>iOS</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
<details>
<summary>Android</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
## 🧪 Testing
<!-- Explain how this change can be tested (or why it can't be tested)
-->
## ☑️ Checklist
- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [ ] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
- [ ] SampleApp iOS and Android
- [ ] Expo iOS and Android
## 🎯 Goal
<!-- Describe why we are making this change -->
## 🛠 Implementation details
<!-- Provide a description of the implementation -->
## 🎨 UI Changes
<!-- Add relevant screenshots -->
<details>
<summary>iOS</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
<details>
<summary>Android</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
## 🧪 Testing
<!-- Explain how this change can be tested (or why it can't be tested)
-->
## ☑️ Checklist
- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [ ] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
- [ ] SampleApp iOS and Android
- [ ] Expo iOS and Android
Contributor
SDK Size
|
Next releasesv9.0.19.0.1 (2026-04-17)
sampleapp@v4.10.14.10.1 (2026-04-17)
|
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.
🎯 Goal
🛠 Implementation details
🎨 UI Changes
iOS
Android
🧪 Testing
☑️ Checklist
developbranch