## 🎯 Goal
This PR adds RN `0.86`/Expo 57 compatibility to the SDK.
Since the RN team [fixed
`measureInWindow`](https://reactnative.dev/blog/2026/06/11/react-native-0.86#edge-to-edge-on-android)
in the latest release, the `insets.top` correction that we applied
before is no longer needed and is harming us on these versions. So that
we retain backwards compatibility, we'll still keep this behaviour on
older versions of React Native while keeping it for anything above
`0.86`.
Note: I'd like to shed some light on [this
change](https://github.com/GetStream/stream-chat-react-native/pull/3741/changes/e8729a4a027cb081aca44102c833c5b28fbe7208),
because I just spent the better part of the last 4 hours debugging why
all of the offline tests were failing on CI and not locally.
So why disable journaling/fsync in the offline-support DB mock?
The offline support suite backs its mocked SQLite with a real file based
`better-sqlite3` DB and each test does `~2,000 write` ops (the
connection sync persists 10 channels' full state, so messages, members,
reads, reactions). With `SQLite's` default `synchronous=FULL`, every
write does an `fsync: ~1ms` on a local SSD but ~40ms on a CI runner's
slower disk. That's `~2,000 × 40ms ≈ 80s` of DB work per test against a
5s Jest timeout, so the suite passed locally but timed out on CI.
`journal_mode = MEMORY + synchronous = OFF` keeps writes off the disk
(test DBs need no durability, we roll a new DB for each iteration
anyway), cutting per write cost to sub millisecond and the suite back to
`~1–2s`, comfortably under the timeout.
And as to why this happened with this PR ? I have no clue. I assume it's
something related to upgrading the testing ecosystem (the jest preset at
least) to a higher react version or something else I'm missing
triggering this. I've sort of seen it happen once or twice before as
well, but it was generally treated as a fluke (whereas now I did about
~30 failed test runs, including reruns of course). Fun times.
## 🛠 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