chore(runway): cherry-pick fix(perps): set confirmation header and safe area by navigation source cp-7.64.0#25627
Conversation
…fe area by navigation source cp-7.64.0 (#25601) ## **Description** Set confirmation header by navigation source ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed Perps confirmation screen so the header is hidden when opening from the one-click order flow and shows a minimal header when opening from other flows. ## **Related issues** Fixes: #25469 ## **Manual testing steps** ```gherkin Feature: Perps confirmation screen header Scenario: user opens confirmation via one-click order (navigateToOrder) Given user is on a Perps market and taps place order (one-click flow) When deposit is confirmed and confirmation screen opens Then the confirmation screen has no header (header: () => null) Scenario: user opens confirmation from another flow Given user reaches RedesignedConfirmations from a path other than navigateToOrder When the confirmation screen is shown Then the screen shows a minimal header (header visible, no left button, empty title) ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17 Pro - 2026-02-03 at 19 47 49" src="https://github.com/user-attachments/assets/8ff43507-5222-426c-a86a-a30a6403baa6" /> <!-- [screenshots/recordings] --> ### **After** <img width="1206" height="2622" alt="Simulator Screenshot - iPhone 17 Pro - 2026-02-03 at 19 46 49" src="https://github.com/user-attachments/assets/d374525a-5732-4049-9c73-da03bd5f29d6" /> <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk UI/navigation behavior change scoped to Perps confirmations; main risk is unintended header/safe-area state if route params are missing or mis-set. > > **Overview** > Updates Perps navigation so `RedesignedConfirmations` can render *with or without* a Perps header based on a new `showPerpsHeader` route param. > > The one-click deposit-and-trade flow (`navigateToOrder`) now explicitly navigates to confirmations with `showPerpsHeader: false`, while other entry points default to showing a minimal header; `Confirm`’s `disableSafeArea` is also tied to this flag. Adds `CONFIRMATION_HEADER_CONFIG`, updates Perps stack screen options accordingly, and adjusts the related hook test and navigation types. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 71b114b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.64.0) All E2E tests pre-selected. |
| headerShown: true, | ||
| title: '', | ||
| } | ||
| : { header: () => null }; |
There was a problem hiding this comment.
Header visibility override causes unintended empty header space
Medium Severity
When showPerpsHeader is false, getRedesignedConfirmationsHeaderOptions returns { header: () => null } to hide the header. However, the Confirm component internally calls navigation.setOptions({ headerShown: true }) when isFullScreenConfirmation is true (which includes perpsDepositAndOrder transactions). Since setOptions merges options, the final result is both header: () => null AND headerShown: true, which causes React Navigation to render an empty header container instead of no header at all.
|
|
No release label on PR. Adding release label release-7.64.0 on PR, as PR was cherry-picked in branch 7.64.0. |




Description
Set confirmation header by navigation source
Changelog
CHANGELOG entry: Fixed Perps confirmation screen so the header is hidden
when opening from the one-click order flow and shows a minimal header
when opening from other flows.
Related issues
Fixes: #25469
Manual testing steps
Screenshots/Recordings
Before
After
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.
Note
Medium Risk
Changes Perps navigation params and
RedesignedConfirmationsscreen options, which can affect the confirmation flow’s header visibility and layout. Risk is limited to Perps UI/navigation but could cause regressions if other entry points don’t pass expected params.Overview
Updates Perps confirmations to conditionally show/hide the header and safe area based on the navigation source.
Adds
CONFIRMATION_HEADER_CONFIGand ashowPerpsHeadernavigation param;navigateToOrdernow passesshowPerpsHeader: falsefor the deposit-and-trade (one-click) path, while other paths default to a minimal header.The Perps stack now derives
RedesignedConfirmationsscreen options from route params (and togglesConfirm’sdisableSafeAreaaccordingly), with types and tests updated to cover the new param behavior.Written by Cursor Bugbot for commit 7d77188. This will update automatically on new commits. Configure here.
Co-authored-by: Cursor cursoragent@cursor.com 2bc0e0e