Skip to content

chore(runway): cherry-pick fix: add hasPerpsMarket to token details opened event cp-7.73.0#28377

Merged
chloeYue merged 1 commit into
release/7.73.0from
runway-cherry-pick-7.73.0-1775225814
Apr 3, 2026
Merged

chore(runway): cherry-pick fix: add hasPerpsMarket to token details opened event cp-7.73.0#28377
chloeYue merged 1 commit into
release/7.73.0from
runway-cherry-pick-7.73.0-1775225814

Conversation

@runway-github

@runway-github runway-github Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the TOKEN_DETAILS_OPENED analytics event to include
has_perps_market and severity properties, providing richer context about
the token details screen state when the event fires.

Changelog

CHANGELOG entry: adds event property to token details opened event

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

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
Medium risk because it changes when TOKEN_DETAILS_OPENED fires by
deferring until market insights and perps market data settle, which can
impact analytics timing/volume. UI behavior is largely unchanged, but
the added async coordination and stale-payload guarding could introduce
missed/duplicated events if incorrect.

Overview
Enhances TOKEN_DETAILS_OPENED analytics to include
has_perps_market and severity (from security data), and refactors
the tracking so it fires only once per token+source.

Tracking is now deferred in TokenDetailsRouteWrapper until both
market-insights display resolution and perps market lookup are settled,
with a token-key guard to drop stale market-insights callbacks after
navigation.

Updates AssetOverviewContent’s onMarketInsightsDisplayResolved
callback to return { isDisplayed, severity } (instead of a boolean)
and adjusts unit tests accordingly, plus adds an e2e page-object retry
loop for reading the Perps balance value more reliably.

Written by Cursor
Bugbot
for commit
1d0cda9. This will update automatically
on new commits. Configure
here.


Co-authored-by: Prithpal Sooriya prithpal.sooriya@users.noreply.github.com
Co-authored-by: Prithpal Sooriya prithpal.sooriya@gmail.com af4d7ea

…pened event cp-7.73.0 (#28242)

## **Description**

Updates the TOKEN_DETAILS_OPENED analytics event to include
has_perps_market and severity properties, providing richer context about
the token details screen state when the event fires.

## **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: adds event property to token details opened event

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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]
> **Medium Risk**
> Medium risk because it changes when `TOKEN_DETAILS_OPENED` fires by
deferring until market insights and perps market data settle, which can
impact analytics timing/volume. UI behavior is largely unchanged, but
the added async coordination and stale-payload guarding could introduce
missed/duplicated events if incorrect.
> 
> **Overview**
> **Enhances `TOKEN_DETAILS_OPENED` analytics** to include
`has_perps_market` and `severity` (from security data), and refactors
the tracking so it fires only once per token+source.
> 
> Tracking is now **deferred in `TokenDetailsRouteWrapper`** until both
market-insights display resolution and perps market lookup are settled,
with a token-key guard to drop stale market-insights callbacks after
navigation.
> 
> Updates `AssetOverviewContent`’s `onMarketInsightsDisplayResolved`
callback to return `{ isDisplayed, severity }` (instead of a boolean)
and adjusts unit tests accordingly, plus adds an e2e page-object retry
loop for reading the Perps balance value more reliably.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1d0cda9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Prithpal Sooriya <prithpal.sooriya@users.noreply.github.com>
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
@runway-github runway-github Bot requested review from a team as code owners April 3, 2026 14:17
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Apr 3, 2026
@github-actions github-actions Bot added size-M risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 3, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/7.73.0@d654308). Learn more about missing BASE report.

Files with missing lines Patch % Lines
.../components/UI/TokenDetails/Views/TokenDetails.tsx 87.09% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/7.73.0   #28377   +/-   ##
=================================================
  Coverage                  ?   82.91%           
=================================================
  Files                     ?     4874           
  Lines                     ?   126414           
  Branches                  ?    28346           
=================================================
  Hits                      ?   104816           
  Misses                    ?    14391           
  Partials                  ?     7207           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chloeYue chloeYue left a comment

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.

LGTM

@chloeYue chloeYue added the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label Apr 3, 2026
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 3, 2026
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found

All E2E tests pre-selected.

View GitHub Actions results

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2026

Copy link
Copy Markdown

@chloeYue chloeYue merged commit 41806e6 into release/7.73.0 Apr 3, 2026
367 of 371 checks passed
@chloeYue chloeYue deleted the runway-cherry-pick-7.73.0-1775225814 branch April 3, 2026 21:02
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk-high Extensive testing required · High bug introduction risk size-M skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants