Commit Graph
38789 Commits
Author SHA1 Message Date
Nicola Cortiandmeta-codesync[bot] 69dc655005 RNGP - Fix build failures encounted with AGP 9.0.0-alpha05 - Round 1 (#53778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53778

I've been looking into the next major bump of AGP to 9:
https://developer.android.com/build/releases/agp-preview#android-gradle-plugin-built-in-kotlin

This change adapts our project so that it keeps on buildign with AGP 8
(as the bump to 9 would be a breaking change), but it addresses some of the build
failures we'll be having with AGP 9:

- Set `resValues` build option to true (default was changed true -> false in AGP 9)
- Opts out our project from `android.builtInKotlin` and `android.newDsl` for the time being.

Changelog:
[Android] [Fixed] - Fix build failures with RNGP due to AGP 9.0.0-alpha05

Reviewed By: alanleedev

Differential Revision: D82452555

fbshipit-source-id: 99561f039bf943f5ce99008ce073ca86431cfaed
2025-10-13 18:16:18 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] b44d4b4292 Add function to coordinate the headers preparation for the app (#53677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53677

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that runs `prepareHeaders` that configures the headers for React Native and Codegen targets.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778440

fbshipit-source-id: 26b973c07e82f30663e51c4a8e0e72f54765115e
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 2ea9fd6c86 Add function to generate artifact for codegen (#53676)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53676

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that generates codegen artifacts. Those are required by React Native and by the app to build properly.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778439

fbshipit-source-id: 7fe5cc0b612d2d9324d68fe04ec556e986ec14af
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 7a86ee0aef Add function to create hard links for the app (#53675)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53675

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that create hardlinks for React Native so it can build from source

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778454

fbshipit-source-id: 702a603629e4fad154b5d79dea6d96fcd80235b9
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] d45523639d Add function to set build from source to true (#53674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53674

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function updates the PAckage.swift file to set BUILD_FROM_SOURCE to true

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778460

fbshipit-source-id: b06ebc546aa8e87acdb15706a0559e9046173784
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 87d6043788 Add function to configure the app for swift by creating modulemap and umbrella header (#53673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53673

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that configure React Native to be swift compatible by creating the React-umbrella and modulemap

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778437

fbshipit-source-id: 8bfd0df3abed813a221e5ef7972f4b7a6e292e76
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] c827474b58 Configure Package.swift file to be able to build from source (#53667)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53667

This change updates the Package.swift file to enable building RNTester and HelloWorld from source.

The set of changes is the following:
- add a BUILD_FROM_SOURCE flag to toggle between building for creating prebuilds and building an app from source
- configure the proper header search path based on whether we want to build an app from source or not
- split the ReactFabricComponents target in multiple subtargets. This is required because when building from source we can't have targets whose Source folder is overlapping.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778452

fbshipit-source-id: 00553a9966e7d96177e70d45179e712536c23124
2025-10-13 15:36:36 -07:00
Devan Buggayandmeta-codesync[bot] f4e93df55e Add custom dimension provider to RCTDeviceInfo (#54107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54107

Adds a dimension provider override to RCTDeviceInfo.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D84131733

fbshipit-source-id: 2419bcb9a23486eee61f203414084d5105a091f8
2025-10-11 00:47:42 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 6f482708b5 Sync React 19.2 into React Native (#54109)
Summary:
X-link: https://github.com/facebook/metro/pull/1598

Pull Request resolved: https://github.com/facebook/react-native/pull/54109

This change syncs React 19.2 into React native.

bypass-github-export-checks
## Changelog
[General][Changed] - Bump React version to 19.2

Reviewed By: cortinico

Differential Revision: D84282848

fbshipit-source-id: 8bc57be1f39a913c284fb782883ce91fae6750fc
2025-10-10 11:44:06 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 2fe008b902 Add configure iOS prebuilds (hermes and dependencies) (#53671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53671

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that prepares the prebuilds for ios so we can leverage them when building from source

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778467

fbshipit-source-id: bacfcfd3d646bfa27dcd800417e4787308a51a86
2025-10-10 11:19:38 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] a1575d04ce Add function to run pod deintegrate (#53706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53706

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that runs `pod deintegrate` to remove remainings of cocoapods

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778468

fbshipit-source-id: 20e1cfefcef8318d63d4a6ff92050ced0f91ef53
2025-10-10 11:19:38 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] f0725f7802 Add script to find the directory that contains the Xcodeproj (#53669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53669

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that given the root of the app and the name of the xcodeproject file, can return the path to the Xcode project file

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778456

fbshipit-source-id: f7050bcb049d75a5b1cabf340a5b98f4736e60b3
2025-10-10 11:19:38 -07:00
Zeya Pengandmeta-codesync[bot] 53464e8483 make NativeAnimatedNodesManagerProvider owner of animationBackend (#54079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54079

## Changelog:

[Internal] [Changed] - make NativeAnimatedNodesManagerProvider owner of animationBackend

so NativeAnimatedNodesManager and NativeAnimatedNodesManagerProvider don't both keep a shared_ptr reference

Reviewed By: sammy-SC

Differential Revision: D83870762

fbshipit-source-id: e3d27f4a58830405196f728cbe5400364ba9f95b
2025-10-10 08:55:37 -07:00
Moti Zilbermanandmeta-codesync[bot] 487844e533 Android: Report fetch(), XHR and RCTNetworking call stacks to Network panel (#54084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54084

Android port of D83754145.

1. Teaches the native networking module on IOS to track a `devToolsRequestId` along with each request, and use it instead of the internal `requestId` to identify the request to `NetworkReporter`.
2. Uses `__NETWORK_REPORTER__.createDevToolsRequestId` (D83238216) to generate a `devToolsRequestId` from JS and pass it into native. This records a JavaScript call stack as the [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) of the request.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83981793

fbshipit-source-id: b4b8828433881c15e44a0468275a5cf398e7d050
2025-10-10 07:08:55 -07:00
Sam Zhouandmeta-codesync[bot] 5f5a77c342 Fix https://github.com/facebook/react-native/issues/54102 by wrapping the prettier mock in a try-catch (#54114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54114

This setup script will be published in the react-native package.
Other people might not have prettier installed, so it will crash the mock below.
Therefore, we wrap this mock in a try-catch.

Changelog: [General][Fixed] Fixed https://github.com/facebook/react-native/issues/54102

Reviewed By: cortinico

Differential Revision: D84292458

fbshipit-source-id: e884b02eec6abb7a964e01dd01f72f6e2ee31dab
2025-10-10 06:30:08 -07:00
aialokandmeta-codesync[bot] 118a6621f5 Updated copyright header from Facebook to Meta in yoga-config.cmake.in (#54087)
Summary:
Update the copyright header in packages/react-native/ReactCommon/yoga/cmake/yoga-config.cmake.in from
```
# Copyright (c) Facebook, Inc. and its affiliates.
```
 to
 ```
 # Copyright (c) Meta Platforms, Inc. and affiliates.
 ```
 for consistency with the rest of the codebase. This change does not affect functionality.

 close https://github.com/facebook/react-native/issues/54086

## Changelog:
[GENERAL] [CHANGED] - Updated copyright header in Yoga CMake file from Facebook to Meta.

Pull Request resolved: https://github.com/facebook/react-native/pull/54087

Test Plan: Tests Required: No

Reviewed By: robhogan

Differential Revision: D84101874

Pulled By: cortinico

fbshipit-source-id: 534fb700dcbb14d0e91c8c287e8a9af251cba4f9
2025-10-10 05:39:56 -07:00
Moti Zilbermanandmeta-codesync[bot] 30999b868c Deprecate NetworkingModule.sendRequestInternal (#54101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54101

Changelog:
[Android][Deprecated] Mark `NetworkingModule.sendRequestInternal` as deprecated

The `NetworkingModule.sendRequestInternal` method is an implementation detail of the `sendRequest` method and does not need to be public. In this diff, we mark it as deprecated ahead of removing it from the public API in a future release of React Native.

Reviewed By: javache

Differential Revision: D84250142

fbshipit-source-id: fad62eeae4f9bf06e00578b3cfb6c2c077c08e5c
2025-10-10 02:15:32 -07:00
Nick Lefeverandmeta-codesync[bot] e926ad0428 Allow overriding the horizontal scroll position restore (#54115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54115

Horizontal scroll view extensions should be able to  customize the scrolling behavior for state restores. This adds the `restoreScrollTo` function that will be called to restore the scroll position to the location provided by the shadow node state.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D84310601

fbshipit-source-id: 007caa3d0922a5430ffc6f970eebb180a112f894
2025-10-09 20:59:18 -07:00
Nick Lefeverandmeta-codesync[bot] 78bdf584e2 Enable scroll state restore for Trait::hidden (#54113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54113

With `Trait::hidden` unmounting and remounting views for shadow nodes holding scroll state, we have to restore the scroll position from the shadow node state when the scroll view is being remounted

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84291899

fbshipit-source-id: 596839f56757dbdf9485e82380af31a71865e1df
2025-10-09 19:40:45 -07:00
Nick Lefeverandmeta-codesync[bot] 8d245e9f61 Control trait::hidden support through feature flag (#54112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54112

This diff adds the possibility to control the use of `Trait::Hidden` on Android platforms through feature flags. The feature flag is Android specific and only accessed on Android platforms.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84289662

fbshipit-source-id: 0ee1d0702aa36df25c842017673176a9c7984b23
2025-10-09 19:40:45 -07:00
Zeya Pengandmeta-codesync[bot] d2eca58996 use processor flag -DRN_USE_ANIMATION_BACKEND to gate animation backend dep (#54091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54091

## Changelog:

[Internal] [Changed] - use processor flag -DRN_USE_ANIMATION_BACKEND to gate animation backend dep

So it's only enabled for catalyst and fantom when building with BUCK while gated from other meta apps, and enabled by default in oss version

Reviewed By: sammy-SC

Differential Revision: D84157729

fbshipit-source-id: e822f11c4b64b77b17a698bf3b60b5c5a4faf4f4
2025-10-09 19:01:20 -07:00
Pieter De Baetsandmeta-codesync[bot] e8988e9460 Remove RCTFBSystrace (#54097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54097

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84196086

fbshipit-source-id: b178b541224c6376bf78dc19fc9051bca4c46023
2025-10-09 18:56:15 -07:00
Pieter De Baetsandmeta-codesync[bot] 7787d2fbb5 Move RCTAnimatedModuleProvider to open-source (#54096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54096

Exporting this since we have some incoming changes to Animated which okwasniewski wants to make and should be applied to CxxAnimated too.

This is not hooked up to any OSS apps yet.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84200113

fbshipit-source-id: 7a278ebf3f9c2b0779971591804d3fbd89ce4723
2025-10-09 16:29:42 -07:00
David Vaccaandmeta-codesync[bot] e5e8e637db Delete LayoutDirectionUtil from fbsource
Summary:
LayoutDirectionUtil is part of legacy architecutre, in this diff I'm deleting it from fbsource

changelog: [internal] internal

Reviewed By: shwanton, cortinico

Differential Revision: D83984648

fbshipit-source-id: 161e4347ccab160fb1be66cba05f9474c0ad3b72
2025-10-09 14:49:30 -07:00
generatedunixname537391475639613andmeta-codesync[bot] e4da3437d9 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.kt (#54106)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54106

Reviewed By: javache

Differential Revision: D84130472

fbshipit-source-id: a1bfff89e0b6d36d2bcb3045a35ca15c6599f9d8
2025-10-09 14:41:55 -07:00
Zeya Pengandmeta-codesync[bot] 1e1af623b1 Defer to responder system to terminate on scroll (#54007)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54007

## Changelog:

[Android] [Changed] - Defer to responder system to terminate on scroll

when FeatureFlag responderTerminateOnScrollAndroid is turned on

on ios, we don't dispatch TouchCancel at scroll to terminate scrollview's children, instead, responder system handles responder termination when it receives onScroll event

Currently, TouchCancel native event at scroll will stop any ongoing touch events dispatched from native, and will unexpectedly terminate responder even if responder has transferred from child of scrollView to parent view, because of race condition. Fixing this will require revisiting a large part of the native touch system on android.

Reviewed By: sammy-SC

Differential Revision: D83584281

fbshipit-source-id: 10b3c98c30037b50f1705e11aa9ca016a6c3d974
2025-10-09 13:58:04 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 5abda9c7da Add env var to compile-out legacy arch (#53975)
Summary:
In this change, we are allowing users to install cocoapods with the RCT_REMOVE_LEGACY_ARCH flag enabled to compile out the legacy architecture.

For it to work, we had to adjust some part of the framework that we forgot about when working on the internal side of this feature.

bypass-github-export-checks

## Changelog:
[iOS][Added] - Added way to set the RCT_REMOVE_LEGACY_ARCH flag from Cocoapods to compile ou the legacy arch

Pull Request resolved: https://github.com/facebook/react-native/pull/53975

Test Plan:
Tested locally with RNTester and HelloWorld:

```
cd packages/rn-tester
RCT_REMOVE_LEGACY_ARCH=1 bundle exec pod install
open RNTesterPods.xcworkspace
```

Then build and run and verify that the app keeps running.

Same check with Hello World.

Reviewed By: cortinico

Differential Revision: D83471112

Pulled By: cipolleschi

fbshipit-source-id: e5c8fe4eccb3c25510228f20e9e6da3980b0bf0d
2025-10-09 11:27:33 -07:00
Eric Rozellandmeta-codesync[bot] 8cc9bbc892 Execute commands in order (#54074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54074

Currently, we dispatch view commands eagerly at the beginning of a batch. This behavior originated with https://github.com/facebook/react-native/commit/b54257c628b1a174a2c41960e7fc4d2d719ad731.

However, this can make it difficult to allow developers to control mount item execution order. For example, someone may want to make sure a view command is processed *after* a particular mount item, and not exclusively rely on retryable command exceptions.

This change sets up a feature flag to enable in-order execution of view command mount items.

## Changelog

[Internal]

Reviewed By: mdvacca, sammy-SC

Differential Revision: D84061054

fbshipit-source-id: 7cb68c43823ed67f541f4e8f2d7471629609a905
2025-10-08 21:19:30 -07:00
Devan Buggayandmeta-codesync[bot] e3a5af6a99 Re-land - Genalize focus/blur behavior in JS (#54085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54085

Re-land generalized focus/blur commands.

Changelog: [Internal]

Reviewed By: rozele, javache

Differential Revision: D84082783

fbshipit-source-id: 8c2ae87ad878f3cb95a6449f2bd6a80fe590d149
2025-10-08 20:31:00 -07:00
Moti Zilbermanandmeta-codesync[bot] 24d0d4414f Fix __DEBUGGER_SESSION_OBSERVER__ for concurrent sessions (#54083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54083

Changelog: [Internal]

Fixes a bug in `__DEBUGGER_SESSION_OBSERVER__` where the wrong state could be reported if more than one session existed. Now we reuse the accurate domain status tracking mechanism added in D83847356.

Reviewed By: hoxyq

Differential Revision: D84007326

fbshipit-source-id: e7f2c33286aa69c3bd9d5662d35dad579ca3c770
2025-10-08 17:40:25 -07:00
Moti Zilbermanandmeta-codesync[bot] 5c7cbebfee Refactor console API implementation to use tryExecuteSync for clarity (#54069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54069

Changelog: [Internal]

D83238216 added a `tryExecuteSync` function for use with `EnableExecutorFromThis` objects - concretely, for calling functions on  a `weak_ptr<RuntimeTarget>` from the JS thread while ensuring the `RuntimeTarget` is always destroyed on the inspector thread.

`tryExecuteSync` is a generalisation of the lambda-based `delegateExecutorSync` helper from `RuntimeTargetConsole`, so in this diff we refactor the latter to use the more general and better-documented function.

Reviewed By: huntie

Differential Revision: D83838062

fbshipit-source-id: 85fd5a43e204cc634b573e2a3bda47a9ec523fca
2025-10-08 17:38:42 -07:00
Moti Zilbermanandmeta-codesync[bot] 81d652543b iOS: Report fetch(), XHR and RCTNetworking call stacks to Network panel (#54052)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54052

1. Teaches the native networking module on IOS to track a `devToolsRequestId` along with each request, and use it instead of the internal `requestId` to identify the request to `NetworkReporter`.
2. Uses `__NETWORK_REPORTER__.createDevToolsRequestId` (D83238216) to generate a `devToolsRequestId` from JS and pass it into native. This records a JavaScript call stack as the [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) of the request.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83754145

fbshipit-source-id: ee08f419d2a7013bbc915ee40b1428d7810e6c42
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] aa685408a2 Check Network domain state in RuntimeTargetNetwork (#54082)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54082

Changelog: [Internal]

Followup from D83238216.

Adds bookkeeping in `RuntimeTarget` to allow checking from the JS thread whether there is a session with the `Network` CDP enabled. We then use this in the implementation of `__NETWORK_REPORTER__.createDevToolsRequestId` as a more precise alternative to checking the `NetworkHandler` singleton's state.

This is a first step towards breaking up the `NetworkHandler` singleton, subsuming its responsibilities into the Target/Agent architecture of `jsinspector-modern` and fixing a variety of bugs in the process.

NOTE: The additions to `RuntimeTarget` are more general than just tracking the `Network` domain - I'll use them in an upcoming diff to fix a concrete bug related to concurrent session support in `DebuggerSessionObserver`.

Reviewed By: huntie

Differential Revision: D83847356

fbshipit-source-id: 3384e3feb44adbd9ed4d54a20875669d63ae8764
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] a4be9b236f Add JS API for allocating network request IDs, capturing call stacks (#54051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54051

Adds the private, experimental `__NETWORK_REPORTER__.createDevToolsRequestId()` JavaScript method behind the Fusebox network inspection feature flag.

`createDevToolsRequestId()` returns a unique string ID for a network request, and records the current call stack as the request's [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator). If the native networking layer passes the same request ID into the C++ `NetworkReporter::reportRequestStart` method, the corresponding CDP [`requestWillBeSent`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#event-requestWillBeSent) event will contain the stack trace.

Changelog: [Internal]

Reviewed By: robhogan, huntie

Differential Revision: D83238216

fbshipit-source-id: 5076d887254cd9711f86f72792e791eabc43f297
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] d932f28209 Add generateRandomUuidString C++ helper (#54089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54089

Changelog: [Internal]

Adds a minimal standards-compliant UUID v4 generator to `react/utils` for use elsewhere in React Native. We don't need UUID parsing, support for UUID versions other than 4, a UUID value type, or extremely high performance - which makes inlining this simple, portable implementation directly in our codebase acceptable.

Reviewed By: robhogan

Differential Revision: D84149720

fbshipit-source-id: 399d88f4adaff3be4fef5dd1abab3c8552ca1a75
2025-10-08 15:26:25 -07:00
Nick Lefeverandmeta-codesync[bot] 9afd6bb2f4 Fix transformOrigin conversion ignoring unit type (#54092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54092

The `transformOrigin` conversion didn't call into the `toDynamic` conversion for the underlying `ValueUnit` instances for the x and y coordinates. This diff fixes the conversion so that percentages would be correctly converted.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D84165034

fbshipit-source-id: 40bf32a45770cd43fc67103f4c2e9785abffb033
2025-10-08 15:25:41 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 0e8065cfee xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.kt (#54094)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54094

Reviewed By: javache

Differential Revision: D83948964

fbshipit-source-id: 217a6dd51f44781961b1a6e22c6eb85e39346e2c
2025-10-08 14:25:20 -07:00
Phillip Panandmeta-codesync[bot] 0dcb939247 introduce response listener in native network (#54093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54093

Changelog: [Internal]

adding a private! api so we can parse text payloads

Reviewed By: mdvacca

Differential Revision: D83939903

fbshipit-source-id: 8f348648f16d53f2bd86046fb0c3689d7bae3d93
2025-10-08 13:03:32 -07:00
Zeya Pengandmeta-codesync[bot] 197783be1e create UIManagerAnimationBackend to replace forward declare class AnimationBackend (#54058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54058

## Changelog:

[Internal] [Changed] - create UIManagerAnimationBackend to replace forward declare `class AnimationBackend`

for other delegates in UIManager, we usually explicitly create an interface in UIManager package with the public APIs we want to expose, we can follow that pattern here, so we avoid the forward declaration without definition situation, and decoupling UIManager with AnimationBackend

also this way, in the future, animation runtimes that consume AnimationBackend can just include `UIManagerAnimationBackend` (where we expose all of public APIs of AnimationBackend) and remain somewhat decoupled too

Reviewed By: sammy-SC

Differential Revision: D83679693

fbshipit-source-id: e58d180b7d36a3f0e766c2914b16128346abe070
2025-10-08 12:51:23 -07:00
Moti Zilbermanandmeta-codesync[bot] 52b2c466c5 Support recording request initiator call stacks in NetworkHandler (#54050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54050

Changelog: [Internal]

A naive approach to keeping track of request initiators inside the `NetworkHandler` singleton for CDP reporting purposes:

1. Expose a new `recordRequestInitiatorStack` method.
2. Keep the CDP-formatted stack trace (as a `folly::dynamic`) in a map keyed by request ID.
3. Destructively consume the stack trace during `onRequestWillBeSent`.

Reviewed By: huntie

Differential Revision: D83754143

fbshipit-source-id: 4f5a335f2eed66a168f9d39a66c8af6ccee23d6f
2025-10-08 10:28:07 -07:00
Andrew Datsenkoandmeta-codesync[bot] 5b9873ff35 PlatformColor caching & invalidation (#54076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54076

Changelog: [Internal]
Add PlatformColor caching so we do not need to make as many JNI calls which helps with perf.

Reviewed By: javache

Differential Revision: D83050864

fbshipit-source-id: 56a53a5facccdbbb3ff18a66df9e07d794bb074c
2025-10-08 07:41:37 -07:00
Moti Zilbermanandmeta-codesync[bot] b31a2fb4b8 Add RuntimeTargetDelegate::serializeStackTrace API (#54048)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54048

Changelog: [Internal]

Adds an engine-agnostic mechanism for serialising a previously captured stack trace as a CDP [`Runtime.StackTrace`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Runtime#type-StackTrace). This complements the existing `RuntimeTargetDelegate::captureStackTrace` method, which returns an opaque, engine-specific representation of a stack trace.

This can be used as a building block for implementing higher-level CDP message types like [`Network.Initiator`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) within React Native, while keeping the underlying stack trace representation private to each engine.

NOTE: This diff includes an implementation for Hermes that duplicates logic from the Hermes codebase. Further up the stack, I have diffs to replace this with a new API to be provided by Hermes.

Reviewed By: huntie

Differential Revision: D83754142

fbshipit-source-id: 1439ea446665562e5f92c7b1dcb6ab65af1324cd
2025-10-08 05:51:42 -07:00
Gang Zhaoandmeta-codesync[bot] e32307e054 Revert deletion of old Hermes CDPHandler (#54078)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54078

Changelog:
[General][Fixed] 6e1c0a removed old Hermes CDPHandler, which is a
breaking change, revert here.

Reviewed By: cipolleschi

Differential Revision: D84076229

fbshipit-source-id: 7ac426178754d6320c1803a50d57afa10e3126e5
2025-10-07 19:39:29 -07:00
Nick Lefeverandmeta-codesync[bot] 31bff4e093 Restore scroll state of horizontal scroll view on mount (#54001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54001

This diff adds support for state restore to the horizontal scroll view. The same logic was applied as for the vertical scroll view. The only difference being that the shadow node for the horizontal scroll view needed to be updated to add `ScrollState`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83247017

fbshipit-source-id: 7c26901df4c43ed70addc7b6d8afb9a6d3e549a8
2025-10-07 19:20:15 -07:00
Nick Lefeverandmeta-codesync[bot] 2bbea50991 Restore scroll state of scroll view on mount (#54000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54000

Update the scroll view manager to load the fabric state and restore the scroll position and scroll away top padding on mount. Restoring the scroll view happens in the react scroll view state setter, which gets called by the `ReactScrollViewHelper` with the deserialized state provided on mount.

The state loading will happen only until the scroll view itself submits a new state to Fabric (due to scrolling). This guarantees that we only restore the initial state on mount.

This diff also updates the scroll away top padding setter to support setting a new value without triggering a fabric state update.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83247016

fbshipit-source-id: 7ae44b9f69c58da9e5163574073767aea2713b62
2025-10-07 19:20:15 -07:00
Nick Lefeverandmeta-codesync[bot] aa85da33a5 Support loading and assigning scroll state from scroll view helper (#53999)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53999

Update the `ScrollViewHelper` class to support reading the scroll state from the provided `stateWrapper` and assigning it to the view implementing the `HasScrollState` interface.

This will be used in a future diff to implement scroll state loading on the scroll view component in the scroll state setter function. This enables having one implementation of the state loading for all variants of the scroll view (vertical and horizontal scroll views).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D83247018

fbshipit-source-id: 44f10edab2341981b85d6ab8b83c7bea96c1e09d
2025-10-07 19:20:15 -07:00
Vitali Zaidmanandmeta-codesync[bot] aa492fadab combine all 0.82.0 changelog entries (#54088)
Test Plan:
## Changelog: [INTERNAL]

Pull Request resolved: https://github.com/facebook/react-native/pull/54088
Imported from GitHub, without a `Test Plan:` line.

Reviewed By: fabriziocucci

Differential Revision: D84105761

Pulled By: vzaidman

fbshipit-source-id: 0f3ad014f04b02d91cbb2fb7951d7a57d27df963
2025-10-07 17:10:02 -07:00
Zeya Pengandmeta-codesync[bot] 4740f211ae Extract helper function from AnimatedColor.js to process input color value (#54077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54077

## Changelog:

[Internal] [Changed] - Extract helper function from AnimatedColor.js to process input color value

Reviewed By: rozele

Differential Revision: D84062952

fbshipit-source-id: 2005dc33d7fd6928ba2638d0d99a2e5faa8448d8
2025-10-07 15:39:32 -07:00
Zeya Pengandmeta-codesync[bot] 9e98c72ad3 Move using declarations into AnimationBackend class (#54057)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54057

## Changelog:

[General] [Changed] - Move using declarations into AnimationBackend class

names like `facebook::react::Callback` is a bit too generic and it'll be included in the scope whenever AnimationBackend.h is included in; `StartOnRenderCallback` already exists in c++ native animated (there we also nest the `using`s under class)

Reviewed By: sammy-SC

Differential Revision: D83867098

fbshipit-source-id: a50144bbbd1b441e3ef7b2884a19b091c3190c44
2025-10-07 14:34:25 -07:00
Zeya Pengandmeta-codesync[bot] 4a88282a9c create feature flag responderTerminateOnScrollAndroid (#54008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54008

## Changelog:

[Internal] [Added] - create feature flag responderTerminateOnScrollAndroid

Reviewed By: javache

Differential Revision: D83584280

fbshipit-source-id: aa9633d61c0d2cc6af7da839c065f20da698995b
2025-10-07 12:39:55 -07:00