Skip to content

chore: reposition perps components around Market Insights cp-7.69.0#27193

Merged
zone-live merged 4 commits into
mainfrom
TSA-244-reposition-perps-card-and-banner-around-market-insights
Mar 9, 2026
Merged

chore: reposition perps components around Market Insights cp-7.69.0#27193
zone-live merged 4 commits into
mainfrom
TSA-244-reposition-perps-card-and-banner-around-market-insights

Conversation

@zone-live

@zone-live zone-live commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Description

Reorders the perps and Market Insights sections on the token details screen so the layout is stable regardless of position state.

  1. When a user has an open perps position, the position card now appears directly below the balance (above Market Insights), giving active trades priority.
  2. When there is no position, the discovery/promotional banner renders below Market Insights instead. This means

Market Insights always stays in the same place, meaning no layout shifts as perps state changes. The discovery banner is demoted to a secondary position so it never pushes informational content down.

Simulator Screenshot - iPhone 16e - 2026-03-09 at 11 37 57 Simulator Screenshot - iPhone 16e - 2026-03-09 at 11 38 26

Changelog

CHANGELOG entry: null

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

Low Risk
Low risk UI/layout-only change that reorders Perps components and adjusts spacing; main risk is visual regression on the token details screen when Perps position/loading states change.

Overview
Token details layout is reordered to be stable regardless of Perps position state. When a Perps position exists, the PerpsPositionCard now renders above the Market Insights entry card; when no position exists, the PerpsDiscoveryBanner renders below Market Insights.

This introduces a shared showPerpsSection guard to centralize Perps render conditions and updates unit tests to mock usePerpsPositionForAsset and assert the new ordering/visibility behavior. Separately, the Market Insights entry card adds bottom spacing (mb-4) for improved visual separation.

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

@zone-live zone-live requested a review from a team as a code owner March 9, 2026 11:26
@github-actions

github-actions Bot commented Mar 9, 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.

@zone-live zone-live added the team-social-ai Social & AI team label Mar 9, 2026
@github-actions github-actions Bot added the size-S label Mar 9, 2026
@github-actions github-actions Bot added size-M and removed size-S labels Mar 9, 2026

@cursor cursor Bot 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.

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

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/UI/TokenDetails/components/AssetOverviewContent.test.tsx Outdated
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 83%
click to see 🤖 AI reasoning details

E2E Test Selection:
Changes affect AssetOverviewContent (Token Details screen) and MarketInsightsEntryCard layout. The PR refactors and reorders the Perps section relative to Market Insights, introducing a new showPerpsSection condition and changing when PerpsPositionCard vs PerpsDiscoveryBanner render. This directly impacts:

  • Perps UI entry points from token details (PerpsPositionCard and PerpsDiscoveryBanner)
  • Layout ordering between Perps and Market Insights
  • Conditional rendering logic based on position state and eligibility

These are part of the Perps feature surface and connected to Trending/Wallet platform presentation logic.

Selected tags:

  • SmokePerps: Core feature impacted (Perps position card, discovery banner visibility, token-level entry into perps flows).
  • SmokeWalletPlatform: Token details and Trending/Market Insights are part of the wallet platform surface; layout/order changes can affect navigation and embedded sections.
  • SmokeConfirmations: Required dependency when selecting SmokePerps (Add Funds deposits are on-chain transactions).

No changes to controllers, Engine, navigation stack, or shared infra. Scope is UI-level conditional rendering and spacing, so medium risk but limited blast radius.

Performance Test Selection:
Changes are limited to conditional rendering and layout spacing (adding margin and reordering JSX blocks). No changes to data fetching, heavy list rendering, controllers, or startup logic. No expected impact on rendering performance or critical flows measurable by performance suites.

View GitHub Actions results

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

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

@sonarqubecloud

sonarqubecloud Bot commented Mar 9, 2026

Copy link
Copy Markdown

@zone-live zone-live changed the title chore: reposition perps components around Market Insights chore: reposition perps components around Market Insights cp-7.69.0 Mar 9, 2026
@zone-live zone-live added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 66a77d8 Mar 9, 2026
103 checks passed
@zone-live zone-live deleted the TSA-244-reposition-perps-card-and-banner-around-market-insights branch March 9, 2026 15:01
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 9, 2026
@metamaskbot metamaskbot added the release-7.70.0 Issue or pull request that will be included in release 7.70.0 label Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.70.0 Issue or pull request that will be included in release 7.70.0 size-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants