Skip to content

chore(runway): cherry-pick fix(perps): set confirmation header and safe area by navigation source cp-7.64.0#25627

Merged
joaoloureirop merged 1 commit into
release/7.64.0from
runway-cherry-pick-7.64.0-1770200368
Feb 4, 2026
Merged

chore(runway): cherry-pick fix(perps): set confirmation header and safe area by navigation source cp-7.64.0#25627
joaoloureirop merged 1 commit into
release/7.64.0from
runway-cherry-pick-7.64.0-1770200368

Conversation

@runway-github
Copy link
Copy Markdown
Contributor

@runway-github runway-github Bot commented Feb 4, 2026

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

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

Before

Simulator Screenshot - iPhone 17
Pro - 2026-02-03 at 19 47 49

After

Simulator Screenshot - iPhone 17
Pro - 2026-02-03 at 19 46 49

Pre-merge author checklist

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.

Note

Medium Risk
Changes Perps navigation params and RedesignedConfirmations screen 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_CONFIG and a showPerpsHeader navigation param; navigateToOrder now passes showPerpsHeader: false for the deposit-and-trade (one-click) path, while other paths default to a minimal header.

The Perps stack now derives RedesignedConfirmations screen options from route params (and toggles Confirm’s disableSafeArea accordingly), 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

…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>
@runway-github runway-github Bot requested a review from a team as a code owner February 4, 2026 10:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Feb 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.64.0)

All E2E tests pre-selected.

View GitHub Actions results

@github-actions github-actions Bot added the size-S label Feb 4, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

headerShown: true,
title: '',
}
: { header: () => null };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 4, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
17.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@joaoloureirop joaoloureirop added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Feb 4, 2026
@joaoloureirop joaoloureirop enabled auto-merge (squash) February 4, 2026 12:41
@joaoloureirop joaoloureirop merged commit 2b602f5 into release/7.64.0 Feb 4, 2026
173 of 179 checks passed
@joaoloureirop joaoloureirop deleted the runway-cherry-pick-7.64.0-1770200368 branch February 4, 2026 14:22
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 4, 2026
@metamaskbot metamaskbot added the release-7.64.0 Issue or pull request that will be included in release 7.64.0 label Feb 6, 2026
@metamaskbot
Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-7.64.0 on PR, as PR was cherry-picked in branch 7.64.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-S skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants