From 1ef3f51f07f092bb8397687c21253e3dc7864419 Mon Sep 17 00:00:00 2001 From: Dylan Audius Date: Thu, 8 Oct 2026 01:28:12 -0700 Subject: [PATCH 1/2] fix(mobile): stop recycling the Lottie Fabric view lottie-react-native 7.3.4 keeps autoPlay, loop and the loaded animation on the native container when Fabric recycles the view, while _props goes back to defaults. The play bar's buffering spinner unmounts after the first play, its recycled view keeps playing, and its onAnimationFinish reaches AnimatedButton, which dispatches pause. Opt the component view out of recycling. lottie-react-native is nested under packages/mobile/node_modules, so the patch is applied from that workspace. Co-Authored-By: Claude Opus 5.5 --- .../lottie-react-native+7.3.4.patch | 18 ++++++++++++++++++ scripts/patch-package.sh | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 packages/mobile/workspace-patches/lottie-react-native+7.3.4.patch diff --git a/packages/mobile/workspace-patches/lottie-react-native+7.3.4.patch b/packages/mobile/workspace-patches/lottie-react-native+7.3.4.patch new file mode 100644 index 00000000000..d8084e211b7 --- /dev/null +++ b/packages/mobile/workspace-patches/lottie-react-native+7.3.4.patch @@ -0,0 +1,18 @@ +diff --git a/node_modules/lottie-react-native/ios/Fabric/LottieAnimationViewComponentView.mm b/node_modules/lottie-react-native/ios/Fabric/LottieAnimationViewComponentView.mm +index de8b545..095ab4c 100644 +--- a/node_modules/lottie-react-native/ios/Fabric/LottieAnimationViewComponentView.mm ++++ b/node_modules/lottie-react-native/ios/Fabric/LottieAnimationViewComponentView.mm +@@ -40,6 +40,13 @@ using namespace facebook::react; + + #pragma mark - RCTComponentViewProtocol + ++// The container keeps autoPlay/loop and the loaded animation across recycling, ++// while _props resets to defaults, so a recycled view can autoplay. +++ (BOOL)shouldBeRecycled ++{ ++ return NO; ++} ++ + + (ComponentDescriptorProvider)componentDescriptorProvider + { + return concreteComponentDescriptorProvider(); diff --git a/scripts/patch-package.sh b/scripts/patch-package.sh index 0d35e39341f..4d021acfe34 100755 --- a/scripts/patch-package.sh +++ b/scripts/patch-package.sh @@ -5,3 +5,5 @@ npx patch-package --error-on-fail npx patch-package --patch-dir=packages/mobile/patches --error-on-fail npx patch-package --patch-dir=packages/web/patches --error-on-fail npx patch-package --patch-dir=packages/identity-service/patches --error-on-fail +# Packages that npm nests under packages/mobile/node_modules +(cd packages/mobile && npx patch-package --patch-dir=workspace-patches --error-on-fail) From fedf1e1baa60375d78f6bf8bfd43e4574d33df88 Mon Sep 17 00:00:00 2001 From: Dylan Audius Date: Thu, 8 Oct 2026 01:30:00 -0700 Subject: [PATCH 2/2] fix(mobile): bump react-native-svg to 15.15.1 15.15.0 (#2802) makes every SVG element push its bounds into a Fabric state update from drawRect (updateShadowNodeMetrics). Each update is a ShadowTree commit, and with Reanimated's commit hook each commit clones the tree and re-applies animated props, which redraws the SVGs and loops. On a static profile this kept the JS thread at ~150% CPU on the new architecture. 15.15.1 reverts it (software-mansion/react-native-svg#2832, Co-Authored-By: Claude Opus 5.5 --- package-lock.json | 8 ++++---- packages/mobile/ios/Podfile.lock | 4 ++-- packages/mobile/package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dc3cb6b3b4..00d634147b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -119262,7 +119262,7 @@ "react-native-safe-area-context": "^5.2.0", "react-native-screens": "^4.10.0", "react-native-share": "12.2.1", - "react-native-svg": "^15.11.2", + "react-native-svg": "^15.15.1", "react-native-svg-transformer": "1.5.0", "react-native-tab-view": "4.3.2", "react-native-track-player": "4.1.2", @@ -121165,9 +121165,9 @@ } }, "packages/mobile/node_modules/react-native-svg": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.15.0.tgz", - "integrity": "sha512-/Wx6F/IZ88B/GcF88bK8K7ZseJDYt+7WGaiggyzLvTowChQ8BM5idmcd4pK+6QJP6a6DmzL2sfOMukFUn/NArg==", + "version": "15.15.1", + "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-15.15.1.tgz", + "integrity": "sha512-ZUD1xwc3Hwo4cOmOLumjJVoc7lEf9oQFlHnLmgccLC19fNm6LVEdtB+Cnip6gEi0PG3wfvVzskViEtrySQP8Fw==", "license": "MIT", "dependencies": { "css-select": "^5.1.0", diff --git a/packages/mobile/ios/Podfile.lock b/packages/mobile/ios/Podfile.lock index 8ac1210a8e4..e5cbed6f059 100644 --- a/packages/mobile/ios/Podfile.lock +++ b/packages/mobile/ios/Podfile.lock @@ -3095,7 +3095,7 @@ PODS: - ReactCommon/turbomodule/core - SocketRocket - Yoga - - RNSVG (15.15.0): + - RNSVG (15.15.1): - React-Core - RNZipArchive (7.0.1): - React-Core @@ -3675,7 +3675,7 @@ SPEC CHECKSUMS: RNReanimated: 0bbb3008a808d475acdfc88db0ce80b15a3d2e33 RNScreens: 1bc0ddb1a9c8dcc6f95afb87a3d038e3169a2f9e RNShare: 0f53dddbcd178ef1c05d20ae0f4ad1a704aa5e38 - RNSVG: 05e418b8bff7c0c6e2aa5a0f87a856e8110ef4cb + RNSVG: 7bdea1843c44c59b3725b2217589d17d41461a56 RNZipArchive: 7bb4c70d6aa2dd235212c0a4a3de0a4e237e2569 snap-kit-react-native: 751006199818fccb38c8a01196495167bc25e9fb SnapSDK: 1e68aad748e080f49e3802559b3b76026666ef62 diff --git a/packages/mobile/package.json b/packages/mobile/package.json index 37b0f326909..aa9e297d6c9 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -146,7 +146,7 @@ "react-native-safe-area-context": "^5.2.0", "react-native-screens": "^4.10.0", "react-native-share": "12.2.1", - "react-native-svg": "^15.11.2", + "react-native-svg": "^15.15.1", "react-native-svg-transformer": "1.5.0", "react-native-tab-view": "4.3.2", "react-native-track-player": "4.1.2",