Add per-platform redBoxV2 feature flags

Summary:
Add `redBoxV2IOS` and `redBoxV2Android` common feature flags (default false), gating RedBox 2.0 independently on each platform.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D98115369

fbshipit-source-id: b4e80c24d22fc604df86c0be042cea57ca0de015
This commit is contained in:
Moti Zilberman authored and meta-codesync[bot] committed 2026-04-21 12:54:35 -07:00
1 parent fed907bf52
commit d6ed561f52
20 files changed
+274 -40

No files matched your search

@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4ee7b2e0a88bc5087e0739658810dee5>>
* @generated SignedSource<<82da59cbfb06937bba284ff1df2c64d6>>
*/
/**
@@ -450,6 +450,18 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun preventShadowTreeCommitExhaustion(): Boolean = accessor.preventShadowTreeCommitExhaustion()
/**
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
*/
@JvmStatic
public fun redBoxV2Android(): Boolean = accessor.redBoxV2Android()
/**
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
*/
@JvmStatic
public fun redBoxV2IOS(): Boolean = accessor.redBoxV2IOS()
/**
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<87405910d0abf422badc45d1510ad702>>
* @generated SignedSource<<b6d6b8aae3449760d857e5dd52588b03>>
*/
/**
@@ -90,6 +90,8 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var perfMonitorV2EnabledCache: Boolean? = null
private var preparedTextCacheSizeCache: Double? = null
private var preventShadowTreeCommitExhaustionCache: Boolean? = null
private var redBoxV2AndroidCache: Boolean? = null
private var redBoxV2IOSCache: Boolean? = null
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
@@ -741,6 +743,24 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun redBoxV2Android(): Boolean {
var cached = redBoxV2AndroidCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.redBoxV2Android()
redBoxV2AndroidCache = cached
}
return cached
}
override fun redBoxV2IOS(): Boolean {
var cached = redBoxV2IOSCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.redBoxV2IOS()
redBoxV2IOSCache = cached
}
return cached
}
override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean {
var cached = shouldPressibilityUseW3CPointerEventsForHoverCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c0f1210cabc66cc1b3fdbf8473d1df11>>
* @generated SignedSource<<7ca56a7b519e6e1619931447dcc1672a>>
*/
/**
@@ -168,6 +168,10 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun preventShadowTreeCommitExhaustion(): Boolean
@DoNotStrip @JvmStatic public external fun redBoxV2Android(): Boolean
@DoNotStrip @JvmStatic public external fun redBoxV2IOS(): Boolean
@DoNotStrip @JvmStatic public external fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean
@DoNotStrip @JvmStatic public external fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<73ce7f74a1fc0843a91d2fe11615b333>>
* @generated SignedSource<<fe424de3f03b5f2ee20b83896eef01b1>>
*/
/**
@@ -163,6 +163,10 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun preventShadowTreeCommitExhaustion(): Boolean = false
override fun redBoxV2Android(): Boolean = false
override fun redBoxV2IOS(): Boolean = false
override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean = false
override fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a070acdbab967adb2c8c81e9e89b8636>>
* @generated SignedSource<<0de759cf10c9d77c9938f9dac257aada>>
*/
/**
@@ -94,6 +94,8 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var perfMonitorV2EnabledCache: Boolean? = null
private var preparedTextCacheSizeCache: Double? = null
private var preventShadowTreeCommitExhaustionCache: Boolean? = null
private var redBoxV2AndroidCache: Boolean? = null
private var redBoxV2IOSCache: Boolean? = null
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
@@ -815,6 +817,26 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun redBoxV2Android(): Boolean {
var cached = redBoxV2AndroidCache
if (cached == null) {
cached = currentProvider.redBoxV2Android()
accessedFeatureFlags.add("redBoxV2Android")
redBoxV2AndroidCache = cached
}
return cached
}
override fun redBoxV2IOS(): Boolean {
var cached = redBoxV2IOSCache
if (cached == null) {
cached = currentProvider.redBoxV2IOS()
accessedFeatureFlags.add("redBoxV2IOS")
redBoxV2IOSCache = cached
}
return cached
}
override fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean {
var cached = shouldPressibilityUseW3CPointerEventsForHoverCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2de065dd6f726ad92376e2385e134c7e>>
* @generated SignedSource<<dd7ae1c5f86fa273402e5b64a8636528>>
*/
/**
@@ -163,6 +163,10 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun preventShadowTreeCommitExhaustion(): Boolean
@DoNotStrip public fun redBoxV2Android(): Boolean
@DoNotStrip public fun redBoxV2IOS(): Boolean
@DoNotStrip public fun shouldPressibilityUseW3CPointerEventsForHover(): Boolean
@DoNotStrip public fun shouldTriggerResponderTransferOnScrollAndroid(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2c9c4c2ef57882df723930daa933afd8>>
* @generated SignedSource<<411aef7b1b977407b52e4f23e95db0a5>>
*/
/**
@@ -459,6 +459,18 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool redBoxV2Android() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("redBoxV2Android");
return method(javaProvider_);
}
bool redBoxV2IOS() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("redBoxV2IOS");
return method(javaProvider_);
}
bool shouldPressibilityUseW3CPointerEventsForHover() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("shouldPressibilityUseW3CPointerEventsForHover");
@@ -933,6 +945,16 @@ bool JReactNativeFeatureFlagsCxxInterop::preventShadowTreeCommitExhaustion(
return ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion();
}
bool JReactNativeFeatureFlagsCxxInterop::redBoxV2Android(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::redBoxV2Android();
}
bool JReactNativeFeatureFlagsCxxInterop::redBoxV2IOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::redBoxV2IOS();
}
bool JReactNativeFeatureFlagsCxxInterop::shouldPressibilityUseW3CPointerEventsForHover(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover();
@@ -1274,6 +1296,12 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"preventShadowTreeCommitExhaustion",
JReactNativeFeatureFlagsCxxInterop::preventShadowTreeCommitExhaustion),
makeNativeMethod(
"redBoxV2Android",
JReactNativeFeatureFlagsCxxInterop::redBoxV2Android),
makeNativeMethod(
"redBoxV2IOS",
JReactNativeFeatureFlagsCxxInterop::redBoxV2IOS),
makeNativeMethod(
"shouldPressibilityUseW3CPointerEventsForHover",
JReactNativeFeatureFlagsCxxInterop::shouldPressibilityUseW3CPointerEventsForHover),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d27bc9bf87498e16dff7eac56d52b9d1>>
* @generated SignedSource<<7b397abbf52289b37f424eef8e689cc8>>
*/
/**
@@ -240,6 +240,12 @@ class JReactNativeFeatureFlagsCxxInterop
static bool preventShadowTreeCommitExhaustion(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool redBoxV2Android(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool redBoxV2IOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool shouldPressibilityUseW3CPointerEventsForHover(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<eb31174e5f1e3f37503fe5c910a6b6c8>>
* @generated SignedSource<<505f532777eb5c18637f61b824600234>>
*/
/**
@@ -306,6 +306,14 @@ bool ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion() {
return getAccessor().preventShadowTreeCommitExhaustion();
}
bool ReactNativeFeatureFlags::redBoxV2Android() {
return getAccessor().redBoxV2Android();
}
bool ReactNativeFeatureFlags::redBoxV2IOS() {
return getAccessor().redBoxV2IOS();
}
bool ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover() {
return getAccessor().shouldPressibilityUseW3CPointerEventsForHover();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d9e55ee2af90103f57394e9683a0ac16>>
* @generated SignedSource<<ec9479d555f4e08095fbde0bfd09c479>>
*/
/**
@@ -389,6 +389,16 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool preventShadowTreeCommitExhaustion();
/**
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
*/
RN_EXPORT static bool redBoxV2Android();
/**
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
*/
RN_EXPORT static bool redBoxV2IOS();
/**
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d3a6f97a3e5eb7baac653a9b105db20d>>
* @generated SignedSource<<c50301c8f290cf0bb338a606c1cc518f>>
*/
/**
@@ -1289,6 +1289,42 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::redBoxV2Android() {
auto flagValue = redBoxV2Android_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(70, "redBoxV2Android");
flagValue = currentProvider_->redBoxV2Android();
redBoxV2Android_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::redBoxV2IOS() {
auto flagValue = redBoxV2IOS_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(71, "redBoxV2IOS");
flagValue = currentProvider_->redBoxV2IOS();
redBoxV2IOS_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHover() {
auto flagValue = shouldPressibilityUseW3CPointerEventsForHover_.load();
@@ -1298,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(70, "shouldPressibilityUseW3CPointerEventsForHover");
markFlagAsAccessed(72, "shouldPressibilityUseW3CPointerEventsForHover");
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
@@ -1316,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(71, "shouldTriggerResponderTransferOnScrollAndroid");
markFlagAsAccessed(73, "shouldTriggerResponderTransferOnScrollAndroid");
flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid();
shouldTriggerResponderTransferOnScrollAndroid_ = flagValue;
@@ -1334,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(72, "skipActivityIdentityAssertionOnHostPause");
markFlagAsAccessed(74, "skipActivityIdentityAssertionOnHostPause");
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
skipActivityIdentityAssertionOnHostPause_ = flagValue;
@@ -1352,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::syncAndroidClipToPaddingWithOverflow() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(73, "syncAndroidClipToPaddingWithOverflow");
markFlagAsAccessed(75, "syncAndroidClipToPaddingWithOverflow");
flagValue = currentProvider_->syncAndroidClipToPaddingWithOverflow();
syncAndroidClipToPaddingWithOverflow_ = flagValue;
@@ -1370,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(74, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(76, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -1388,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(75, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(77, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -1406,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitT
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(76, "updateRuntimeShadowNodeReferencesOnCommitThread");
markFlagAsAccessed(78, "updateRuntimeShadowNodeReferencesOnCommitThread");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
@@ -1424,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(77, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(79, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -1442,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(78, "useFabricInterop");
markFlagAsAccessed(80, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -1460,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useLISAlgorithmInDifferentiator() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(79, "useLISAlgorithmInDifferentiator");
markFlagAsAccessed(81, "useLISAlgorithmInDifferentiator");
flagValue = currentProvider_->useLISAlgorithmInDifferentiator();
useLISAlgorithmInDifferentiator_ = flagValue;
@@ -1478,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(80, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(82, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -1496,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(81, "useNestedScrollViewAndroid");
markFlagAsAccessed(83, "useNestedScrollViewAndroid");
flagValue = currentProvider_->useNestedScrollViewAndroid();
useNestedScrollViewAndroid_ = flagValue;
@@ -1514,7 +1550,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(82, "useSharedAnimatedBackend");
markFlagAsAccessed(84, "useSharedAnimatedBackend");
flagValue = currentProvider_->useSharedAnimatedBackend();
useSharedAnimatedBackend_ = flagValue;
@@ -1532,7 +1568,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(83, "useTraitHiddenOnAndroid");
markFlagAsAccessed(85, "useTraitHiddenOnAndroid");
flagValue = currentProvider_->useTraitHiddenOnAndroid();
useTraitHiddenOnAndroid_ = flagValue;
@@ -1550,7 +1586,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(84, "useTurboModuleInterop");
markFlagAsAccessed(86, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -1568,7 +1604,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(85, "useTurboModules");
markFlagAsAccessed(87, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -1586,7 +1622,7 @@ bool ReactNativeFeatureFlagsAccessor::useUnorderedMapInDifferentiator() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(86, "useUnorderedMapInDifferentiator");
markFlagAsAccessed(88, "useUnorderedMapInDifferentiator");
flagValue = currentProvider_->useUnorderedMapInDifferentiator();
useUnorderedMapInDifferentiator_ = flagValue;
@@ -1604,7 +1640,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(87, "viewCullingOutsetRatio");
markFlagAsAccessed(89, "viewCullingOutsetRatio");
flagValue = currentProvider_->viewCullingOutsetRatio();
viewCullingOutsetRatio_ = flagValue;
@@ -1622,7 +1658,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(88, "viewTransitionEnabled");
markFlagAsAccessed(90, "viewTransitionEnabled");
flagValue = currentProvider_->viewTransitionEnabled();
viewTransitionEnabled_ = flagValue;
@@ -1640,7 +1676,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(89, "virtualViewPrerenderRatio");
markFlagAsAccessed(91, "virtualViewPrerenderRatio");
flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ce4d2368e810200293289edf0354c0c2>>
* @generated SignedSource<<a8a4fabae0ec50559568577e6dc35efb>>
*/
/**
@@ -102,6 +102,8 @@ class ReactNativeFeatureFlagsAccessor {
bool perfMonitorV2Enabled();
double preparedTextCacheSize();
bool preventShadowTreeCommitExhaustion();
bool redBoxV2Android();
bool redBoxV2IOS();
bool shouldPressibilityUseW3CPointerEventsForHover();
bool shouldTriggerResponderTransferOnScrollAndroid();
bool skipActivityIdentityAssertionOnHostPause();
@@ -133,7 +135,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 90> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 92> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
@@ -205,6 +207,8 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> perfMonitorV2Enabled_;
std::atomic<std::optional<double>> preparedTextCacheSize_;
std::atomic<std::optional<bool>> preventShadowTreeCommitExhaustion_;
std::atomic<std::optional<bool>> redBoxV2Android_;
std::atomic<std::optional<bool>> redBoxV2IOS_;
std::atomic<std::optional<bool>> shouldPressibilityUseW3CPointerEventsForHover_;
std::atomic<std::optional<bool>> shouldTriggerResponderTransferOnScrollAndroid_;
std::atomic<std::optional<bool>> skipActivityIdentityAssertionOnHostPause_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<830f0c43b8031c84208bed9b4bedc607>>
* @generated SignedSource<<f6932d0a9c4afcb1b00eb1feba80c823>>
*/
/**
@@ -307,6 +307,14 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool redBoxV2Android() override {
return false;
}
bool redBoxV2IOS() override {
return false;
}
bool shouldPressibilityUseW3CPointerEventsForHover() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5af61ff2e2372ec457de6b3588d099cc>>
* @generated SignedSource<<84350973e4f2cb0783d0553cffc831f8>>
*/
/**
@@ -675,6 +675,24 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::preventShadowTreeCommitExhaustion();
}
bool redBoxV2Android() override {
auto value = values_["redBoxV2Android"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::redBoxV2Android();
}
bool redBoxV2IOS() override {
auto value = values_["redBoxV2IOS"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::redBoxV2IOS();
}
bool shouldPressibilityUseW3CPointerEventsForHover() override {
auto value = values_["shouldPressibilityUseW3CPointerEventsForHover"];
if (!value.isNull()) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ea6ddb3500dbdbebd0b9b9e9fbfeccce>>
* @generated SignedSource<<621857ef3e1c4781a75af981f2fdf2ba>>
*/
/**
@@ -95,6 +95,8 @@ class ReactNativeFeatureFlagsProvider {
virtual bool perfMonitorV2Enabled() = 0;
virtual double preparedTextCacheSize() = 0;
virtual bool preventShadowTreeCommitExhaustion() = 0;
virtual bool redBoxV2Android() = 0;
virtual bool redBoxV2IOS() = 0;
virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0;
virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0;
virtual bool skipActivityIdentityAssertionOnHostPause() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<dfc9fd9ddf5f24ae1dfd55a20794078c>>
* @generated SignedSource<<5b2d4d0d38a1dd82815af31c2e8b2063>>
*/
/**
@@ -394,6 +394,16 @@ bool NativeReactNativeFeatureFlags::preventShadowTreeCommitExhaustion(
return ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion();
}
bool NativeReactNativeFeatureFlags::redBoxV2Android(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::redBoxV2Android();
}
bool NativeReactNativeFeatureFlags::redBoxV2IOS(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::redBoxV2IOS();
}
bool NativeReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d85efd683ff977bd45f81494065d8452>>
* @generated SignedSource<<877387fd0971e2e6c4ed81ec60ce3f2b>>
*/
/**
@@ -176,6 +176,10 @@ class NativeReactNativeFeatureFlags
bool preventShadowTreeCommitExhaustion(jsi::Runtime& runtime);
bool redBoxV2Android(jsi::Runtime& runtime);
bool redBoxV2IOS(jsi::Runtime& runtime);
bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime& runtime);
bool shouldTriggerResponderTransferOnScrollAndroid(jsi::Runtime& runtime);
@@ -796,6 +796,28 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'experimental',
},
redBoxV2Android: {
defaultValue: false,
metadata: {
dateAdded: '2026-03-25',
description:
'Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.',
expectedReleaseValue: true,
purpose: 'experimentation',
},
ossReleaseStage: 'none',
},
redBoxV2IOS: {
defaultValue: false,
metadata: {
dateAdded: '2026-03-25',
description:
'Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.',
expectedReleaseValue: true,
purpose: 'experimentation',
},
ossReleaseStage: 'none',
},
shouldPressibilityUseW3CPointerEventsForHover: {
defaultValue: false,
metadata: {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ddc52e9c3dd98048c7d5018ddfccc353>>
* @generated SignedSource<<615cabb1e51b7bf29c58e68141e603e3>>
* @flow strict
* @noformat
*/
@@ -117,6 +117,8 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
perfMonitorV2Enabled: Getter<boolean>,
preparedTextCacheSize: Getter<number>,
preventShadowTreeCommitExhaustion: Getter<boolean>,
redBoxV2Android: Getter<boolean>,
redBoxV2IOS: Getter<boolean>,
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
@@ -483,6 +485,14 @@ export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('pre
* Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
*/
export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
/**
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
*/
export const redBoxV2Android: Getter<boolean> = createNativeFlagGetter('redBoxV2Android', false);
/**
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
*/
export const redBoxV2IOS: Getter<boolean> = createNativeFlagGetter('redBoxV2IOS', false);
/**
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<cd978192cd2d37ace4b886c03b60aeaa>>
* @generated SignedSource<<af90304d252d40df52756ab27d5523f7>>
* @flow strict
* @noformat
*/
@@ -95,6 +95,8 @@ export interface Spec extends TurboModule {
+perfMonitorV2Enabled?: () => boolean;
+preparedTextCacheSize?: () => number;
+preventShadowTreeCommitExhaustion?: () => boolean;
+redBoxV2Android?: () => boolean;
+redBoxV2IOS?: () => boolean;
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
+skipActivityIdentityAssertionOnHostPause?: () => boolean;