Commit Graph

38601 Commits

Author SHA1 Message Date
Andrew Datsenko 2e4da10b52 fix coverage patterns (#53881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53881

Changelog: [Internal]
To make sure that coverage is insertect correctly when run in different metro setup where patterns do not match perfectly, we need to add glob prefix

Reviewed By: sammy-SC

Differential Revision: D82968565

fbshipit-source-id: c2676ef4c774411938039fc5b98a3b953f6ec916
2025-09-22 10:48:45 -07:00
Riccardo Cipolleschi b10faf6c02 Create the orchestration function to coordinate the creation of the hard links (#53642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53642

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778457

fbshipit-source-id: b4ab8c902d6d7e6ca4b89ccbab75c1b5d84ce00a
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi c6395eccd4 add function hard links for headers from ReactCodegen (#53640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53640

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function to create hard links to Codegen Headers so that other libraries can access them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778450

fbshipit-source-id: e9f62f1c81ce8a635cc880007f495de342342a25
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi 515c735347 Add function to create hard links for headers of the third-party dependencies (#53638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53638

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ThirdPartyDependencies that React native and libraries might need to access.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778459

fbshipit-source-id: b8f9f207a0fbe2265e2861bf508516946905b472
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi 6807231120 Create function to create hardlink to header required to build React Native Core (#53635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53635

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we did two things:
1. we move the helper functions to a headers-utils.js file (and the tests to the `headers-utils-test.js` file)
2. we added a function that coordinates the creation of the header links *and added tests for it)

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778464

fbshipit-source-id: fd8eb5a7af55db0a08c4d299c5470058d5424768
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi fc4a692b8e Create utility function to create the right folder structure for headers in the ReactCommon folder (#53631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53631

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ReactCommon folder that has a complex structure and complex mapping requirements

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778470

fbshipit-source-id: e0f4001048fcde0e988fc3a05b53efb1de70460b
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi 8db93abf12 Create utility function to create the right folder structure for headers in the ReactApple folder (#53629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53629

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function to properly create the header structure for the headers in ReactApple that requires a special case.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778471

fbshipit-source-id: 095d901dce139cf8221251f952f474be943a5ab3
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi 7cd3328b21 Create script to create hard links for headers from a source path to a destination path (#53620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53620

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links between a source folder and a destination folder.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778469

fbshipit-source-id: 3954bc219f32ea53744393a83f3179beeaca95b3
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi 072b105f52 Add function to extract headers from a folder (#53737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53737

This change add a utility function to extract headers (both .h and .hpp) from a folder. It also allow to exclude some specific folders (e.g.: `tests`, non supported platforms, ...)

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82205692

fbshipit-source-id: 4fa6dee2ae4790c583beb96a959b0c3045c7b50a
2025-09-22 10:14:58 -07:00
Riccardo Cipolleschi c1827fcd04 Add simple function to handle symlinks (#53736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53736

This change adds a simple function that manages symlinks. This is used through the stack of changes to avoid code repetition.

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82202860

fbshipit-source-id: 0baa348c84f966a2e1eeb85b008f8e653bffe96c
2025-09-22 10:14:58 -07:00
Nicola Corti 0915833f7c Follow-up from previous transform matrix fix (#53876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53876

This is just a couple of small nits after D82836192

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D82953710

fbshipit-source-id: 1a98c54a110ee1a72225de331bfe2efa4e4225c0
2025-09-22 09:48:59 -07:00
Pieter De Baets 57a1820c85 Remove unused RCTHermesInstance field (#53858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53858

We only use static methods from `HermesInstance`

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82816061

fbshipit-source-id: 515dad2e8d6e0a6f6ac26f93d5a86aedf875f93e
2025-09-22 08:47:33 -07:00
Nick Lefever e1a6c38cc1 Fix overflow with Props 2.0 in horizonal scroll view (#53872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53872

This diff fixes the mismatch between the overflow initial value between the horizontal scroll view component initialization and the React core props instance initial value by applying the same correction as for the vertical scroll view component.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919365

fbshipit-source-id: 70e40f56ffa3ea87fa74035c885608f633890610
2025-09-22 04:19:36 -07:00
Nick Lefever e314f6161a Fix scrollview overflow prop not set with Props 2.0 (#53871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53871

The props defined in `YogaStylableProps` define the overflow to be set to `Overflow::Visible` by default.

The scroll view initialized the overflow setting to `Overflow.SCROLL`. This meant that Props 2.0 would only set the overflow prop if it was different from Visible, leading to the scroll view not being configured correctly when asking for the overflow to be visible.

This diff assigns the correct initial value to the scrollview overflow setting only when enabling Props 2.0 to avoid any unexpected behavior changes when not using Props 2.0.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919286

fbshipit-source-id: d5368500cc4504164d6fdf7cf60042a9d5792853
2025-09-22 04:19:36 -07:00
Nicola Corti ce243df972 Correctly implement transform: matrix with 2d matrices (#53860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53860

Fixes https://github.com/facebook/react-native/issues/53639

I've realized that our docs and validation logic states that we do support
3x3 matrixes (for 2d transforms). However they're not properly processed
as the values are just copied into a 4x4 matrix.

This can be verified by applying the 3x3 identity matrix on any transform.

I'm fixing it by correctly populating the 4x4 matrix getting the values from the 3x3 matrix in input.

Changelog:
[General] [Fixed] - 9-element (2d) transform matrix are not correctly working

Reviewed By: christophpurrer

Differential Revision: D82836192

fbshipit-source-id: 12029b37ffd8375fff48ea7f9386b849dfe96a62
2025-09-22 03:28:31 -07:00
David Vacca 23b2b99c4b Fix incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method (#53863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53863

In this diff I'm fixing an incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82841006

fbshipit-source-id: 6f50f2475255d7b841d9224bc8808119dcc68aec
2025-09-22 02:34:59 -07:00
Sam Zhou 5ef054921c Turn on react.ref_as_prop=experimental.store_ref_in_props_but_remove_ref_in_react_element_config in fbsource (#53870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53870

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82913848

fbshipit-source-id: c23f564404143535622fab3133d092d1fb566711
2025-09-21 14:04:21 -07:00
Sam Zhou 71b7dd8519 Prepare createAnimatedComponent API for flow's upcoming better react 19 ref-as-prop support (#53869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53869

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, it should preserve the existing type behavior, since in the TS version, the ref prop will be excluded anyways: https://github.com/facebook/react-native/blob/a4d43290c82e8ad93f03b304a78cdf0eaf41fba1/packages/react-native/ReactNativeApi.d.ts#L1434

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82916014

fbshipit-source-id: 2e62aab493dcf6f8f5e382c0739060c88e6f7ed5
2025-09-21 10:49:53 -07:00
Sam Zhou 5b544c7cd8 Simplify some RN types (#53868)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53868

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, this diff simply inlines what these `React.ElementRef` evaluates into.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82915646

fbshipit-source-id: 64179eac7dde91381361fb9f1053d58100d864c3
2025-09-21 10:49:53 -07:00
Alex Hunt a4d43290c8 Tweak Dev Menu appearance for iOS 26 (#53844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53844

Small UI tweaks that help when scanning more visually spread out alert actions on iOS 26.

- Use bold (iOS 26 style) alert title.
- Differentiate "Cancel" actions with red system style.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82731784

fbshipit-source-id: 0a0215fc75a4832e742e22328d5e21eee3808972
2025-09-20 03:23:31 -07:00
Nikita Lutsenko 7fb90c3f1b jsi | Remove unnecessary semicolons. (#53864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53864

Changelog: [Internal] Removed unnecessary semicolons, improving code quality.

Reviewed By: cortinico

Differential Revision: D82828986

fbshipit-source-id: aaafc332a1dc5944cb136bf6dd105d68c1c99e8d
2025-09-20 03:15:57 -07:00
Christoph Purrer 362ed179a8 Fix race condition between experimental_prefetchResources and surface stop (#53861)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53861

Changelog: [Internal]

The issue is a race condition in the React Native Fabric mounting system where `experimental_prefetchResources` is called on a `SurfaceMountingManager` after the surface has been stopped.

1.) `experimental_prefetchResources` is called
2.) Concurrently, `stopSurface()` *can be* called, which sets `mThemedReactContext = null`
3.) `experimental_prefetchResources` then tries to access `mThemedReactContext` via `Assertions.assertNotNull(mThemedReactContext)`
4.) Since `mThemedReactContext` is now `null`, the assertion fails and throws an AssertionError

The fix involves adding a guard to check if the surface is stopped before accessing `mThemedReactContext`

Follows existing patterns used by other methods in the same class

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java#L201-L213

Reviewed By: lenaic

Differential Revision: D82842572

fbshipit-source-id: 723bad24a075efa219766b0e148080dd42d59fba
2025-09-19 17:27:14 -07:00
Pieter De Baets fcbe4d1677 Split off MessageQueueThread header to separate target (#53857)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53857

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82625359

fbshipit-source-id: 7650dcd424299a21388c7bcf6c33c89b9f09171d
2025-09-19 14:02:47 -07:00
Christoph Purrer 390c9d30dc Update ## v0.82.0-rc.0 (#53847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53847

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82753924

fbshipit-source-id: a5a2036ccd74cc7f7dd463d82e96f156a4e309e2
2025-09-19 13:46:17 -07:00
Kræn Hansen 0198c92c71 Export @react-native/typescript-config/strict shorthand (#53564)
Summary:
Extending a tsconfig seems simpler than adding `compilerOptions` with `customConditions`.

### Before

```jsonc
{
  "extends": "react-native/typescript-config",
  "compilerOptions": {
    // ...
    "customConditions": ["react-native-strict-api", "react-native"]
  }
}
```

### After

```jsonc
{
  "extends": "react-native/typescript-config/strict"
  // ...
}
```

## Changelog:

[GENERAL] [ADDED] - Add `react-native/typescript-config/strict` export enabling the `react-native-strict-api` custom condition.

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

Test Plan:
### `package.json`

```
{
  "name": "react-native-ts-test",
  "private": true,
  "version": "0.1.0",
  "scripts": {
    "build": "tsc --noEmit"
  },
  "devDependencies": {
    "react-native/typescript-config": "^0.81.1",
    "typescript": "^5.9.2",
    "jest": "^30.1.2"
  },
  "dependencies": {
    "react-native": "^0.81.1"
  }
}
```

### `tsconfig.json`

```
{
  "extends": "react-native/typescript-config/strict",
  "include": ["src/index.ts"]
}
```

### `src/index.ts`

```
import { View } from "react-native";
```

Run `npx resolution-explorer` and select "react-native from src/index.ts to node_modules/react-native/types_generated/index.d.ts" to verify the types are resolved correctly.

```
Explicitly specified module resolution kind: 'Bundler'.
Resolving in CJS mode with conditions 'import', 'types', 'react-native-strict-api'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/src/package.json' does not exist.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/package.json'.
Loading module 'react-native' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
Directory '/Users/kraen.hansen/Repositories/react-native-ts-test/src/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/package.json'.
Entering conditional exports.
Matched 'exports' condition 'react-native-strict-api'.
Using 'exports' subpath '.' with target './types_generated/index.d.ts'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' exists - use it as a name resolution result.
'package.json' has a 'peerDependencies' field.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native'.
Failed to find peerDependency 'types/react'.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react/package.json'.
Found peerDependency 'react' with '19.1.1' version.
Resolved under condition 'react-native-strict-api'.
Exiting conditional exports.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts'.
======== Module name 'react-native' was successfully resolved to
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' with Package ID
'react-native/types_generated/index.d.ts@0.81.1+react@19.1.1'. ========
```

Reviewed By: robhogan

Differential Revision: D82791201

Pulled By: philIip

fbshipit-source-id: f58d3b8fcf3d7f18dd29eef18a3c8c0cb57d1d78
2025-09-19 13:28:31 -07:00
Simek 34cd61f0d5 fix C++ in-code docs comments to silence warnings (#53835)
Summary:
Address invalid C++ in-code docs comments to silence few warnings. Ref:
* https://www.doxygen.nl/manual/commands.html#cmdtparam

## 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
-->

[INTERNAL][FIXED] - Address invalid C++ in-code docs comments to silence the warnings.

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

Test Plan: Building RNTester app locally does not output the warnings related to in-code docs comments.

Reviewed By: cortinico

Differential Revision: D82791099

Pulled By: philIip

fbshipit-source-id: 2f93bfd4cd303471b2c52fcdf74871e5dee8c06a
2025-09-19 13:12:23 -07:00
David Vacca e349009cb8 Refactor ReactNativeNewArchitectureFeatureFlagsDefaults to remove legacy architecture configuration (#53791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53791

I'm removing parameter to configure new architecture in ReactNativeNewArchitectureFeatureFlagsDefaults because the new architecture is enabled by default everywhere.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241552

fbshipit-source-id: 9c5cee4befc914d95b84b01325485923e17ff6da
2025-09-19 13:01:08 -07:00
David Vacca f847496749 Refactor ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android to enable new arch (#53790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53790

New architecture should we enabled by default everywhere, Stable releases should use new arch now

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241551

fbshipit-source-id: 2a1bf14f2f1da6e441a58b083ca5a55618eec256
2025-09-19 13:01:08 -07:00
Sam Zhou 2590cd739a Deploy 0.284.0 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82786580

fbshipit-source-id: 8caa7802025004fce6cb5067c191b681087cb979
2025-09-19 07:33:42 -07:00
Sam Zhou 7ba64ca0f1 Pre-suppress errors for improved typing of Array.{includes,indexOf,lastIndexOf} in xplat
Summary:
In Flow 0.284, we will have a stricter version of `Array<T>.includes`. Instead of accepting `mixed`, we will only accept `T` to help catch logical errors. We did the same for `Array.indexOf` and `Array.lastIndexOf` as well.

This diff pre-suppresses newly discovered errors in part of the codebase.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82784398

fbshipit-source-id: 6cb11809844f964e0604d33b9f7a3989074cd1cc
2025-09-19 07:17:14 -07:00
Ruslan Lesiutin 0e77015a85 Fix unkown name for Timestamps on Timings track (#53854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53854

# Changelog: [Internal]

This fixes the unkown names message for TimeStamps on Timings track

Reviewed By: rubennorte

Differential Revision: D82812849

fbshipit-source-id: 91101998b4b7befa08bf0e45cae494765d5f2b6d
2025-09-19 06:53:23 -07:00
Ruslan Lesiutin 1b5e8e63b6 Manually preserve ordering for Scheduler and Components tracks (#53853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53853

# Changelog: [Internal]

Chrome DevTools orders tracks based on the timestamp of the first entry.

For React on Web we emit a few entries to establish the ordering:
https://github.com/facebook/react/blob/6eda534718d09a26d58d65c0a376e05d7e2a3358/packages/react-reconciler/src/ReactFiberPerformanceTrack.js#L57-L96

We are doing the same thing here, but in C++.

Reviewed By: rubennorte

Differential Revision: D82811889

fbshipit-source-id: cfc4060de05a3d74e240f019dbeaa910fa93eb0b
2025-09-19 06:53:23 -07:00
Tim Yung 03d9f34a82 RN: Deprecate InteractionManager (#53832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53832

Deprecates `InteractionManager` by adding a warning when it is imported.

Changelog:
[General][Changed] - InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`.

Reviewed By: javache

Differential Revision: D82704809

fbshipit-source-id: 99474cd7949abfe323c366b9ab8d8fc195578395
2025-09-19 05:10:47 -07:00
Tim Yung 4a1388268d RN: Remove References to InteractionManager (#53830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53830

Now that `InteractionManager` is deprecated (and no-ops), this removes all remaining references to it — in `Animated` and `PanResponder` — from the React Native repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D82690242

fbshipit-source-id: d101d47d1f8640f70e2d199492d4345b63663251
2025-09-19 05:10:47 -07:00
generatedunixname1395667395051502 b821bc3aba Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D82813624

fbshipit-source-id: 51fe7a84af2d4f2da7027e1649ec038517f9d561
2025-09-19 04:53:33 -07:00
Moti Zilberman e16b6470e4 Backout D82236159: [RN][debugger-shell] Implement saved window positioning per target (#53816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53816

Changelog: [Internal]

D82236159 introduced the first `node_modules` dependency in the Electron part of `react-native/debugger-shell`. This is not currently handled correctly by the build script, so this resulted in an instacrashing binary.

I'm temporarily backing out D82236159 until we have a proper fix for the build script.

Reviewed By: robhogan

Differential Revision: D82632937

fbshipit-source-id: 6c7c182e2a7c89e6ea2761096dcc426dbf2ae5cb
2025-09-19 02:38:00 -07:00
Alex Hunt cb7453fb9f Improve Network trace event field coverage (#53840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53840

After this diff, successful network events are displayed as fully hydrated timespans in the Performance panel network track, with all metadata needed to usefully populate the UI.

**Changes**

Adds:
- `"ResourceFinish"`: `encodedDataLength`, `decodedBodyLength`
- `"ResourceReceiveResponse"`: Populates `data.timing` members, which enables *"Request sent and waiting"* to be rendered correctly in the timeline.

Removes:

- `"ResourceWillSendRequest"` events — very rarely emitted by Chrome and are extraneous for our use case.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82636798

fbshipit-source-id: a4b0f0671b97aaadc279ac56d39fee0c95d4ddc7
2025-09-18 14:41:16 -07:00
nishan (o^▽^o) c8e5f9766b fix(iOS): boxShadow + overflow hidden combination affecting pointer event box-none and scale transform. (#52413)
Summary:
This issue is only reproducible with combination of `overflow: hidden` and `boxShadow` i.e. when a [container view](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L799) is added to the hierarchy.

### Case 1:

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)", overflow: "hidden" }}
  onPress={() => {
    alert("Tapped");
  }}
/>
```

Here the view has `box-none` but it will still trigger the press event because this [line](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L658) returns the `_containerView` as `hitView` and this condition gets [fullfilled](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L676) (since it is not self). To fix this issue we should iterate on `self.currentContainerView.subviews`.

### Case 2:

Transform scale clipping child view.

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, overflow: "hidden",
    transform: [
      { scale: 0.5 },
    ],
    boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)",
  }}
  onPress={() => {
    alert("parent view");
  }}
>
  <Pressable
    style={{
      position: "absolute",
      bottom: 0,
      right: 0,
      backgroundColor: "blue",
      height: 50,
      width: 100,
    }}
    onPress={() => {
      alert("child view");
    }}
  >
    <Text>Press me</Text>
  </Pressable>
</Pressable>;
```

The above style hides the child view on iOS whereas it is visible on android.

| iOS | Android |
   |---|---|
   | <img src="https://github.com/user-attachments/assets/14713ec9-1ae7-4425-9348-946d507188e8" width="200px" /> | <img src="https://github.com/user-attachments/assets/0f6e2368-037d-4b03-8a85-8a08f1578ff6" width="200px" /> |

This happens because `containerView` uses `self.frame` property which gets mutated due to scale transform. So containerView becomes `actualSize * scale * scale` instead of `actualSize * scale` and ends up clipping child views because of overflow hidden. Please checkout the layout hierarchy in the below screenshot. To fix it we need to use `self.bounds` instead of `self.frame` when setting the frame for container.

<img src="https://github.com/user-attachments/assets/9ce41756-f41f-4782-bfc9-b0c281f314b7" width="300px" />

## Changelog:

[IOS] [FIXED] - boxShadow + overflow hidden combination interfering with pointerEvents and transform scale.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
Test above example snippets and pointer events examples in RNTester.

cc - joevilches

Reviewed By: cortinico, jorge-cab

Differential Revision: D77872110

Pulled By: joevilches

fbshipit-source-id: e9693c79b47379531510607921ffaa6d6cc5c17b
2025-09-18 14:06:00 -07:00
Nicola Corti 1c5e0ffd9f Do not reset the native artifacts version to 1000.0.0 on release branches (#53817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53817

What is currently happening, is that the various commits on the release branches like `0.82-stable` are resetting the version of native artifacts to `1000.0.0-<SHA>`.

The reason is that during the `test-all` workflow, we pass the `dry-run` as release type.
That's to prevent the various tools from calling `npm publish` and so on.

The problem is that on the releases branches, the version was already set at branch cut time.
Therefore, we see the version 1000.0.0 reappearing during Android E2E test in the emulator. Similary this is also affecting iOS prebuilds so I'm attempting to fix it here.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82553599

fbshipit-source-id: 31a52e7df036e700663b3d3dd677973a7a210a30
2025-09-18 10:53:25 -07:00
Alex Hunt 5b8827939d Support additional PerformanceResourceTiming fields (#53815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53815

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D82561777

fbshipit-source-id: f387c4bca2112111e736433af90ada16efd14e8b
2025-09-18 09:57:25 -07:00
Andrew Datsenko e97ef8f1fb Fix dotslash issue in OD (#53842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53842

Changelog: [Internal]
There is a conflict between dotslash in node_modules and in OD it does not invoke buck2

Reviewed By: javache

Differential Revision: D82724326

fbshipit-source-id: c90cab58818e0245f8763b729c7e5432735eb05e
2025-09-18 07:39:22 -07:00
Nick Lefever e6390703e7 Fix scroll view FPS listener reset on init (#53838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53838

The FPS listener is being assigned to all scroll view instances by the scroll view manager. This listener should not be reset when the view is being recycled and should stay assigned at all times.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D82720151

fbshipit-source-id: a2a37bad93efaa6e435725adf16c9ad1b4207ba0
2025-09-18 05:35:09 -07:00
generatedunixname537391475639613 aacb9898f2 xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils/TemplateStringLiteral.h (#53836)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53836

Reviewed By: rshest

Differential Revision: D82428779

fbshipit-source-id: 2716784a85c4885fe438348666b4772c2da3c400
2025-09-18 04:56:38 -07:00
Nicola Corti 460394e4b8 Turn on enableSwiftUIBasedFilters in the experimental channel (#53794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53794

Basically what the title says. This is needed by Expo for experimetation.

Changelog:
[Internal] [Changed] -

Reviewed By: joevilches

Differential Revision: D82530292

fbshipit-source-id: 82ce8b1e8fc8d954cc04ec456ad80f769aedafe7
2025-09-18 04:34:47 -07:00
Nicola Corti 968ec9e093 Unpin version from react-native-android in run_fantom_tests (#53795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53795

I've published another docker image that should now work and unblock `run_fantom_tests`
so we don't need to pin the version to `v18.0` anymore:
https://github.com/react-native-community/docker-android

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82532516

fbshipit-source-id: 980c2feb053f9d096e70f37bb690e18cc8b87dc0
2025-09-18 04:12:50 -07:00
Alex Hunt 6ef351b3ce Move trace event handling into NetworkReporter (#53776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53776

Refactor and improve how we emit CDP trace events for network requests.

Key changes:
- Split up `PerformanceTracer` methods into discrete trace events.
- Move event calls out of `PerformanceEntryReporter` (upwards) into `NetworkReporter`. This now:
    - Aligns better with the matching source `NetworkReporter` events.
    - Removes metadata pieces from `PerformanceEntryReporter` that weren't part of the Web `PerformanceResourceTiming` API.
- Populate additional fields on `ResourceReceiveResponse`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82433225

fbshipit-source-id: 4fce219f0c86a7257b8df250ef9f2b4ec8bd8de3
2025-09-18 03:01:22 -07:00
Jakub Piasecki 674fb77d93 Update coordinates for remote artifacts of Hermes V1 (#53822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53822

Changelog: [GENERAL][FIXED] - Fixed coordinates for Hermes V1 artifacts

Reviewed By: cortinico

Differential Revision: D82639319

fbshipit-source-id: becfab3248f2314af97549eb94feb27b19f5d1af
2025-09-18 01:26:08 -07:00
Devan Buggay 14458d8699 Add focus/blur commands to View (#53828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53828

Adds focus and blur commands to Android views.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82644681

fbshipit-source-id: 96fa6370e177c91742d285b0b158b77447d105f6
2025-09-18 00:36:55 -07:00
Devan Buggay 2945fa6e0e Hook up focus/blur events (#53827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53827

Hook up focus/blur events to view.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146291

fbshipit-source-id: 3cb90d22c00d067099c4c6fac734f27030d87639
2025-09-18 00:36:55 -07:00
Devan Buggay 07b5802ee5 focus/blur event emission (#53826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53826

Wires up focus/blur events to the base event emitter, gated by enabledImperativeFocus feature flag.

https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146275

fbshipit-source-id: 4b7bb1336f74bb0de2d7ecf0737dd63067bd558f
2025-09-18 00:36:55 -07:00