Commit Graph
38503 Commits
Author SHA1 Message Date
CodemodService BotandFacebook GitHub Bot 59a8c9647d Fix CQS signal readability-isolate-declaration in xplat/js/react-native-github/packages
Reviewed By: javache

Differential Revision: D82197859
2025-09-12 02:00:09 -07:00
Zeya PengandFacebook GitHub Bot 54ebfafb21 ensure animatedNodes collection is only accessed on render thread (#53734)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53734

## Changelog:

[Internal] [Changed] - ensure animatedNodes collection is only accessed on render thread

now `createAnimatedNode` can be called async from js thread (since https://github.com/facebook/react-native/pull/53476), `animatedNodes_` will be written on both threads, there was no proper locking mechanism for read

we can simply add locks wherever we read/write animatedNodes_; but there's way to use fewer locking - since AnimatedNode is created async, but will not be R/W async anywhere else, we can add a new collection to temporarily hold nodes created async and flush it on render thread

Reviewed By: lenaic

Differential Revision: D82119554

fbshipit-source-id: 7f29e9e046cdf2e233c548442d70f1ff5b931cdd
2025-09-11 20:29:00 -07:00
Yury DymovandFacebook GitHub Bot a7dc5051d3 React Native (#53651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53651

## Stack
We aim to remove +load methods from the codebase to reduce pre-main startup time and to unblock enabling startup optimizations

## Diff
Diff removes `+load` API from `RCT_EXPORT_MODULE` macro.
It introduces new parameter for `react_native_module_provider` function `eager`, which adds legacy RN modules to newly created socket `REACT_MODULE_EAGER_REGISTRATION_SOCKET`. This socket is invoked right before the RCTBridge is being initialized.

Impact: 137 static loaders are removed from the startup path

## RN
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D81727845

fbshipit-source-id: 4904499f2e8587717b26579364ed48ffed934774
2025-09-11 18:55:40 -07:00
Alex HuntandFacebook GitHub Bot 6e011c98c1 Strip back V2 Perf Monitor to status only (#53742)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53742

Simplify scope for the internal V2 Perf Monitor prototype, and clean up the current perf metrics approach.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82208400

fbshipit-source-id: a03eb5f493064fc4b554d56a36a48df889f276b2
2025-09-11 14:21:00 -07:00
Peter AbbondanzoandFacebook GitHub Bot 0ee665ce12 Add API 26 check to ReactScrollViewHelper (#53688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53688

Support for the `removeIf` method was [added to CopyOnWriteArrayList with AOSP in API 26](https://android-review.googlesource.com/c/platform/libcore/+/304056). On devices with API 24 and 25, invocations of either `ReactScrollViewHelper#removeScrollListener` or `ReactScrollViewHelper#removeLayoutChangeListener` would cause a crash. Rather than bump the required API version and lock out apps targeting API 24/25, this adds a separate code path to bulk remove items from the array list.

Changelog: [Internal]

Differential Revision: D82039300

fbshipit-source-id: 6509dc637534b8e546f84447dbcdce1c5bca42f0
2025-09-11 11:34:09 -07:00
Peter AbbondanzoandFacebook GitHub Bot 2dada2193a Apply LINEAR_TEXT setting with custom typefaces set (#53692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53692

With some custom typefaces, font hinting causes "jittery" artifacts upon scaling the text. We already set the subpixel text flag for views with custom or modified typefaces and this change also sets the linear text flag. Per [Android documentation](https://developer.android.com/reference/android/graphics/Paint#SUBPIXEL_TEXT_FLAG), it's recommended that both of these flags are set together to avoid this exact artifacting. This change is being gated behind a feature flag to evaluate the performance impact of disabling glyph caches for all text, and may drive the need to introduce a prop that controls this setting in the future.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82050029

fbshipit-source-id: 9e6e023ff723641f663935b6cd7aae07045834bc
2025-09-11 11:32:18 -07:00
Panos VekrisandFacebook GitHub Bot 3d4f0f48fe fix flow typing of mockComponent (#53739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53739

The previous condition `typeof isESModule extends true` in the definition of `mockComponent` is always `true` (this is expected by semantics of conditional types).

See [try-Flow](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkUEKTwJEJ+DAkMiUFSwkyZCC3dbdAC+-EgGiSAB1YA9lHBoAACXmICrcAAUAEpZcAJbLtbKYFL4VBdVBlWhkLK0MRnlBVWaVsYIDBzbKFAsoGwSLKpDJZQB+WUARllZoATBrZSwJEJKIbgwBuWUCiVanW2eyy+SBgC8RuVXuwqvjAHpC7LM2XZcHk9qM7LWQGiyWTJReVX04G63Gk4aU9A0-JQ9mYMayfmG6Xy5Xu9XQ3X-WOmy2p+mZx7O1BE1AuxK9Y8DbriqU1RrWzvpXKhwAeABCZotECtAD4TWarzbZVfnfJXe7PfpfQGgwrMMIyjQ1lQABlrD1gVoAtZULAAqWUHjtVg0DaWUEJLDdW1TCQ21LHM8zg4tx2zf1WxrWdY0o9tV3nahF1w3t8P7Qih2VEcSJLMts0nHVlyg+t4MbRjKEolcK3jCUBVyEAGhMEgZSgJIGnAqxgwADn9KxwJAAUgA)

A bug in Flow made it so that when this type was exported `typeof isESModule` became `any`, which made it so that the conditional always evaluated to the first part. The bug is fixed in D82193099.

This diff uses a type parameter, which can be correctly instantiated at the call site.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D82226987

fbshipit-source-id: 411047c10ad88be867fe9b4c5a1672775b3c9322
2025-09-11 11:22:41 -07:00
Gabriel DonadelandFacebook GitHub Bot da7bf9c545 Add changelog for v0.81.2 (#53691)
Summary:
Add Changelog for 0.81.2

## Changelog:
[Internal] - Add Changelog for 0.81.2

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D82111764

Pulled By: cortinico

fbshipit-source-id: 90a140b7114861afecfa1c65cd69adbeff178e14
2025-09-11 10:35:54 -07:00
Nicola CortiandFacebook GitHub Bot 29c1f72801 Do not invoke project. inside BundleHermesCTask (#53718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53718

I've just realized we ended up invoking `project.` inside the execution of `BundleHermesCTask`.
This is an anti-pattern and is breaking Gradle Configuration caching.

Instead we should be checking if hermesV1Enabled is set during the Task registration and pass over this information
to the task.

Changelog:
[Internal] [Changed] -

Reviewed By: j-piasecki

Differential Revision: D82130643

fbshipit-source-id: d2026711666867b3767824381cc5be0af3b476cc
2025-09-11 07:20:25 -07:00
Jakub PiaseckiandFacebook GitHub Bot ae89022f9a Use artifacts published from Hermes repository when using Hermes V1 (#53725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53725

Changelog: [GENERAL][CHANGED] - Changed the coordinates of hermes artifacts when using Hermes V1

Adds a new `version.properties` file to keep which hermes versions should be consumed from Maven once the versions of Hermes and React Native are decoupled. This diff only implements changes necessary for consuming Hermes V1, as we don't want to migrate everything quite yet (0.82).

Reviewed By: cortinico

Differential Revision: D82204203

fbshipit-source-id: d712257a73f7ba54612a55c1b312416376f28b56
2025-09-11 06:36:23 -07:00
Nicola CortiandFacebook GitHub Bot 7438fcd5d2 Unblock run_fantom_tests by pinning react-native-android to v18.0 (#53732)
Summary:
This temporarly unblocks `run_fantom_tests` till we find a solution for the docker image bump. See:
- https://github.com/react-native-community/docker-android/pull/242#issuecomment-3280029122

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D82212022

Pulled By: cortinico

fbshipit-source-id: 652926addf12cc2d88ac2139d3ec58a266ced9ef
2025-09-11 06:21:39 -07:00
Rubén NorteandFacebook GitHub Bot 5ae5a120a7 Ship Web Performance APIs in canary (#53712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53712

Changelog: [internal]

This enables the new Web Performance APIs in the canary channel.

Reviewed By: cortinico

Differential Revision: D82117694

fbshipit-source-id: 370b8397eeec350be8434728ab9d8ce1f5926117
2025-09-11 06:09:29 -07:00
Rubén NorteandFacebook GitHub Bot 9962add377 Remove redudant fields from ReactNativeStartupTiming (#53711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53711

Changelog: [internal]

This removes some fields that contain the same time as `endTime`, which is confusing when documenting them.

Reviewed By: christophpurrer

Differential Revision: D82112473

fbshipit-source-id: 461e2b4b495ae641dcb3233874360a4f7b90dabf
2025-09-11 06:09:29 -07:00
Rubén NorteandFacebook GitHub Bot c015f626a8 Make eventCounts a getter (#53710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53710

Changelog: [internal]

This should be a getter according to the spec.

Reviewed By: hoxyq

Differential Revision: D82111779

fbshipit-source-id: 614bb4848907bacd80ef228aa747ae685cf2c1f7
2025-09-11 06:09:29 -07:00
Vitali ZaidmanandFacebook GitHub Bot cda0ad8c5f Update debugger-frontend from e87564a...5a792db (#53714)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53714

Changelog: [Internal] - Update `react-native/debugger-frontend` from e87564a...5a792db

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/e87564a24cf233c60aaebee8c418ec85724f7214...5a792db1225adda206313e9bf751198a1ca7851a).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [5a792db12](https://github.com/facebook/react-native-devtools-frontend/commit/5a792db12) | Vitali Zaidman (vzaidman@gmail.com) | 2025-09-01T11:06:46+01:00 | [track clicks on script links (#204)](https://github.com/facebook/react-native-devtools-frontend/commit/5a792db12) |
| [7edec7c48](https://github.com/facebook/react-native-devtools-frontend/commit/7edec7c48) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-28T10:24:49+01:00 | [track the duration between user setting a breakpoint and the breakpoint being painted (#201)](https://github.com/facebook/react-native-devtools-frontend/commit/7edec7c48) |
| [273f02681](https://github.com/facebook/react-native-devtools-frontend/commit/273f02681) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-08-27T19:33:26+01:00 | [Revert "Add landingView query param enabling view focus on launch (#197)" (#202)](https://github.com/facebook/react-native-devtools-frontend/commit/273f02681) |
| [1e19c4454](https://github.com/facebook/react-native-devtools-frontend/commit/1e19c4454) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-21T16:23:44+01:00 | [Fixed Protocol Manager displaying events with no params as "(pending)". (#200)](https://github.com/facebook/react-native-devtools-frontend/commit/1e19c4454) |

Reviewed By: robhogan

Differential Revision: D82117068

fbshipit-source-id: 4112be5e8a4f643dffc46e7956c821041dad3b26
2025-09-11 03:49:25 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dab8a45623 cipolleschi/fix rctnetworking not building (#53713)
Summary:
Fix Cocoapods builds with static libraries and dynamic frameworks

## Changelog:
[Internal] -

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

Test Plan: Tested locally on RNTester

Reviewed By: cortinico

Differential Revision: D82118127

Pulled By: cipolleschi

fbshipit-source-id: 73736c2382be5f6b0770bb7154780e6dcc4aca1c
2025-09-10 12:14:14 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 40c60adacf xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java (#53704)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53704

Reviewed By: cortinico

Differential Revision: D82098400

fbshipit-source-id: e692b8e2bad976805657c2f406831c346198554f
2025-09-10 07:23:21 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a7cd3cc08f Make codegen generate a Package.swift file for Codegen'd target (#53619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53619

With this change, we are making Codegen generate a Package.swift file so that we can integrate the `ReactCodegen` and the `ReactAppDependencyProvider` in apps only using SwiftPM

## Changelog
[iOS][Added] - Make codegen generate PAckage.swift file for the codegen targets

Reviewed By: cortinico

Differential Revision: D81769543

fbshipit-source-id: 1f1a1b9f41126e142931d5eda6e75109a69f828c
2025-09-10 05:25:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 87f8e85b7f Move generated code to ReactCodegen and ReactappDependencyProvider folder (#53618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53618

This change makes sure that we generate the codegen files in the ReactCodegen and ReactAppDependencyProvider folder.

This is necessary as Swift PM needs the source code of packages to be grouped in folders that are children of where the Package.swift is located.

This is not a breaking change, because Cocoapods has been updated accordingly, import/include paths are not changed and the folder layout should not be accessed by anybody directly

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81769522

fbshipit-source-id: 7c70f96a9aa503c4faaf173b94c8ee0e326094a1
2025-09-10 05:25:54 -07:00
Phil PluckthunandFacebook GitHub Bot f6f5ea0b2e Remove outdated artifacts codegen early return (#53690)
Summary:
Follow-up to https://github.com/facebook/react-native/issues/53503 for a regression

When no React Native module is present this bail condition stops us from generating the artifacts podspec that's needed to complete build.

## Changelog:

[IOS] [FIXED] - Fix regression that skips artifacts code generation

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

Test Plan:
- Create an app **without** any React Native modules, run `pod install`; without this fix the podspec will be missing and the build will fail
  - With expo this can be reproduced using `create-expo-app --template blank-typescript@next` on `react-native@0.81.2`
  - With the community CLI this can be reproduced using `npx react-native-community/cli@latest init test --skip-install --version 0.81.2` and uninstalling `react-native-safe-area-context`

Reviewed By: javache

Differential Revision: D82103491

Pulled By: cipolleschi

fbshipit-source-id: 3d9619b5a935ca920220824b3963a9a107f926ca
2025-09-10 05:24:28 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6c49572ee4 Make sure we don't run RN CI on forks (#53707)
Summary:
We had reports from the Community of the RN CI running on forks and causing high costs and bills for them
This change should make sure that the most impactful jobs only runs on the React Native CI and not on forks.

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D82107313

Pulled By: cipolleschi

fbshipit-source-id: ff7f418344975e7bb8306a6356d774c26bea3db1
2025-09-10 04:49:14 -07:00
Rubén NorteandFacebook GitHub Bot 529f55c8c9 Implement performance.timeOrigin (#53660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53660

Changelog: [internal]

(This is internal because these APIs aren't enabled in OSS yet)

Implements `performance.timeOrigin` to allow converting timestamps from `performance.now()` to be based on the Unix epoch.

This implementation isn't fully spec-compliant to align with the current implementation of `performance.now()`, where the base of the clock is system boot time instead of app startup / navigation time.

Reviewed By: huntie

Differential Revision: D82016724

fbshipit-source-id: e3a066721cecf41e2fd963beb94a0a2f1c5d6493
2025-09-10 04:48:55 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 481fb612a2 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGflagsTaskTest.kt (#53702)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53702

Reviewed By: cortinico

Differential Revision: D82093601

fbshipit-source-id: 133936f59d155fa1d68358abe4015c7b7b1613a6
2025-09-10 04:41:29 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 3ce6a05aac fix: add conditional checks for facebook/react-native repo for nightly (#53700)
Summary:
This PR adds additional checks to run nightly jobs only on the main repo.

I noticed pretty heavy usage on my fork of React Native:

<img width="951" height="179" alt="Screenshot 2025-09-10 at 11 47 29" src="https://github.com/user-attachments/assets/91cb9e4a-8658-42bd-bbfe-ffba01b0b3b3" />

I also noticed a typo in this file with output instead of outputs

## Changelog:

[INTERNAL] [FIXED] - add conditional checks for facebook/react-native repo for nightly workflow

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

Test Plan: Check if the syntax is correct.

Reviewed By: cortinico

Differential Revision: D82104958

Pulled By: cipolleschi

fbshipit-source-id: fc2e6e0299345ebd115c7a574a5a8161f2b0ca5c
2025-09-10 03:57:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 813b9441ca Read Hermes V1 opt-in flag from the app's properties (#53665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53665

Changelog: [ANDROID][FIXED] - Read the Hermes V1 opt-in flag from the apps properties when building from source

Reviewed By: cortinico

Differential Revision: D82018545

fbshipit-source-id: f3c6fdbac190f47b6bf6836105d9e0909d8b86ba
2025-09-10 00:51:41 -07:00
Zeya PengandFacebook GitHub Bot cf5040b4f8 fix array type parsing in DynamicEventPayload::extractValue (#53689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53689

## Changelog:

[General] [Fixed] - fix array type parsing in DynamicEventPayload::extractValue

When unwrapping event mapping like `e.nativeEvent.touches[0].locationX` e.g. for Animated.event like below,

```
onTouchMove={Animated.event(
  [
    {
      nativeEvent: {
        touches: {
          0: {locationX: animatedValue},
        },
      },
    },
  ],
  {useNativeDriver: true},
)}
```
here it'll throw exception `terminating due to uncaught exception of type folly::TypeError: TypeError: expected dynamic type 'object', but had type 'array'` when getting into folly dynamic array, because array index in the event path is string instead of integer

Reviewed By: rozele

Differential Revision: D82050538

fbshipit-source-id: ed25c8917b90190c995d1fcd6d60af207e72e270
2025-09-09 21:12:26 -07:00
Luna WeiandFacebook GitHub Bot 019a553ea4 Remove enable_eager_alternate_state_node_cleanup param (#53693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53693

Changelog: [Internal] - Remove usage of `enableEagerAlternateStateNodeCleanup`  as it is default true now

Reviewed By: yungsters

Differential Revision: D81962955

fbshipit-source-id: 80b0d9321b1162dd79d052b05acb3dc9459e37d2
2025-09-09 18:46:39 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 2ae5a74f06 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages (#53661)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53661

Reviewed By: javache

Differential Revision: D81764229

fbshipit-source-id: 617716ddb5cf17d41a4927c3a6cce6074278d8b0
2025-09-09 11:37:24 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 3d4a4caac8 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GeneratePackageListTaskTest.kt (#53614)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53614

Reviewed By: javache

Differential Revision: D81764947

fbshipit-source-id: de19d7d89f3a7e19285928f9541b0b47b503d160
2025-09-09 11:34:37 -07:00
Alex HuntandFacebook GitHub Bot cdc4a8ead4 Wire up background tracing and actions in Perf Monitor (#53460)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53460

Completes the first pass of adding background performance trace controls in the V2 Perf Monitor UI.

Key changes:
- Initiates background trace on `PerfMonitorOverlayManager::init`.
- Wires up background trace recording states in button dialog, and connects `pauseAndAnalyzeBackgroundTrace` and `resumeBackgroundTrace` actions.
- Moves UI manager/view classes into `perfmonitor` subpackage.
- Fixes `responsivenessScore` determination/UI coloring.
- Adds tooltip UI to the overlay view.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D80807554

fbshipit-source-id: 53360c2d454adfbba40fd795d400b28d90ff9e61
2025-09-09 10:31:04 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 226d2ba160 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt (#53656)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53656

Reviewed By: cortinico

Differential Revision: D82005918

fbshipit-source-id: 5b0728e68fff865e8a9271c0dfc0a3cc19baa54c
2025-09-09 08:13:12 -07:00
Rubén NorteandFacebook GitHub Bot a16c6c9477 Add feature flag to enable Web Performance APIs by default (#53547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53547

Changelog: [internal]

This creates a new feature flag to enable the modern Web performance APIs in RN by default. It's disabled by default so it shouldn't have any effect at the moment.

Reviewed By: rshest

Differential Revision: D80811430

fbshipit-source-id: 47d5fd12ac8809aa3c5ad37cdd31c0d9e3ed5912
2025-09-09 08:07:31 -07:00
Vitali ZaidmanandFacebook GitHub Bot 59b8974d3c changelog/v0.80.0-rc.1 (#53662)
Summary:
Changelog: [Internal]

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

Reviewed By: fabriziocucci

Differential Revision: D82020526

Pulled By: vzaidman

fbshipit-source-id: 43eb1d038f71dbeb30bd1bf4a94779a9fad56215
2025-09-09 07:46:35 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 2c30215bc7 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/core/tests/TestComponent.h (#53658)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53658

Reviewed By: javache

Differential Revision: D81904578

fbshipit-source-id: 03725446586cc206690995f7d2d274c0b1249abe
2025-09-09 04:57:44 -07:00
generatedunixname537391475639613andFacebook GitHub Bot f568c9b953 xplat/js/react-native-github/packages/gradle-plugin/shared-testutil/src/main/kotlin/com/facebook/react/tests/OsRule.kt (#53655)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53655

Reviewed By: cortinico

Differential Revision: D82008708

fbshipit-source-id: 9ba77512a5e6e7749981726d739d88df287a63d3
2025-09-09 03:42:58 -07:00
25harshandFacebook GitHub Bot 968909488a fix(iOS): Fix RCTDeviceInfo crash when application.delegate.window is nil (#53645)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

Fixes a crash in `RCTDeviceInfo.interfaceOrientationDidChange` when `application.delegate.window` is nil. This crash affects multiple modern iOS app architectures where the traditional window property may not be set:

- **SwiftUI apps using `main`** instead of traditional AppDelegate
- **Brownfield React Native integrations** where the host app manages windows
- **Scene-based lifecycle apps** (iOS 13+) using SceneDelegate
- **Custom window management** setups

**The Problem:**
```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[MyApp.AppDelegate window]: unrecognized selector sent to instance'
```

This occurs when trying to access `.frame` on a nil window object during orientation changes. Modern iOS development patterns don't always require setting `application.delegate.window`, but React Native's RCTDeviceInfo assumes this property exists.

**The Solution:**
Replace direct `application.delegate.window` access with `RCTKeyWindow()` and add nil-safe fallback:

```objc
// Before (crashes in modern apps)
BOOL isRunningInFullScreen =
    CGRectEqualToRect(application.delegate.window.frame, application.delegate.window.screen.bounds);

// After (safe for all app configurations)
UIWindow *delegateWindow = RCTKeyWindow();
BOOL isRunningInFullScreen = delegateWindow ?
    CGRectEqualToRect(delegateWindow.frame, delegateWindow.screen.bounds) : YES;
```

This approach:
- Uses `RCTKeyWindow()` pattern already established elsewhere in RCTDeviceInfo
- Provides safe fallback defaulting to fullscreen when window state is unknown
- Maintains existing multitasking detection behavior (Split View, Slide Over)
- Is backward compatible with traditional React Native apps

## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS][FIXED] - Fix RCTDeviceInfo crash when application.delegate.window is nil in modern iOS app architectures

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

Test Plan:
### Manual Testing

**1. SwiftUI main App Test:**
```bash
# Created SwiftUI app with main lifecycle
# Integrated React Native component
# Result: No crash during orientation changes, fullscreen detection works
 PASS: Orientation changes handled safely
 PASS: Multitasking detection stable
```

**2. Traditional React Native App:**
```bash
# Tested with standard RN template app
# Verified existing behavior unchanged
 PASS: Existing functionality preserved
 PASS: No regressions in dimension reporting
```

**3. Brownfield Integration:**
```bash
# Integrated RN in existing iOS app without window property
# Triggered orientation changes and multitasking transitions
 PASS: No crashes during orientation events
 PASS: Split View and Slide Over work correctly
```

**4. Scene-based Lifecycle App:**
```bash
# Created app using SceneDelegate for window management
# Tested orientation and multitasking scenarios
 PASS: Proper handling when SceneDelegate manages windows
 PASS: No crashes during app lifecycle transitions
```

### Edge Case Testing

**RCTKeyWindow() Returns Nil:**
- Confirmed defaults to `YES` (fullscreen)
- No crashes when no key window available
- Multitasking detection remains stable

**Multiple Window Scenarios:**
- Tested with iPad multiple windows
- Uses correct key window for measurements
- Proper behavior in complex window hierarchies

**Orientation During Transitions:**
- App backgrounding/foregrounding during orientation
- Multitasking mode changes during rotation
- No crashes or inconsistent states

### Automated Testing

```bash
# All existing tests pass
yarn test
 RCTDeviceInfoTests pass

# Code style compliance
yarn lint
 Follows React Native Objective-C guidelines
```

### Impact Verification

**Before Fix:**
- Crash in SwiftUI apps using main
- Crash in Scene-based lifecycle apps
- Crash in brownfield integrations

**After Fix:**
- All app architectures work safely
- Multitasking detection preserved
- Backward compatibility maintained
- No performance impact

Rollback Plan:

Reviewed By: javache

Differential Revision: D81931754

Pulled By: cipolleschi

fbshipit-source-id: c3ea1a2922b1d48ca6bc1fc32861b490322fd254
2025-09-09 02:23:52 -07:00
Alex HuntandFacebook GitHub Bot e7ce4ff0bf Move NetworkReporter out of jsinspector-modern (#53484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53484

Refactor to better organise network event reporting features.

- Introduce new `ReactCommon/react/networking` package, containing `NetworkReporter` class (outer-most interface with each platform).
    - Move `ReactCommon/performance/timeline` dependency to this level, removing jsinspector→performance dependency.
- Simplifies the remaining `NetworkHandler` in `jsinspector-modern/network` — which now is only focused on CDP network reporting.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D81129562

fbshipit-source-id: 6c36045e872b0fd9510d0fa3e98acb0969e74d72
2025-09-08 13:35:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 49be01add1 Move headers from .h to .mm file (#53617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53617

In the RCTAppDelegate.h file there are a couple of headers that are not used and that can be either removed or moved to the .mm file.
This reduce the coupling between the AppDelegate library and React Core and allow us to reduce the size of the exported headers in the umbrella header.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81769485

fbshipit-source-id: b811dde0331e8a668618e0c8eb250fd81bf48545
2025-09-08 10:27:24 -07:00
Nicola CortiandFacebook GitHub Bot 13120f630d Remove unnecessary extra quote on hermesVersionProvider (#53641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53641

This extra quote is causing the build on the 0.82-stable to fail. The reason is that the Path for the `.hermesversion` file is composed wrongly so we attempt to build hermes from the `main` branch.

Changelog:
[Internal] [Changed] -

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: j-piasecki, vzaidman

Differential Revision: D81925624

fbshipit-source-id: 700f9d44b6c7efdb845232dad8ca7c2e3136385d
2025-09-08 09:09:23 -07:00
Rick HanlonandFacebook GitHub Bot d0140ce53b enable opt-in for enableDefaultTransitionIndicator (#34373)
Summary:
So we can test the feature.

DiffTrain build for [3168e08f8389d258de9eb7c8d19b9d44a0f250f2](https://github.com/facebook/react/commit/3168e08f8389d258de9eb7c8d19b9d44a0f250f2)

Reviewed By: kassens

Differential Revision: D81599263

fbshipit-source-id: a33ca01250206a2a35350f7fad09e43071522df7
2025-09-08 08:43:40 -07:00
Jakub PiaseckiandFacebook GitHub Bot d0fb33822d Check value of the Hermes V1 flag instead of whether it's defined (#53637)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53637

Changelog: [ANDROID][FIXED] - Check for the value of the HERMES_V1_ENABLED flag instead of whether it's defined

Reviewed By: cortinico

Differential Revision: D81920483

fbshipit-source-id: 550ae9fd27f666affe102b1c5c3f51bde7b5923e
2025-09-08 07:16:48 -07:00
Rob HoganandFacebook GitHub Bot 2152180fa0 Minor bump memfs dev dependency (#53628)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53628

Bump the `memfs` dependency used in tests to the latest minor - there have been a considerable number of updates since 4.7 including support for various newer (and some old) Node fs APIs: https://github.com/streamich/memfs/blob/master/CHANGELOG.md

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D81879137

fbshipit-source-id: e75946dac100809cb39c88971fd6ed397dc9f49e
2025-09-08 06:54:09 -07:00
Ramanpreet NaraandFacebook GitHub Bot e7aeea26bd Deprecate legacy javascript apis (#53630)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53630

These JavaScript apis were a part of react native's legacy architecture. Let's deprecate them, so that we can eventually remove them in the future.

Changelog: [General][Deprecated] - Deprecate legacy javascript react native apis

Reviewed By: cortinico

Differential Revision: D81795732

fbshipit-source-id: 0a2bd142fa7e08c1f3daaa437ee127a2156e045b
2025-09-08 04:30:21 -07:00
Bartosz KaszubowskiandFacebook GitHub Bot c04248dc5c chore: Add Bluesky badge to README (#53616)
Summary:
Add Bluesky badge to README.

## Changelog:

[INTERNAL][ADDED] Add Bluesky badge to README

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

Test Plan:
The updated README has been checked out on the PR branch.

## Preview:

<img width="1880" height="746" alt="Screenshot 2025-09-05 at 13 00 34" src="https://github.com/user-attachments/assets/dc1dfa9c-9e08-449d-82b8-dcb92ae92268" />

Reviewed By: cipolleschi

Differential Revision: D81909921

Pulled By: cortinico

fbshipit-source-id: b5fa79f152f126944bc1c31c8fbb86889f0f25db
2025-09-08 03:48:46 -07:00
Nick LefeverandFacebook GitHub Bot 02e3a999ed Back out "Use uint32_t as internal Color representation" (#53622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53622

Reverting to avoid lossy conversion on hosts expecting signed int values for color conversion.

Changelog: [Internal]

Reviewed By: rozele, javache

Differential Revision: D81785268

fbshipit-source-id: 4a8d099e378fa55e76a58c2ab0356d88e344de2c
2025-09-05 20:37:58 -07:00
Mark VerlingieriandFacebook GitHub Bot 44b2da0df2 Revert D81766029: Make feature flag "enableViewRecyclingForScrollView" true by default
Differential Revision:
D81766029

Original commit changeset: df4a260b9bde

Original Phabricator Diff: D81766029

fbshipit-source-id: f1cd2a2cef632cfe9cbf0cd13e9ec20cfa5cc6ae
2025-09-05 11:58:48 -07:00
Zeya PengandFacebook GitHub Bot dae2f606c7 Course correct props at SurfaceMountingManager.updateProps() (#53589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53589

## Changelog:

[Android] [Changed] - [c++ animated] Course correct props at SurfaceMountingManager.updateProps()

Sometimes a React update will try to commit to the same view that native animated modified before via direct manipulation, and after the update host view will use the prop value currently in Fabric. In `AnimatedMountingOverrideDelegate` there's logic to course correct at ShadowTree mount, but if this update is from JS thread, it takes some time to reach mounting layer, at the same time UI thread can still be doing more direct animation updates, and once the corrected change gets there it's already stale.

In this diff I added mechanism to keep track of direct manipulation props (or "synchronous mount props" to match the naming of java function `synchronouslyUpdateView...`) and use it to correct what reaches host view. `SurfaceMountingManager.updateProps()` is called by both regular mount and direct manipulation and it's always called on UI thread, so it could be a good candidate to synchronize these 2 scenarios

Reviewed By: sammy-SC

Differential Revision: D81611823

fbshipit-source-id: 638a59bcd94b3d7e8bab68defd472b2b482dc92f
2025-09-05 09:18:50 -07:00
Zeya PengandFacebook GitHub Bot 5774bd105d create FeatureFlag overrideBySynchronousMountPropsAtMountingAndroid (#53603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53603

## Changelog:

[General] [Added] - create FeatureFlag overrideBySynchronousMountPropsAtMountingAndroid

Reviewed By: rshest

Differential Revision: D81690079

fbshipit-source-id: cb381004135ef9cd072c6f99703d9e7f4a40dd6a
2025-09-05 09:18:50 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3a3f3a417d Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages [B] (#53611)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53611

Reviewed By: rshest

Differential Revision: D81699709

fbshipit-source-id: 6f512fcc01e3f1d33b4e94c4766ee3ab759463e5
2025-09-05 06:37:04 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 71edbe1548 Make feature flag "enableViewRecyclingForScrollView" true by default
Summary:
## Changelog:
[Internal] -

Noticed that the default value for this one is inconsistent with all the other similar ones, which can cause confusion during setting up the experiment, fixing it.

Note that top level view recycling is still controlled via `enableViewRecycling`, which will also disable all the other ones when false (which it is by default).

bypass-github-export-checks

Reviewed By: lenaic

Differential Revision: D81766029

fbshipit-source-id: df4a260b9bde20d1c85b7786df00fa91298a27b7
2025-09-05 06:01:47 -07:00