chore(runway): cherry-pick fix(perps): use native stack navigator to fix navigation jitter on navigation v6#28968
Merged
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - PR targets a release branch (release/*) All E2E tests pre-selected. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Contributor
|
✅ E2E Fixture Validation — Schema is up to date |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.


Description
React Navigation v6's JS-based
@react-navigation/stackcreatesReanimated shared values during render before the Fabric commit is
finalized. Under the New Architecture (
newArchEnabled=true, RN0.76.9), this causes animations to fall back to the JS thread, producing
a freeze-then-snap jitter when navigating into the Perps stack.
The fix replaces
createStackNavigatorwithcreateNativeStackNavigator(from@react-navigation/native-stack@^6)for
PerpsScreenStack. Native stack transitions run as pure UIKit (iOS)/ Fragment (Android) animations with zero Reanimated/JS-thread
involvement, eliminating the timing issue entirely.
Concretely:
@react-navigation/native-stack@^6as a dependency (compatiblewith the existing
react-native-screens@3.37.0)createStackNavigator→createNativeStackNavigatorfor theinner Perps navigator in
routes/index.tsxcardStyle→contentStyle,animationEnabled: false→animation: 'none', and replaced JS-stack-onlyheader/headerLeftcallbacks withheaderShown/headerBackVisibleMainNavigator.jsto useTransitionPresets.SlideFromRightIOS, replacing the hand-rolledcardStyleInterpolatorthat usedAnimated.Value.interpolatewithlayouts.screen.width(which can be 0 on first render under Fabric'sasync layout)
Changelog
CHANGELOG entry: Fixed jittery navigation transitions when opening Perps
on devices running the New Architecture
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Screen.Recording.2026-04-17.at.03.06.54.mov
Screen.Recording.2026-04-17.at.03.10.02.mov
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Made with Cursor
Note
Medium Risk
Changes navigation primitives and header behavior for the Perps flow,
which can affect transitions, modal presentation, and confirmation
screen UX if options are mis-mapped between stack implementations.
Overview
Fixes Perps navigation jitter under React Navigation v6 / RN New
Architecture by switching the Perps inner navigator from JS
@react-navigation/stackto@react-navigation/native-stack.Updates Perps screen options to native-stack equivalents
(
contentStyle,animation: 'none',presentation: 'transparentModal') and adds a scopedNavigationContextoverride inPerpsConfirmScreento preventConfirmfrom re-enabling a header whenshowPerpsHeaderis false. Also ensures the Perps root entry inMainNavigatorexplicitly disables the header.Bumps mobile build numbers (
versionCode/CURRENT_PROJECT_VERSION)and Bitrise
VERSION_NUMBERto4532, and adds the@react-navigation/native-stackdependency.Reviewed by Cursor Bugbot for commit
c92d05c. Bugbot is set up for automated
code reviews on this repo. Configure
here.
Co-authored-by: metamaskbot metamaskbot@users.noreply.github.com cf10d95