Audit react-navigation patches: remove redundant emoji patch, fix stale docs#94419
Conversation
…le docs - Remove fix-crash-when-parsing-emoji patch (Expensify#12679 already in core@7.16.1; patch only stripped String() coercion, not the upstream fix) - Remove stale getStateFromPath entry from details.md (file deleted Jun 2025) - Fix wrong Expensify#11887 upstream link on browser-history patch -> Expensify#12751/Expensify#12460 - Document v8 follow-ups (transitionEnd, inactiveBehavior, pushParams) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
…ify#71913 Removal is gated on migrating runAfterInteractions consumers to transitionEnd (works on v7 today), tracked in Expensify#71913 — v8 only forces it via the RN 0.82+ InteractionManager deprecation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # patches/react-navigation/details.md
|
@elirangoshen is it ready for c+ review? |
Yes |
|
I think the QA steps should be exactly the steps in #65709 WDYT? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-07-07.20-01-29.mp4Android: mWeb Chrome2026-07-06.19-55-03.mp4iOS: HybridAppiOS: mWeb Safari2026-07-06.19-58-28.mp4MacOS: Chrome / Safari2026-07-06.19-49-42.mp4 |
done |
|
Tests LGTM |
|
🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.4.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This addresses the internal callstack audit callstack-internal/expensify-issues#2632 — "Verify and update react-navigation's patches". A react-navigation maintainer (Satya164) flagged several of our custom patches in
patches/react-navigation/as possibly outdated. We audited every patch against upstream react-navigation. This PR lands the low-risk cleanup only; the v8-dependent migrations are documented inline as follow-ups and are intentionally not done here.Changes (2 files, +3/-30):
@react-navigation+core+7.16.1+002+fix-crash-when-parsing-emoji.patch. The emoji crash fix (upstream react-navigation PR #12679) is already shipped in the installed@react-navigation/core@7.16.1. The local patch's "before" line was already the fixed code; all the patch actually did was strip theString()wrapper (Array.from(String(value))→Array.from(value)), which is not the upstream fix and is a mild regression for non-string values. Removing it restores upstream's emoji-safe behavior on the next install.patches/react-navigation/details.md:getStateFromPath.patchentry — that patch file was deleted back in June 2025; only the doc entry survived.@react-navigation+native+7.1.33+001+initial.patch). It pointed to PR Web -Chat - Error message displayed when sending message from corrupted accounts #11887 (which is actually the InteractionManager PR — a copy-paste error); now corrected to PR #12751 (route.history+pushParams, which Satya added upstream for this exact use case) plus the originating issue #12460.runAfterInteractionsis widely used); v8 removes InteractionManager support, so consumers will move tonavigation.addListener('transitionEnd', ...).dontDetachScreenpatch with the v8inactiveBehaviorfollow-up.Follow-ups intentionally NOT in this PR (all require the React Navigation v8 upgrade, which is alpha-only and blocked on a react-native-screens rewrite):
pushParamsto shrink the browser-history patch.transitionEnd.dontDetachScreenwithinactiveBehavior.Fixed Issues
$#94997
PROPOSAL:
Tests
npm installand verifypatch-packageapplies the remaining react-navigation patches with no errors and without the removed emoji patch.patches/react-navigation/@react-navigation+core+7.16.1+002+fix-crash-when-parsing-emoji.patchno longer exists and is not referenced anywhere.patches/react-navigation/details.mdand verify: nogetStateFromPath.patchentry; the browser-history patch links to PR Update version to 1.2.28-0 on main #12751 / issue Add errors object back to menu item, remove unused isPolicy #12460; the InteractionManager anddontDetachScreenentries carry the v8 follow-up annotations.Offline tests
No offline-specific behavior is affected. This PR only removes a redundant build-time patch and updates patch documentation; there is no runtime, network, or data-layer change.
QA Steps
Verify the emoji-parsing crash from #65709 has not regressed after removing the patch. The real fix is upstream in the installed
@react-navigation/core@7.16.1(it encodes each path segment per code point viaArray.from, so emoji surrogate pairs are no longer split); the removed patch only stripped a redundantString()wrapper and did not provide the fix itself.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-06-24.at.15.30.53.mov
Screen.Recording.2026-06-24.at.15.32.23.mov