Skip to content

[Discord][rea4] Enable preventShadowTreeCommitExhaustion by default - #52

Merged
piaskowyk merged 1 commit into
rea4-discordfrom
piaskowyk/rea4-enable-prevent-shadow-tree-commit-exhaustion
Sep 17, 2026
Merged

piaskowyk merged 1 commit into
rea4-discordfrom
piaskowyk/rea4-enable-prevent-shadow-tree-commit-exhaustion

Conversation

@piaskowyk

Copy link
Copy Markdown

Summary

Same change as #51, targeting rea4-discord.

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. It is regenerated on this branch rather than cherry-picked, since the SignedSource hashes differ from 0.86.0-discord.

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 with Reanimated 4 and DISABLE_COMMIT_PAUSING_MECHANISM enabled

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 merged commit 370b542 into rea4-discord Sep 17, 2026
36 checks passed
@piaskowyk
piaskowyk deleted the piaskowyk/rea4-enable-prevent-shadow-tree-commit-exhaustion branch September 17, 2026 08:31
piaskowyk added a commit that referenced this pull request Oct 13, 2026
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>
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