Summary:
This test was still using the old `BridgeReactContext`, I'm migrating it to `BridgelessReactContext`.
## Changelog:
[INTERNAL] -
Test Plan: CI
Reviewed By: mdvacca
Differential Revision: D79801564
Pulled By: cortinico
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!
<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
diff-train-source-id: 7da6014535999d256d2846aadbb7fc1373d76253
Generated by: https://www.internalfb.com/intern/sandcastle/job/18014400563434324/
GitHub Repo: facebook/react
Changelog: [Internal]
Reviewed By: jackpope
Differential Revision: D79754431
fbshipit-source-id: 027428142f36683b07cb66112335f75ecfb5dd12
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53137
One of those 2 methods can be deprecated as it was used only for old architecture.
We'll be removing it at some point in the future.
Changelog:
[Android] [Deprecated] - DefaultDevSupportManagerFactory.create() method used for Old Arch
Reviewed By: rshest
Differential Revision: D79806116
fbshipit-source-id: ad2d5515f93bb85e3b7c495b369078f4c66d143b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53133
# Changelog:
[Internal] -
As part of the ongoing effort to migrate the React Native codebase to Kotlin, this PR introduces the initial setup required for Kotlin support in Yoga.
- Added initial basic Kotlin configuration to the project.
- Migrated `YogaConstants` as an initial file to try out the first migration steps.
X-link: https://github.com/facebook/yoga/pull/1829
Test Plan:
- Tested the migrated class directly against facebook/react-native, see the PR [here](https://github.com/facebook/react-native/pull/52998).
- Run: `./gradlew :yoga:assembleDebug` & `./gradlew :yoga:compileDebugSources`
I am not able to run the Java tests in this repo (even before the initial Kotlin setup) – not sure if I am missing something there but any pointers are welcome – it seems like there is some missing configuration. Currently trying with `./gradlew :yoga:test`
Reviewed By: cortinico
Differential Revision: D79545992
Pulled By: rshest
fbshipit-source-id: 8257ff53e6b6f2436980be98b6c94e1ac526b207
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53097
# Changelog:
[Internal] -
This makes the benchmark results comparison printout, added in https://github.com/facebook/react-native/pull/52925, be done in a tabular form, so it's easier to read and copy/paste around.
Reviewed By: lenaic
Differential Revision: D79728695
fbshipit-source-id: 4dfc999ad4a9a8c2d67efdfce11aff75383cf645
Summary:
- Switches fmt_config to fast_float_config so it matches what is used in the method
When trying to use a forked version of the Pod it is not possible to set a new repo for Fast Float. This was caused by a typo in the method used to update the configuration of where to find the Pod.
## Changelog:
[IOS] [FIXED] - Fixed variable naming error in set_fast_float_config method in react_native_pods.rb
Pull Request resolved: https://github.com/facebook/react-native/pull/53129
Test Plan: Add the line `set_fast_float_config({:git => 'some-git-repo'})` to an application's Podfile
Reviewed By: cortinico
Differential Revision: D79805939
Pulled By: cipolleschi
fbshipit-source-id: 9705e1f63e21b788362ca94b74e32bce0177a729
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53132
This will prevent the Firebase script from running at all. I'm removing it.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D79801691
fbshipit-source-id: 2705dff93fc9dbbcfaf97a1ba29b69d4d0a8143c
Summary:
This PR (initially created for edge-to-edge opt-in support, rebased multiple times) fixes the `Dimensions` API `window` values on Android < 15, when edge-to-edge is enabled.
Currently the window height doesn't include the status and navigation bar heights (but it does on Android >= 15):
<img width="300" alt="Screenshot 2025-06-27 at 16 23 02" src="https://github.com/user-attachments/assets/c7d11334-9298-4f7f-a75c-590df8cc2d8a" />
Using `WindowMetricsCalculator` from AndroidX:
<img width="300" alt="Screenshot 2025-06-27 at 16 34 01" src="https://github.com/user-attachments/assets/7a4e3dc7-a83b-421b-8f6d-fd1344f5fe81" />
Fixes https://github.com/facebook/react-native/issues/47080
## Changelog:
[Android] [Fixed] Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled
Pull Request resolved: https://github.com/facebook/react-native/pull/52738
Test Plan:
Run the example app on an Android < 15 device.
Rollback Plan:
Reviewed By: cipolleschi, Abbondanzo
Differential Revision: D78738516
Pulled By: alanleedev
fbshipit-source-id: fdb22f3cc76b0bda987db426cb015124bcacdc84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53041
update `DisplayMetricsHolder.getWindowDisplayMetrics()` to `getScreenDisplayMetrics()`.
Where window width and height is not needed, prefer to use `screenDisplayMetrics` as with upcoming diff `windowDisplayMetrics` initialization only happen using UiContext and have potential to cause more issues if used unnecessarily.
Changelog: [Internal] Update `DisplayMetricsHolder.getWindowDisplayMetrics()` to use `.getScreenDisplayMetrics()`
Reviewed By: mlord93
Differential Revision: D79571226
fbshipit-source-id: d90fca36c119318e7a2dfa6953fc2148b35e83d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53117
Sending the mode is no longer needed as you can't opt out of legacy arch any longer, and was only used for printing a (NOBRIDGE) prefix.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D79762592
fbshipit-source-id: 845aabf2a8365c88808990ea481503b23597a8a0
Summary:
Refactors the window focus detection feature flag logic in `VirtualView` (Android) to eliminate one instance property and instead utilize the existence of the focus listener to determine whether window focus detection is enabled.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D79743782
fbshipit-source-id: d12e70d8e52b72d546ff097c3b1bcfbd29fb9129
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52838
**Context**
Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.
**This diff**
Wires up a client/subscriber for the `"__chromium_devtools_metrics_reporter"` runtime binding (to which we emit live metrics events since D78904748). This will be used to unpack these performance updates to send to the host platform.
- Creates a new `HostRuntimeBinding` helper, which establishes a local/private CDP session.
- Conditionally installs our perf metrics runtime binding in `HostTarget` when `perfMonitorV2Enabled` is set.
- Wires up a new `onPerfMonitorUpdate` event on `HostTargetDelegate` (unimplemented until the next diff).
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D78904766
fbshipit-source-id: 991f17a4cc69f574917750053a5da31bbc6dc0d5
Summary:
The `aria-label` prop was ignored on `TextInput` component. Which resulted in screen reader not able to read it.
This PR forwards `aria-label` to `accessibilityLabel` in a manner similar to e.g. `View` and `Text`
## 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
-->
[GENERAL] [FIXED] - a11y: fix `aria-label` on `TextInput`
Pull Request resolved: https://github.com/facebook/react-native/pull/53051
Test Plan:
Run RNTester => TextInput => Accessibility section under Accessibility Inspector or screen reader.
iOS fixed:
https://github.com/user-attachments/assets/68c3a2ef-7dfe-479c-97fc-cbe72108c45c
iOS baseline:
https://github.com/user-attachments/assets/2e8372ba-10dc-47d2-b6b1-9f664000de7d
Reviewed By: andrewdacenko
Differential Revision: D79635413
Pulled By: rshest
fbshipit-source-id: dd2f583d67c6c6c6393e02c5fe534308e1e2f921
Summary:
`react-native/codegen` uses `babel/parser` and `babel/core` but does not declare dependency on them. Depending on how packages are hoisted (and especially in pnpm setups), this causes crashes during codegen.
Resolves https://github.com/facebook/react-native/issues/52883
## Changelog:
[GENERAL] [FIXED] - Add missing Babel dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/52884
Test Plan: See https://github.com/facebook/react-native/issues/52883
Reviewed By: cortinico, christophpurrer
Differential Revision: D79103092
Pulled By: robhogan
fbshipit-source-id: ecaf690f994393a652ea7f0d4f30bbabeb23a434
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53055
Moves the C++ part of `InspectorNetworkReporter.kt` into the `react_devsupportjni` JNI library, and adds missing `SoLoader.loadLibrary` call.
Replaces D79568759 / https://github.com/facebook/react-native/pull/53036.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D79638331
fbshipit-source-id: 5df450ad80e4532d6ada1e4dab51a1de6418a4e0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53059
# Changelog:
[Internal] -
This is a re-submit of the partially reverted https://github.com/facebook/react-native/pull/52905, which should work fine now on top of the changes stack that support the RN feature flags being safely used on the modules' top level.
Reviewed By: rubennorte
Differential Revision: D79640965
fbshipit-source-id: d8bda0dba662930d1343ea9d5155791a686b653b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53080
# Changelog: [Internal]
We were accidentally resetting this before calculating the timestampf for the TracingStartedInPage event, which is the left boundary for the timeline window.
Reviewed By: sbuggay
Differential Revision: D79670865
fbshipit-source-id: c6b5f869e185d6d3c80cb7153891c72283c82418
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53077
# Changelog: [Internal]
Stores the tracing::Mode on a TraceRecordingState and updates the logic for:
- InstanceTracingAgent to enable PerformanceTracer with a specified window size
- RuntimeTracingAgent to only enable sampling profiler for CDP-initiated sessions
Reviewed By: sbuggay
Differential Revision: D79670864
fbshipit-source-id: 2c4eacb29666b59acbc508848a0a3d859f21a403
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53039
# Changelog: [Internal]
We can now distinguish these 2 different modes.
Reviewed By: sbuggay
Differential Revision: D79565934
fbshipit-source-id: 780678d1f50d4c1d73d55ebc95da0ea328fa2cb3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53035
# Changelog: [Internal]
This adds an ability to distinguish different trace recordings, based on mode
Reviewed By: sbuggay
Differential Revision: D79557790
fbshipit-source-id: cbb216df86fa1a4692e1b82c8a14a6049b5c45ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52960
# Changelog: [Internal]
We never call `stopTracing()` on a HostTarget, if the Agent was destroyed.
This could only happen if the session was destroyed. There could me multiple sessions, so we have to keep the source of truth for recording status in a session state.
Reviewed By: sbuggay
Differential Revision: D79435494
fbshipit-source-id: db72ffdf6856974e980afa78d59dec4bf45df289
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52961
# Changelog: [Internal]
Now that we've implemented all required serializers and TraceRecordedState has everything needed, we can migrate TracingAgent to use this new infra.
Reviewed By: sbuggay
Differential Revision: D79433497
fbshipit-source-id: 8c63f0faa50844786b7af8860c22fc006dd38414
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52964
# Changelog: [Internal]
Now TraceRecordingState should capture everything we need in order to display a trace on a timeline.
We just need to serialize it properly into collection of serialized Trace Events that would be sent via `Tracing.dataCollected` CDP events.
This is what this serializer is doing.
Reviewed By: sbuggay
Differential Revision: D79434655
fbshipit-source-id: 6b6858db23077eb7305781b9b0d98af8dedd68ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52967
# Changelog: [Internal]
We would need this to correctly serialize Runtime Sampling Profiles.
In case of recording the trace in the background, this might not be the value we would want to use, we would probably add another field or calculate it dynamically, depending on the tracing mode.
This is not the case for now, will be solved separately on top of the stack.
Reviewed By: sbuggay
Differential Revision: D79433502
fbshipit-source-id: 172ff19985d325585590794fb2523a24a6860221
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52963
# Changelog: [Internal]
We are deprecating previous `InstanceTarcingProfile` struct, but not removing yet, since this is still used and we will migrate in one of the diffs at the top of the stack.
The `InstanceTracingProfile` will consist only of Trace Events that were captured by PerformanceTracer, and will not store Runtime Sampling Profiles.
There are multiple reasons for this:
1. As of right now, Runtime Sampling Profiles are completely independant from Instance Profiles and do not require anythings from Instance as a Target to be represented on a timeline.
2. Although PerformanceTracer is a singleton, it should be this way. It captures events for something that can only be dispatched if there is an allocated React Instance, so in the future PerformanceTracer could become a data-member of InstanceTarget.
Reviewed By: sbuggay
Differential Revision: D79433498
fbshipit-source-id: 0fdf09517488bc5c6c8eb604aee66535cdc19ffb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52968
# Changelog: [Internal]
Now that we've defined all actors and relationship between Agents, we can start recording profiles and store them on a recording state.
Reviewed By: sbuggay
Differential Revision: D79415396
fbshipit-source-id: 9639e59d619268d970b895da2e19dfd92c963a32
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52966
# Changelog: [Internal]
The current design for Tracing is flawed. Right now the logic is mostly scattered around CDP Agents, lifetime of which is tied to CDP session.
This diff introduces a new approach:
- The HostTarget will be the only Target that has public entrypoints to startTracing as part of the jsinspector backend.
- It will create and own TraceRecording that acts as a local session. We won't use wording session here, because it is already reserved for CDP case.
- Every Target will implement TracingAgent, lifetime of which will be limited by lifetime of either Target or TraceRecording.
- All these TracingAgent will have a reference to TraceRecordingState, which they can mutate
This approach unblocks:
- Recording traces without active CDP sessions, for example in a background.
- Recording full instance reloads and multiple profiles for Instances and Runtimes.
{F1980838032}
Reviewed By: sbuggay
Differential Revision: D79371359
fbshipit-source-id: 034e984fd7e977457bd41a980e5feb049db3339d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53072
Changelog: [internal]
This creates a test to make sure there are no changes in React Native dramatically increasing memory usage in simple scenarios.
Reviewed By: rshest
Differential Revision: D79646758
fbshipit-source-id: d7a863468adabb75de7ceb123d96131564bd0959
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53071
Changelog: [internal]
The current API to take JS heap snapshots has some problems:
1. Ergonomics: it requires you to input the filepath where you want to store the snapshot. This isn't aligned with the behavior we have for JS traces where the output path is provided to you.
2. It doesn't work in optimized builds, as it requires a specific option in Hermes.
For 1), this replaces `Fantom.saveJSMemoryHeapSnapshot(filePath)` with `Fantom.takeJSMemoryHeapSnapshot()` that outputs the snapshot in a predefined path and prints it to the console.
For 2), this adds a new environment variable to force building Hermes with memory instrumentation (`FANTOM_ENABLE_JS_MEMORY_INSTRUMENTATION`). This is exposed as an option and not set by default because it has a performance overhead at runtime that we don't want to pay (especially in benchmarks).
This option only works when using Buck in development, because we want to generate this new binary type on demand when necessary, instead of making it part of the prebuilts we do before running tests in OSS and CI.
Reviewed By: lenaic
Differential Revision: D79642314
fbshipit-source-id: a2980616a495bd6dca29c0709a9581db6fb3f2cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53069
Changelog: [internal]
This changes the names of the JS traces from Fantom from using a unix timestamp in the file name to using the ISO date:
- From: `View-itest.js-1754406329686.cpuprofile`
- To: `View-itest.js-2025-08-05T15:05:29.686Z.cpuprofile`
Reviewed By: rshest
Differential Revision: D79646760
fbshipit-source-id: d8a654724c1abc2d3e285ee658c2d390d3241d82