Repository navigation
Next Release - #3875
Merged
Merged
Next Release#3875
Conversation
## π― Goal Fixes [#3860](#3860). Linear ticket: https://linear.app/stream/issue/RN-444/issues-with-chat-overlays-in-modals A chat rendered inside a native modal (for example a `react-navigation` `fullScreenModal`) needs its own `OverlayProvider`, because on iOS the root one is rendered in a different view controller, behind the modal. With a second `OverlayProvider` mounted, the message overlay of the root chat breaks once the modal is closed. Every `MessageOverlayHostLayer` shares two pieces of state. One is the shared value controller in `message-overlay-store.ts`. The other is the set of portal host names (`message-overlay`, `top-item`, `bottom-item` and the closing slots), which `react-native-teleport` keeps in a single native registry per process. In both cases the last registration wins, and unregistering removes the entry instead of restoring the previous one. After the modal's provider unmounted, the root provider was left without a controller and without registered hosts. This PR makes sure several `OverlayProvider`s mounted at the same time work, without changing the existing public API. ## π Implementation details - The shared value controller is now a stack. `registerOverlaySharedValueController` keeps its signature, and unregistering hands control back to the previously registered controller. It's pretty much the same "trick" used for the `PortalWhileClosingView` stack. - Every `OverlayProvider` creates an id and registers its `MessageOverlayHostLayer` on a host layer stack. The most recently mounted layer is the top one and owns the overlay. - A host layer that is not the top one stays mounted and treats the overlay as inactive, so it renders no backdrop, adds no back handler and never finalizes the close. It parks its portal hosts under names unique to it (`<name>:<layerId>`, closing slots included) and takes the shared names back once it becomes the top one again. The hosts are renamed instead of unmounted, because remounting them lets Fabric reuse a recycled `PortalHostView`, which might keep stale sizes. Of course we could work around this and still let stuff remount but it's also arguably breaking since we have configurable parts of the DOM tree in there (and those parts would start remounting rather than just rerendering). - A custom `MessageActions` renders its own hosts with the shared names, so only the top layer renders it. - `PortalWhileClosingView` reads the id of its provider from a new internal `OverlayHostLayerContext` and only measures and teleports while that provider is the top one. With a single `OverlayProvider` the stack has one entry and every code path should behave exactly as before. Note: This entire process is meant to solve specifically usecases like modals, which fire up their own `ModalViewController` instance and essentially break. Due to the limitations of refcounting providers in order to determine their ID, having something like 2 `OverlayProvider`s side by side would not really work (whichever one gets registered **later** wins). This fixable, but of course breaking as the api itself would have to be tied to a dedicated `OverlayProvider` (and could no longer be used from the direct exports). It is something I'll consider for V10, if there is time but otherwise we'll stick to this for the time being. ## π¨ UI Changes <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 / ## βοΈ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [x] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [x] SampleApp iOS and Android - [ ] Expo iOS and Android
## π― Goal
Since it would appear our MacOS CI runners are running a bit dry, we'll
stop running them on every branch commit with this PR.
They'll still run to deploy the sample apps to Testflight/Firebase
Distribution on commits to `develop`/`main` and we'll run them manually
on every branch when it's actually needed.
## π 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
oliverlaz
approved these changes
Oct 19, 2026
Contributor
SDK Size
|
Contributor
|
π This PR is included in version 9.10.1 π The release is available on:
Your semantic-release bot π¦π |
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