Repository navigation
Conversation
2 tasks
WoLewicki
approved these changes
Sep 11, 2026
Adds the `enableMountingCoordinatorPullModelAndroid` experiment flag (default off) that gates the Android pull-model mounting migration. Config entry plus regenerated accessors only - no behavior change. Cherry-pick of react/react-native@ece0efe. The generated feature flag files conflicted because this fork's flag set has diverged from upstream, so they were regenerated from the config with `yarn featureflags` instead of being merged by hand. Co-authored-by: Cursor <cursoragent@cursor.com>
Flip the flag's defaultValue to true and regenerate the feature-flag boilerplate with `yarn featureflags --update`. The config's own metadata already declared expectedReleaseValue: true. Neither app-side provider overrides the flag, so the default applies directly: ReactNativeNewArchitectureFeatureFlagsDefaults (Android) and ReactNativeFeatureFlagsOverridesOSSStable (iOS) both inherit it. Note: this is inert on this branch. The flag has no consumers here or upstream at ece0efe -- that commit only defines it, and the migration it gates (PullTransactionMountItem enqueued in MountItemDispatcher, so the UI thread pulls the transaction instead of the commit thread building the batch in schedulerShouldRenderTransactions) lands in later upstream commits that are not cherry-picked here. Setting true now records intent so the path is on once the implementation arrives. This is a separate mechanism from usePullModelOnAndroid, which this fork already defaults to true and which does have consumers in FabricUIManagerBinding.cpp and FabricUIManager.java. Upstream has since removed that flag, having graduated it. Before the implementation is backported, check the dependencies named in the flag description: enableAccumulatedUpdatesInRawPropsAndroid is already true, but enableExclusivePropsUpdateAndroid and enablePropsUpdateReconciliationAndroid are both still false, and the latter two are required when Props 2.0 is in use. Co-authored-by: Cursor <cursoragent@cursor.com>
piaskowyk
force-pushed
the
piaskowyk/cherry-pick-mounting-coordinator-pull-model-flag
branch
from
October 20, 2026 15:53
095dd1d to
95bafdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-pick of facebook/react-native@ece0efe (facebook/react-native#57581) onto
0.86.0-discord, with the flag's default flipped fromfalsetotrue.enableMountingCoordinatorPullModelAndroidgates the Android pull-model mounting migration: the UI thread pulls the transaction itself via aPullTransactionMountItemenqueued in theMountItemDispatcher, rather than the commit thread pulling and building the mount batch inschedulerShouldRenderTransactions.Two commits, so the upstream import and the Discord-specific default change stay reviewable apart:
Add enableMountingCoordinatorPullModelAndroid feature flag (#57581)— the upstream cherry-pick, unchanged in behavior.Default enableMountingCoordinatorPullModelAndroid to true— the Discord default flip.This is inert on this branch today
Worth being explicit, since the flag name suggests otherwise: flipping this default currently has no runtime effect. The upstream commit is flag-definition-only, 20 files of feature flag plumbing. There are no consumers of the flag in this branch, nor upstream at
ece0efe. The implementation it gates lands in later upstream commits that are not cherry-picked here.PullTransactionMountItemappears in this tree only inside the flag's own description string.The default is set to
truenow to record intent, so the path is on once the implementation is backported.Relationship to
usePullModelOnAndroidThis is a different, later migration than the pull model this fork already runs.
usePullModelOnAndroidalready defaults totruehere and does have real consumers inFabricUIManagerBinding.cppandFabricUIManager.java. Upstream has since removed that flag entirely, having graduated it. The new flag moves the pull down into theMountingCoordinator.Dependencies to check before the implementation is backported
The flag description names prerequisites. Current state on this branch:
enableAccumulatedUpdatesInRawPropsAndroidtrueenableExclusivePropsUpdateAndroidfalseenablePropsUpdateReconciliationAndroidfalseThe latter two are still off, so they need revisiting when the migration actually turns on.
Notes on the cherry-pick
The generated feature flag files conflicted, because this fork's flag set has diverged from upstream (the fork carries extra flags, so flag ordering and the
markFlagAsAccessedindices differ). Rather than hand-merging 19 generated files, I kept the fork's versions, applied the upstream change toReactNativeFeatureFlags.config.js(which merged cleanly), and regenerated withyarn featureflags.The resulting diff outside the config is exactly what you would expect: the new flag's accessors, the
markFlagAsAccessedindex shift for every alphabetically later flag, theaccessedFeatureFlags_array growing from 98 to 99, and updatedSignedSourcehashes. No existing flag was added, removed, or changed.Neither app-side provider overrides the flag, so the default applies directly:
ReactNativeNewArchitectureFeatureFlagsDefaults(Android) andReactNativeFeatureFlagsOverridesOSSStable(iOS) both inherit it.Test plan