Commit Graph
38249 Commits
Author SHA1 Message Date
Devmate BotandFacebook GitHub Bot 948b47ace9 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.kt
Reviewed By: javache

Differential Revision: D80604116
2025-08-20 05:39:05 -07:00
Rubén NorteandFacebook GitHub Bot 9910981d3a Simplify RendererImplementation (#53351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53351

Changelog: [internal]

This refactors `RendererImplementation` to reduce boilerplate code from exporting existing methods from Fabric or Paper.

Reviewed By: lenaic

Differential Revision: D80532479

fbshipit-source-id: ae70bb50f0d2fbf7aee95efd39d9716f0c3a8a90
2025-08-20 03:53:44 -07:00
Nivaldo BondançaandFacebook GitHub Bot d1a1020a4a Codemod format for trailing commas change
Reviewed By: VladimirMakaev

Differential Revision: D80576929

fbshipit-source-id: 1310f77f5d9d489b780b14875454ebda7f7adfc9
2025-08-19 18:15:18 -07:00
David VaccaandFacebook GitHub Bot fb84932e48 Deprecate ReactInstanceManager and ReactInstanceManagerBuilder (#53150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53150

ReactInstanceManager and ReactInstanceManagerBuilder are legacy architecture classes that will be deleted in the future, in this diff we are deprecating them

changelog: [Android][Changed] Deprecate legacy architecture classes ReactInstanceManager and ReactInstanceManagerBuilder, these classes will be deleted in a future release

Reviewed By: mlord93

Differential Revision: D79677828

fbshipit-source-id: 2d79736d94a55e44dd24056985f358e3650ddf6c
2025-08-19 16:51:43 -07:00
Alex HuntandFacebook GitHub Bot 3f848e7a54 Fix test setup for flag used early in HostTarget, restore value (#53355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53355

Follows D80000286, where this flag was forcibly disabled to fix tests.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D80545210

fbshipit-source-id: 585122ff73e4979c398be6eb03000936d6bd5ce1
2025-08-19 11:40:24 -07:00
Alex HuntandFacebook GitHub Bot df748ba083 Implement Perf Monitor event scoring and display timeout (#53169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53169

Improves the experimental Perf Monitor UI sufficient for the initial MVP.

- Sets minimum duration threshold to display an event to 10ms.
- Impelements [responsiveness scoring](https://web.dev/articles/inp#good-score) linked to UI colour and display timeout.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D79359131

fbshipit-source-id: f08d2b595e885342d841c3a02b9e02456502c926
2025-08-19 11:19:09 -07:00
generatedunixname89002005287564andFacebook GitHub Bot defefb19e3 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages (#53352)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53352

Reviewed By: cipolleschi

Differential Revision: D80516836

fbshipit-source-id: 28d10e5d1b9d476924c8e73526e164ff98e12be1
2025-08-19 09:53:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ba51aeaa90 Fix Switch layout with iOS26 (#53247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53247

Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements.
This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823).

The `<Switch>` component was using hardcoded values for its size.
This change fixes the problem by:
- Using codegen for interface only
- Implementing a custom Sadow Node to ask the platform for the Switch measurements
- Updating the JS layout to wrap the size around the native component.

## Changelog:

[iOS][Fixed] - Fix Switch layout to work with iOS26

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

Test Plan:
Tested locally with RNTester.

| iOS Version | Before | After |
| --- | --- | --- |
| < iOS 26 | https://github.com/user-attachments/assets/91d73ea3-30ba-4a5c-948e-ea5c63aa7c6d | https://github.com/user-attachments/assets/76061bc8-0f14-412a-a8fb-d1c3951772e6 |
| >= iOS 26 | https://github.com/user-attachments/assets/1abc477f-bc0a-4762-938e-98814fb2a054 | https://github.com/user-attachments/assets/77e562e1-b803-46ac-9cf6-102f062a1cd4 |

Rollback Plan:

Reviewed By: sammy-SC

Differential Revision: D79653120

Pulled By: cipolleschi

fbshipit-source-id: d99b353b7b7b5496b148779de4abe3e57dd38156
2025-08-19 06:53:44 -07:00
Rubén NorteandFacebook GitHub Bot 24657ad5c4 Optimize DOM APIs (#53332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53332

Changelog: [internal]

This implements several optimizations to speed up DOM traversal APIs.

The main changes are:
1. Better caching of renderer methods in `RendererImplementation`.
2. Faster access to public instances from instance handles (avoids `instanceof` checks if the nodes are `ReactNativeElement`, which is the most common case).
3. Avoiding unnecessary function calls in `NativeDOM` but removing the proxy object.
4. Removal of private fields from `HTMLCollection` and `NodeList`, and reuse the object to define object properties.
5. Avoiding unnecessary array copies in `getChildNodes`.

Results:

| Property / method               | Latency before (ns) | Latency after (ns) | Difference |
| ----------------------- | ------------------------- | ------------------------ | ---------- |
| parentNode              | 3996                      | 2203                     | -44.87%   |
| parentElement           | 4347                      | 2524                     | -41.94%   |
| childNodes              | 6590                      | 3886                     | -41.03%   |
| children                | 6950                      | 4126                     | -40.63%   |
| firstChild              | 5008                      | 2975                     | -40.60%   |
| firstElementChild       | 5408                      | 3215                     | -40.55%   |
| lastChild               | 5048                      | 2974                     | -41.09%   |
| lastElementChild        | 5448                      | 3215                     | -40.99%   |
| childElementCount       | 5378                      | 3175                     | -40.96%   |
| previousSibling         | 12118                     | 6780                     | -44.05%   |
| previousElementSibling  | 12148                     | 6850                     | -43.61%   |
| nextSibling             | 12139                     | 6800                     | -43.98%   |
| nextElementSibling      | 12119                     | 6830                     | -43.64%   |
| offsetParent            | 5097                      | 3725                     | -26.92%   |
| isConnected             | 2774                      | 1733                     | -37.53%   |
| ownerDocument           | 691                       | 681                      | -1.45%    |
| getRootNode()           | 3195                      | 2154                     | -32.58%   |
| hasChildNodes()         | 4997                      | 2854                     | -42.89%   |

Reviewed By: mdvacca

Differential Revision: D80449030

fbshipit-source-id: 6b3abecbbf6aa23bc99ab65cf22ed33721dc5459
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot b7b83cda0a Remove nullability from NativeDOM.setNativeProps (#53331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53331

Changelog: [internal]

This change was shipped 3 months ago so we can assume the native method will always have this method and don't need to keep backwards compatibility.

Reviewed By: rshest

Differential Revision: D80449031

fbshipit-source-id: 4ff11b81478701ad712b4e097625e569829f6480
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot 9301badec1 Remove nullability from NativePerformance module methods (#53330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53330

Changelog: [internal]

These methods have been defined for a month, so it's safe to make then non-nullable already.

Reviewed By: GijsWeterings

Differential Revision: D80453413

fbshipit-source-id: 3fde076622dc9d510bad144300364401f2319507
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot 14718b20c6 Prepare Flow types for change in HostInstance (#53318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53318

Changelog: [internal]

This prepares the codebase for an eventual migration of `HostInstance` to `ReactNativeElement`, so the actual migration doesn't need to adjust so much existing code.

Reviewed By: rshest

Differential Revision: D80399739

fbshipit-source-id: 441d3e92ef6dff253343d1058b2027698e8ecb22
2025-08-19 06:06:35 -07:00
Andrew DatsenkoandFacebook GitHub Bot e7d89fa53a Add support for perfetto on Windows tracing (#53340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53340

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D80471173

fbshipit-source-id: 54f24c9c6868dae2042d324c8aed87726ede05a8
2025-08-19 05:38:12 -07:00
Samuel SuslaandFacebook GitHub Bot 8197399e43 ship fix to a crash in differentiator (#53346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53346

changelog: [internal]

ship fix for a rare crash in differentiator.

Reviewed By: rshest

Differential Revision: D80459923

fbshipit-source-id: 308f513fca4787a01250ba25d8ce73db84fa83a5
2025-08-19 04:39:04 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 4a48364639 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt (#53348)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53348

Reviewed By: cortinico, rshest

Differential Revision: D80443954

fbshipit-source-id: 4a45508aa0249b86adc96b1ebd62f2e409b3aac2
2025-08-19 04:31:16 -07:00
Christian FalchandFacebook GitHub Bot e3adf47214 fixed copying bundles correctly (#53325)
Summary:
When copying bundle files from the platform folders in the .build output, the script had a bug where all bundles were copied - meaning that only the last one would be in the resulting xcframework output.

This caused an issue when we tried to publish an app built with precompiled binaries to AppStore where the field `CFBundleSupportedPlatforms` was wrong and caused the submission to be rejected. This was caused by the script copying the wrong bundle file into the final xcframework outputs.

This issue is described here:
https://github.com/react-native-community/discussions-and-proposals/discussions/923#discussioncomment-14089245

This commit fixes the above error by using the iOS 15 `vtool` to show the actual platform for a given framework and then making sure we don't copy bundles in the wrong way.

Testing this on my local machine for iOS/iOS-simulator/MacOS/catalyst yields the following results (before/after this fix):

**Before:**

```bash
Copying bundles to the framework...
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
```

  **After:**

```bash
  Copying bundles to the framework...
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
```

## Changelog:

[IOS] [FIXED] - Fixed copying bundles correctly to xcframeworks when precompiling ReactNativeDependencies.xcframework

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

Test Plan: Ensure that the info.plist files in the nightlies for the ReactNativeDepdendencies.xcframework has the correct bundles for its targets.

Reviewed By: andrewdacenko

Differential Revision: D80457335

Pulled By: cipolleschi

fbshipit-source-id: aeb4166f66218f72bdd29b6fc579fcc7b6d12844
2025-08-19 02:47:40 -07:00
Nicola CortiandFacebook GitHub Bot 59cc1738d7 Add missing headers from react_performance_cdpmetrics to prefab (#53304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53304

The headers from `react_performance_cdpmetrics` are currently missing in the libreactnative.so prefab.

They're actually references from `Scheduler.h` and this is causing `react-native-screens` to fail compiling
with:

```
  In file included from /tmp/RNApp/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:3:
  /home/runner/.gradle/caches/8.14.3/transforms/97716233b9aa00728d9cac038eecaf3d/transformed/react-android-0.82.0-nightly-20250815-41029d8e9-SNAPSHOT-debug/prefab/modules/reactnative/include/react/renderer/scheduler/Scheduler.h:13:10: fatal error: 'react/performance/cdpmetrics/CdpMetricsReporter.h' file not found
     13 | #include <react/performance/cdpmetrics/CdpMetricsReporter.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  [4/6] Building CXX object CMakeFiles/rnscreens.dir/tmp/RNApp/node_modules/react-native-screens/cpp/RNSScreenRemovalListener.cpp.o
  [5/6] Building CXX object CMakeFiles/rnscreens.dir/src/main/cpp/OnLoad.cpp.o
```

See here https://github.com/react-native-community/nightly-tests/actions/runs/16991637594/job/48172255960
I saw this was added on D78904748

Here I'm exposing the headers from `react_performance_cdpmetrics` to the prefab API so users in OSS can
access those headers as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80344762

fbshipit-source-id: 29b09b94370b71a16ecf12d4cca9cd571c588e5c
2025-08-19 02:34:22 -07:00
Marco WangandFacebook GitHub Bot 8351a5d186 Pre-Suppress errors for xplat/js for general strict comparison in non-generated files (#53342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53342

Commands

```
scripts/flow/tool add-comments --comment 'Error discovered during Constant Condition roll out. See https://fburl.com/workplace/4oq3zi07.' .
```
```
arc f
```

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D80487235

fbshipit-source-id: 9e7c1a2641ddc0da0400fa1aff598b112a0434d5
2025-08-19 01:09:22 -07:00
Luna WeiandFacebook GitHub Bot 25104de5c4 Return ScrollView clipping rect (#53289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53289

Changelog: [Internal] - Support subview clipping for VirtualView

Reviewed By: yungsters

Differential Revision: D80145954

fbshipit-source-id: f7886440c4aecd8d50141e78f1050e94c2d7230a
2025-08-18 13:59:47 -07:00
Luna WeiandFacebook GitHub Bot 21008c9992 Dispatch mode changes on onSizeChanged (#53339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53339

Changelog: [Internal] - onSizeChanged can be called independent of onLayoutChange. Right now this hasn't affeced anything because VirtualViews are visible by default.

Reviewed By: yungsters

Differential Revision: D80357397

fbshipit-source-id: 06b174791dec0d19da6bbe1a8144d35b93b8f6c1
2025-08-18 13:59:47 -07:00
Alex HuntandFacebook GitHub Bot bda85b8244 Bump Electron to 37.2.6 (#53337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53337

Bump for security update.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D80462100

fbshipit-source-id: 4dff6b17337e031321d6549c86ca2cecec742acc
2025-08-18 13:19:47 -07:00
Devan BuggayandFacebook GitHub Bot 32d37f03ad Long press back to open DevMenu (#53189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53189

In addition to the menu button and long pressing fast forward option, adds long pressing back as an option to open DevTools for devices like the Chromecast remote.

Changelog:
[Android][Added] - Add long-press back as an option to open the DevMenu for devices that lack menu & fast-forward.

{F1981060943}

Reviewed By: alanleedev

Differential Revision: D79923779

fbshipit-source-id: b758d591ebe3b8e601dbf704212123451e3c32e1
2025-08-18 12:18:59 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 1d4c9f96e4 Fix CQS signal readability-static-definition-in-anonymous-namespace in xplat/js/react-native-github/packages (#53327)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53327

Reviewed By: rshest

Differential Revision: D80441223

fbshipit-source-id: 0d4dc19a5e0a2c1babf20a4a46aeb88950d0d5b9
2025-08-18 11:49:03 -07:00
Devan BuggayandFacebook GitHub Bot b1642ad5b6 Scope HighContrastText to correct Settings namespace (#53219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53219

`ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED_CONSTANT` is a `Secure` setting, not a `Global` one:

See fbandroid/java/com/facebook/fbreact/libraries/accessibilityinfosync/ReactAccessibilityInfoSync.kt

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D77977362

fbshipit-source-id: 2268e2fd8b966a02bcfac67e21b5c23cc76a3b95
2025-08-18 11:14:29 -07:00
Nivaldo BondançaandFacebook GitHub Bot 2b190f2029 Codemod format for trailing commas incoming change [300/n] (#53338)
Summary:
X-link: https://github.com/facebook/yoga/pull/1848

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

Adding trailing commas to folders:
- xplat/js/react-native-github/packages/react-native
- xplat/kotlin/ast_tools/core/src
- xplat/kotlin_compiler_plugins/template/src/main
- xplat/kotlin/kotlin_multiplatform_template/src/commonMain
- xplat/libraries/bloks/bloks-debugging/src
- xplat/libraries/bloks/bloks-lispy/src
- xplat/libraries/bloks/bloks-step-debugger/src
- xplat/mdv/uifiddle-prototype/android-server/playground
- xplat/mdv/uifiddle-prototype/android-server/server
- xplat/oxygen/common/src/test
- xplat/oxygen/mpts/src/main
- xplat/oxygen/mpts/src/test
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaAccessoryTest
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaWearableSDKSampleApp
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaWearableSDK
- xplat/prototypes/smartglasses/AndroidStudioProjects/Voice
- xplat/ReactNative/react-native-cxx/react/renderer
- xplat/rtc/media/tools/audio
- xplat/security/prodsec/android/codetransparency
- xplat/security/prodsec/siggy/java
- xplat/simplesql/codegen/java/com
- xplat/sonar/android/plugins/jetpack-compose
- xplat/sonar/android/plugins/leakcanary2
- xplat/sonar/android/plugins/litho
- xplat/sonar/android/plugins/retrofit2-protobuf
- xplat/sonar/android/sample/src
- xplat/sonar/android/src/facebook

Reviewed By: dtolnay

Differential Revision: D80452590

fbshipit-source-id: 2bc79edba21e913f6121a25a269c1a4258f5f31c
2025-08-18 10:24:50 -07:00
Devan BuggayandFacebook GitHub Bot 775daf5972 Remove "bridgeless" from React Native Dev Menu (#53336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53336

No longer needed as bridgeless is enabled everywhere.

Changelog:
[iOS][Deprecated] Remove bridge mode title and description from React Native Dev Menu title

Reviewed By: christophpurrer

Differential Revision: D80457504

fbshipit-source-id: bf21e44ed925f4777d0190313c6e4aad774abe42
2025-08-18 10:22:12 -07:00
Devan BuggayandFacebook GitHub Bot 1c838f32a9 Remove "bridgeless" from React Native Dev Menu (#53335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53335

No longer needed as bridgeless is enabled everywhere.

Changelog:
[Android][Deprecated] Remove bridge mode string from React Native Dev Menu title

Reviewed By: christophpurrer

Differential Revision: D80457625

fbshipit-source-id: 4cf602a90f29d5495a5e8a4ccaf49abb96e85f94
2025-08-18 10:22:12 -07:00
Devan BuggayandFacebook GitHub Bot 635c707eec Wire through landingView parameter (#52947)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52947

Wires up a `landingView` parameter to be passed to rn_fusebox.html that we can use to focus an arbitrary view on launch. Used from the new perf analyze scenario to open devtools on the performance panel.

Changelog:
[Android][Added] - Adds a landing view parameter to opening RNDT, enabling arbitrary view focus on launch.

Reviewed By: hoxyq

Differential Revision: D79329081

fbshipit-source-id: b1513a803f4add803100cebd08f53e59a08e64d4
2025-08-18 10:20:43 -07:00
Sam ZhouandFacebook GitHub Bot cf664c65e2 Standardize subtyping error code into incompatible-type in react native and metro (#53312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
2025-08-18 09:04:31 -07:00
Rubén NorteandFacebook GitHub Bot ffac8f8ef0 Add benchmark for traversal methods in ReactNativeElement (#53329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53329

Changelog: [internal]

This adds an initial set of benchmarks for the traversal methods in the DOM API.

Baseline:

| (index) | Task name                | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ------------------------ | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                   | '366.76 ± 0.26%' | '351.00 ± 10.00' | '2766891 ± 0.08%'      | '2849003 ± 83548'      | 50000   |
| 1       | 'parentNode'             | '4158.1 ± 0.08%' | '4126.0 ± 50.00' | '241467 ± 0.04%'       | '242365 ± 2913'        | 50000   |
| 2       | 'parentElement'          | '4372.6 ± 0.08%' | '4336.0 ± 51.00' | '229603 ± 0.04%'       | '230627 ± 2690'        | 50000   |
| 3       | 'childNodes'             | '6698.5 ± 1.17%' | '6550.0 ± 71.00' | '151718 ± 0.04%'       | '152672 ± 1673'        | 50000   |
| 4       | 'children'               | '7134.4 ± 0.70%' | '6980.0 ± 80.00' | '141984 ± 0.05%'       | '143266 ± 1643'        | 50000   |
| 5       | 'firstChild'             | '5141.7 ± 1.29%' | '5038.0 ± 70.00' | '197249 ± 0.04%'       | '198491 ± 2720'        | 50000   |
| 6       | 'firstElementChild'      | '5508.1 ± 0.90%' | '5408.0 ± 70.00' | '183835 ± 0.04%'       | '184911 ± 2425'        | 50000   |
| 7       | 'lastChild'              | '5121.7 ± 0.93%' | '5038.0 ± 70.00' | '197432 ± 0.04%'       | '198491 ± 2720'        | 50000   |
| 8       | 'lastElementChild'       | '5519.5 ± 1.17%' | '5409.0 ± 71.00' | '183799 ± 0.04%'       | '184877 ± 2459'        | 50000   |
| 9       | 'childElementCount'      | '5492.0 ± 1.41%' | '5369.0 ± 69.00' | '185136 ± 0.04%'       | '186254 ± 2363'        | 50000   |
| 10      | 'previousSibling'        | '12558 ± 0.61%'  | '12059 ± 101.00' | '80927 ± 0.08%'        | '82926 ± 700'          | 50000   |
| 11      | 'previousElementSibling' | '12246 ± 0.74%'  | '12059 ± 101.00' | '82377 ± 0.03%'        | '82926 ± 700'          | 50000   |
| 12      | 'nextSibling'            | '12170 ± 0.44%'  | '12028 ± 91.00'  | '82707 ± 0.03%'        | '83139 ± 627'          | 50000   |
| 13      | 'nextElementSibling'     | '12213 ± 0.67%'  | '12048 ± 100.00' | '82543 ± 0.03%'        | '83001 ± 683'          | 50000   |
| 14      | 'offsetParent'           | '5197.5 ± 0.85%' | '5138.0 ± 60.00' | '193768 ± 0.04%'       | '194628 ± 2300'        | 50000   |
| 15      | 'isConnected'            | '2857.8 ± 2.84%' | '2794.0 ± 41.00' | '356463 ± 0.04%'       | '357910 ± 5198'        | 50000   |
| 16      | 'ownerDocument'          | '714.65 ± 0.15%' | '711.00 ± 20.00' | '1407540 ± 0.04%'      | '1406470 ± 40350'      | 50000   |
| 17      | 'getRootNode()'          | '3297.7 ± 2.26%' | '3235.0 ± 50.00' | '307892 ± 0.04%'       | '309119 ± 4853'        | 50000   |
| 18      | 'hasChildNodes()'        | '5005.9 ± 0.85%' | '4898.0 ± 61.00' | '202735 ± 0.05%'       | '204165 ± 2575'        | 50000   |

Reviewed By: andrewdacenko

Differential Revision: D80449032

fbshipit-source-id: c9e72a5144b0664dae776101fe18899203b9735b
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 2726c1ab7c Make benchmark for ReactFabricPublicInstance more accurate (#53319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53319

Changelog: [internal]

We have a microbenchmark for `ReactFabricHostComponent` vs. `ReactNativeElement` but the test code itself is so fast that a big part of its duration is just calling the test function (a noop is 300-500ns, while the duration of these benchmarks is between 800 and 1400ns).

Note that this affects all tests the same way, so the absolute difference in execution time in both tests was still accurate.

This changes how we execute the benchmarks so the test function runs the code under test multiple times and we then report the average of all the runs using the new `overriddenDuration` option.

Before:

| (index) | Task name                  | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                     | '353.83 ± 0.03%' | '350.00 ± 10.00' | '2856842 ± 0.01%'      | '2857143 ± 84034'      | 2826221 |
| 1       | 'ReactNativeElement'       | '1393.8 ± 1.15%' | '1332.0 ± 20.00' | '745853 ± 0.01%'       | '750751 ± 11444'       | 717480  |
| 2       | 'ReactFabricHostComponent' | '884.92 ± 0.59%' | '871.00 ± 21.00' | '1144283 ± 0.01%'      | '1148106 ± 27029'      | 1130046 |

After:

| (index) | Task name                  | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                     | '400.11 ± 0.30%' | '391.00 ± 10.00' | '2532882 ± 0.07%'      | '2557545 ± 67127'      | 50000   |
| 1       | 'ReactNativeElement'       | '868.04 ± 0.04%' | '859.39 ± 4.41'  | '1153974 ± 0.03%'      | '1163616 ± 6002'       | 50000   |
| 2       | 'ReactFabricHostComponent' | '388.79 ± 0.08%' | '384.18 ± 1.91'  | '2579763 ± 0.03%'      | '2602947 ± 13006'      | 50000   |

Reviewed By: rshest

Differential Revision: D80404122

fbshipit-source-id: 7dc6ad34b2e8aa3cb6d62008f97d1c44e325ab27
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 6b4af382c2 Apply better default options in benchmarks (#53320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53320

Changelog: [internal]

This improves the defaults the options related to minimum number of iterations and test duration in benchmarks.

If you indicate a minimum duration, we set the minimum number of iterations so the duration is honored. We do the same if what's specified is the number of iterations.

This is useful when you want to make sure all the tests in a benchmark suite use the same number of iterations without having to explicitly set the time to 0 in all of them.

It also changes the default for warmup iterations to be just 1 (that's enough to load all modules and all the code into memory).

Reviewed By: rshest

Differential Revision: D80405287

fbshipit-source-id: 41a61c4d1979db6a25dd30f0c84b5de319416885
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 219fc99e99 Rename minDuration as minTestExecutionTime for clarity (#53321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53321

Changelog: [internal]

Just a rename to make it easier to understand.

Reviewed By: rshest

Differential Revision: D80404378

fbshipit-source-id: 3d7e89797be3b92599e07b4b64d2a720756a4f3b
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 6c37b5b682 Improve typing of benchmark functions (#53322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53322

Changelog: [internal]

This changes the types for benchmark functions to improve safety:
1. It makes the return object be an object instead of an interface, to catch when `overriddenDuration` is misspelled.
2. It makes the function always synchronous, as asynchronous tests aren't supported in Fantom (even though they are in `tinybench`).

Reviewed By: rshest

Differential Revision: D80404121

fbshipit-source-id: c0e2fb9f67174432f50e31c399f5b10cfe098ae6
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 180996683b Print information about benchmark duration (#53323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53323

Changelog: [internal]

This just makes it easier to understand when the benchmark itself has started running and how long the benchmark itself took to run.

Reviewed By: rshest

Differential Revision: D80400268

fbshipit-source-id: b447c4c389d563f7b2b1cbe82822d5d3a93272da
2025-08-18 08:57:52 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 47a9a2b44f Fix recording for Maestro E2E tests on iOS (#53333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53333

As per title, the recordings of iOS E2E tests are broken because we are creating a file that contains the js engine in the name, but we are trying to store a file without the js engine in the name.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D80454067

fbshipit-source-id: e4eee86793eb36f9ec9643cba7b65de75e30cbe7
2025-08-18 08:18:03 -07:00
Jakub PiaseckiandFacebook GitHub Bot 686d14f1d1 Enable enableFontScaleChangesUpdatingLayout by default (#53324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53324

Changelog: [General][Changed] - Enabled `enableFontScaleChangesUpdatingLayout` feature flag by default

Reviewed By: cipolleschi

Differential Revision: D80452649

fbshipit-source-id: da4d19068036340855569f5fd555121bf646bbca
2025-08-18 07:34:56 -07:00
SimekandFacebook GitHub Bot f9b1b2eb1d Workspace: deduplicate lock after recent bumps (#53244)
Summary:
Run `update-lock` script to use `yarn-deduplicate` tool to collocate and reduce the amount of dependencies fetched when working with a workspace.

## Changelog:

[INTERNAL] Deduplicate workspace lock after recent bumps

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

Test Plan: Running `yarn build`, `yarn prettier`, `yarn lint-ci`, `yarn test-ci` and `yarn flow-check` does not yield any errors.

Reviewed By: rshest, cortinico

Differential Revision: D80170594

Pulled By: robhogan

fbshipit-source-id: 5cbbde832539e89cb3b9937eacf03215942bc237
2025-08-18 06:14:32 -07:00
Rubén NorteandFacebook GitHub Bot e5c05ccbc1 Migrate LogBox Fantom test to use new document APIs (#53269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53269

Changelog: [internal]

Just a small refactor of the tests for LogBox to take advantage of the new `document.getElementById` API in RN.

Reviewed By: rshest

Differential Revision: D69528892

fbshipit-source-id: 807f03364e260baa9c3a94cfb1831b7eb24e0d26
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot a902267563 Implement ReactNativeDocument.prototype.getElementById (#53270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53270

Changelog: [internal]

(Marked as internal because the DOM APIs haven't been released yet).

This implements `getElementById` in the DOM document API.

Reviewed By: rshest

Differential Revision: D69307133

fbshipit-source-id: 0c1454ae42fad92cddc705877b26052e887185bd
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot d55bbfedff Do not reference DOM types in public API for VirtualView (#53272)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53272

Changelog: [internal]

`VirtualView` has been exposed as an unstable API in the `react-native` package but its public API is referencing the DOM APIs, which forces their definitions to also be public (but shouldn't because they haven't been released yet).

This replaces the reference with a reference to `HostInstance`, which will be updated to reference the DOM APIs when ready.

Reviewed By: yungsters

Differential Revision: D80254442

fbshipit-source-id: 254779c97c116ba08b6cc0c185906617ffd1269f
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot f9a49e5c56 Improve performance of performance.mark, performance.measure and console.timeStamp while tracing with RNDT (#53295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53295

Changelog: [internal]

This refactors `PerformanceTracer` to use an intermediate representation for trace events instead of the format expected by Chrome, which improves performance by removing the need to create `folly::dynamic` objects when enqueueing entries (that's moved to the trace processing stage).

`performance.mark` and `performance.measure` are only slightly improved because we still need to synchronously create `folly::dynamic` objects when enqueueing entries because we need to get the data from JSI.

I made the existing benchmark for the Performance API accurately measure the performance while tracing by forcing enabling the inspector in Fantom and setting the `tracingAtomic_` value to `true`.

## Highlights

* `console.timeStamp` (defaults): 1002ns → 580ns (**-42%**)
* `console.timeStamp` (all options): 1552ns → 821ns (**-47%**)
* `performance.mark` (with custom startTime): 2203ns → 2074ns (-5.8%)
* `performance.measure` (with start and end timestamps): 2474ns → 2283ns (-7.7%)

## Full results

### When inspector not used (in "production") (**same before and after**)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '1864.5 ± 7.22%' | '1773.0 ± 29.00' | '559978 ± 0.04%'       | '564016 ± 9077'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '1780.0 ± 4.31%' | '1723.0 ± 30.00' | '577496 ± 0.04%'       | '580383 ± 9932'        | 50000   |
| 2       | 'measure (default)'                                       | '1906.0 ± 3.87%' | '1852.0 ± 29.00' | '537780 ± 0.04%'       | '539957 ± 8590'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '1986.3 ± 3.25%' | '1933.0 ± 30.00' | '514216 ± 0.04%'       | '517331 ± 7906'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2208.7 ± 4.72%' | '2103.0 ± 40.00' | '471058 ± 0.05%'       | '475511 ± 8876'        | 50000   |
| 5       | 'clearMarks'                                              | '665.41 ± 0.17%' | '651.00 ± 20.00' | '1515507 ± 0.06%'      | '1536098 ± 48688'      | 50000   |
| 6       | 'clearMeasures'                                           | '745.87 ± 0.19%' | '721.00 ± 30.00' | '1356547 ± 0.07%'      | '1386963 ± 60215'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2223.9 ± 1.84%' | '2174.0 ± 39.00' | '456311 ± 0.04%'       | '459982 ± 8106'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2461.0 ± 2.85%' | '2374.0 ± 41.00' | '418624 ± 0.04%'       | '421230 ± 7403'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '2466.5 ± 3.36%' | '2384.0 ± 50.00' | '416618 ± 0.04%'       | '419463 ± 8986'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '395.25 ± 0.25%' | '391.00 ± 20.00' | '2554687 ± 0.06%'      | '2557545 ± 137873'     | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '426.06 ± 0.23%' | '421.00 ± 20.00' | '2369918 ± 0.06%'      | '2375297 ± 118469'     | 50000   |

### When tracing (before)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '2456.2 ± 6.45%' | '2254.0 ± 41.00' | '432571 ± 0.09%'       | '443656 ± 8220'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '2354.7 ± 3.39%' | '2203.0 ± 41.00' | '443719 ± 0.09%'       | '453926 ± 8394'        | 50000   |
| 2       | 'measure (default)'                                       | '2661.5 ± 3.30%' | '2414.0 ± 50.00' | '399165 ± 0.11%'       | '414250 ± 8762'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '2679.1 ± 1.61%' | '2474.0 ± 41.00' | '389798 ± 0.11%'       | '404204 ± 6811'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2850.0 ± 0.99%' | '2644.0 ± 60.00' | '364185 ± 0.11%'       | '378215 ± 8392'        | 50000   |
| 5       | 'clearMarks'                                              | '687.71 ± 0.43%' | '671.00 ± 20.00' | '1479109 ± 0.05%'      | '1490313 ± 43135'      | 50000   |
| 6       | 'clearMeasures'                                           | '702.69 ± 0.34%' | '691.00 ± 20.00' | '1440497 ± 0.05%'      | '1447178 ± 40708'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2865.4 ± 1.96%' | '2694.0 ± 50.00' | '363008 ± 0.09%'       | '371195 ± 7020'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '3076.2 ± 1.19%' | '2855.0 ± 51.00' | '337615 ± 0.10%'       | '350263 ± 6371'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '3087.4 ± 0.88%' | '2894.0 ± 60.00' | '334838 ± 0.10%'       | '345543 ± 7316'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '1203.9 ± 0.60%' | '1002.0 ± 29.00' | '930592 ± 0.18%'       | '998004 ± 28072'       | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '1885.7 ± 0.44%' | '1552.0 ± 50.00' | '582549 ± 0.20%'       | '644330 ± 21449'       | 50000   |

### When tracing (after)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '2336.9 ± 8.49%' | '2123.0 ± 41.00' | '458093 ± 0.10%'       | '471032 ± 9045'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '2229.0 ± 3.55%' | '2074.0 ± 41.00' | '467941 ± 0.10%'       | '482160 ± 9724'        | 50000   |
| 2       | 'measure (default)'                                       | '2367.5 ± 1.85%' | '2233.0 ± 41.00' | '435994 ± 0.09%'       | '447828 ± 8168'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '2427.0 ± 2.38%' | '2283.0 ± 39.00' | '426361 ± 0.09%'       | '438020 ± 7542'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2560.9 ± 0.18%' | '2453.0 ± 50.00' | '397989 ± 0.09%'       | '407664 ± 8309'        | 50000   |
| 5       | 'clearMarks'                                              | '677.59 ± 0.20%' | '671.00 ± 20.00' | '1488235 ± 0.05%'      | '1490313 ± 45785'      | 50000   |
| 6       | 'clearMeasures'                                           | '682.91 ± 0.19%' | '671.00 ± 20.00' | '1476825 ± 0.05%'      | '1490313 ± 43135'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2665.7 ± 1.31%' | '2524.0 ± 50.00' | '386476 ± 0.09%'       | '396197 ± 7696'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2855.4 ± 2.22%' | '2684.0 ± 41.00' | '363742 ± 0.09%'       | '372578 ± 5780'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '2808.1 ± 0.16%' | '2704.0 ± 50.00' | '361794 ± 0.08%'       | '369822 ± 6967'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '656.87 ± 0.64%' | '580.00 ± 20.00' | '1669646 ± 0.15%'      | '1724138 ± 60244'      | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '914.16 ± 0.54%' | '821.00 ± 30.00' | '1173803 ± 0.14%'      | '1218027 ± 46196'      | 50000   |

Reviewed By: rshest

Differential Revision: D80263154

fbshipit-source-id: f9e67162a3911a939693fd872bab72a41bc2637f
2025-08-18 04:49:33 -07:00
Rubén NorteandFacebook GitHub Bot 55fa36173b Add benchmarks for console.timeStamp (#53294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53294

Changelog: [internal]

Just adding a benchmark for `console.timeStamp`, which in normal circumstances will just measure a no-op. We can force installing the inspector and simulate that we're profiling in Fantom to force `console.timeStamp` to go through the tracing paths for the benchmark.

Reviewed By: rshest

Differential Revision: D80272873

fbshipit-source-id: 1e404525bb3390b96fae982c543478a26535a393
2025-08-18 04:49:33 -07:00
Samuel SuslaandFacebook GitHub Bot 3a3e3b884c Move C++ Animated to ReactCommon (#53278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53278
changelog: [internal]

C++ Animated should be in ReactCommon, it is code shared across all platforms.

Reviewed By: christophpurrer, zeyap

Differential Revision: D80261447

fbshipit-source-id: 8ad5d0bb65c9b499b1d9f60fc8babef8d4d90078
2025-08-18 04:13:13 -07:00
Alex HuntandFacebook GitHub Bot 40ebcef183 Use taskEndTime to report either InteractionEntry or INP metric events (#53296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53296

Following D79894702, update `__chromium_devtools_metrics_reporter` to correctly differentiate `InteractionEntry` and `INP` metrics, based on synchronisation with start of paint.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D79898177

fbshipit-source-id: 92e805fc15b6c8bf3342f62914cca1b377b58397
2025-08-18 03:49:31 -07:00
YangJHandFacebook GitHub Bot 6caf2dfa38 refactor(react-native): fix condition (#53311)
Summary:
Fixed a typo in Performance.js where `measureName === 'string'` should be `typeof measureName === 'string'` for proper type checking.

## Changelog:

[GENERAL] [FIXED] - Fix typo in Performance.js type checking condition

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

Test Plan: The change fixes a logical error where the condition was comparing the variable value to the string 'string' instead of checking its type. This ensures proper type checking for `measureName` parameter.

Reviewed By: rshest

Differential Revision: D80403225

Pulled By: rubennorte

fbshipit-source-id: 134920b2f95e997007d41451a8f8ad5fb8592d73
2025-08-18 03:21:54 -07:00
George ZaharievandFacebook GitHub Bot c7591d9b40 Update hermes-parser and related packages in fbsource to 0.31.2 (#53313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53313

Bump hermes-parser and related packages to [0.31.2](https://github.com/facebook/hermes/blob/static_h/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D80408745

fbshipit-source-id: 38aff450c0e44db23624f4769f1c7856440fb785
2025-08-17 21:45:53 -07:00
Marco WangandFacebook GitHub Bot 0e6b94f4ab Deploy 0.279.0 to xplat (#53308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53308

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80365942

fbshipit-source-id: 097eee50914f1d14391ada61c7e4176c4a70779e
2025-08-15 17:29:05 -07:00
Christoph PurrerandFacebook GitHub Bot 9f2fbc23e4 Fix memory leak in TestCallInvoker (#53287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53287

Changelog: [General][Fixed] Fix memory leak in TestCallInvoker

This fixes leaks in TestCallInvoker holding onto the jsi::Runtime

Reviewed By: lenaic

Differential Revision: D80295420

fbshipit-source-id: b14368ccfa86b3bf24b1f84613ec07931bd71a43
2025-08-15 11:43:41 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot c23e84ae9f Factor out "common props" testing and add testID test for Text (#53292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53292

# Changelog:
[Internal] -

Adds a `testID` test for the Text component, by means of extracting and reusing already existing one for Image.

Reviewed By: andrewdacenko

Differential Revision: D80332473

fbshipit-source-id: 8e8bc2eae12f5f340817f3788f320aad3a6fff45
2025-08-15 09:35:44 -07:00