Skip to content

[Discord] Enable preventShadowTreeCommitExhaustion by default - #51

Open
piaskowyk wants to merge 1 commit into
0.86.0-discordfrom
piaskowyk/enable-prevent-shadow-tree-commit-exhaustion
Open

piaskowyk wants to merge 1 commit into
0.86.0-discordfrom
piaskowyk/enable-prevent-shadow-tree-commit-exhaustion

Conversation

@piaskowyk

Copy link
Copy Markdown

Summary

Flips the preventShadowTreeCommitExhaustion React Native feature flag default to true.

This is a prerequisite for enabling Reanimated's DISABLE_COMMIT_PAUSING_MECHANISM static feature flag, which removes the jittering of animated components (e.g. sticky headers) while scrolling. Per the Reanimated docs, enabling DISABLE_COMMIT_PAUSING_MECHANISM without this flag can starve React commits and make the app unresponsive.

Upstream, the flag is ossReleaseStage: 'experimental' with expectedReleaseValue: true, so it is only reachable via the experimental release level. We enable it on its own instead of switching the release level, which would also turn on unrelated flags such as fixTextClippingAndroid15useBoundsForWidth.

The change is made in ReactNativeFeatureFlags.config.js, with the C++, Kotlin and JS files regenerated via yarn featureflags --update, following the same pattern as the earlier [Discord] Enable feature flags commit.

Test plan

  • yarn featureflags reports no drift between the config and the generated files
  • Build the app from source on Android and iOS, verify no commit-related regressions or ANRs
  • Smoke test scrolling with animated/sticky headers alongside the Reanimated DISABLE_COMMIT_PAUSING_MECHANISM flag

Made with Cursor

Reanimated requires this React Native flag to be enabled before its own
DISABLE_COMMIT_PAUSING_MECHANISM flag can be turned on safely; without it,
React commits can be starved and the app becomes unresponsive.

See https://docs.swmansion.com/react-native-reanimated/docs/guides/feature-flags/#disable_commit_pausing_mechanism

Co-authored-by: Cursor <cursoragent@cursor.com>
@piaskowyk
piaskowyk force-pushed the piaskowyk/enable-prevent-shadow-tree-commit-exhaustion branch from 454dd4b to 15e030b Compare October 20, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant