Skip to content

chore: adds label for open feed rows with "Holding" / "Open"#33404

Open
zone-live wants to merge 2 commits into
mainfrom
TSA-894-add-label-for-open-rows
Open

chore: adds label for open feed rows with "Holding" / "Open"#33404
zone-live wants to merge 2 commits into
mainfrom
TSA-894-add-label-for-open-rows

Conversation

@zone-live

@zone-live zone-live commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

Open feed rows whose value/P&L data hasn't arrived yet, brand-new buy with no realized gain, rendered a blank right column, which read as broken. This adds an intentional empty-state label so the row looks deliberate:

  • spot bought → "Holding"
  • perp opened → "Open"

If a current value is present but only PnL is missing, the row still shows the value, so the label only appears on genuinely empty open rows.
Implements a suggestion from feed review to make the empty state read as intentional rather than missing data.

Simulator Screenshot - iPhone 17 Pro - 2026-07-16 at 10 52 04 Simulator Screenshot - iPhone 17 Pro - 2026-07-16 at 10 51 37

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TSA-894

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

NA

After

NA

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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
UI-only empty-state copy in the social feed with tests; no auth, data, or trading logic changes.

Overview
Social leaderboard feed rows no longer leave the right column blank when value and P&L are both missing on open trades (bought / opened). FeedItemRow now shows localized "Just bought" or "Just opened" in that case; sold / closed rows with no metrics still show nothing.

English copy lives under social_leaderboard.feed.new_position, with a getFeedNewPositionTestId helper and unit tests covering open vs closed and rows that still have value/P&L.

Reviewed by Cursor Bugbot for commit 23bab61. Bugbot is set up for automated code reviews on this repo. Configure here.

@zone-live zone-live requested a review from a team as a code owner July 16, 2026 09:27
@github-actions

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.

@metamask-ci metamask-ci Bot added the team-social-ai Social & AI team label Jul 16, 2026
@metamask-ci

metamask-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Manual testing steps still contain template content (the Gherkin example title or a [...] placeholder). Replace with real steps, or write N/A — <reason>.
  • Pre-merge author checklist has unchecked items (e.g. "I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards."). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@github-actions github-actions Bot added size-M risk:low AI analysis: low risk labels Jul 16, 2026
@github-actions

This comment was marked as off-topic.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR makes targeted UI changes to the SocialLeaderboard FeedView component:

  1. FeedItemRow.tsx: Adds a "Holding"/"Open" label for new open positions that have no value/P&L data yet. This is a conditional rendering change — when hasValueData and hasPnlData are both false, it now shows a state label instead of a blank column.

  2. FeedView.testIds.ts: Adds a new test ID helper getFeedNewPositionTestId for the new label element.

  3. FeedItemRow.test.tsx: Adds unit tests covering the new label behavior (4 new test cases).

  4. locales/languages/en.json: Adds two new i18n strings under social_leaderboard.feed.new_position ("Holding" and "Open").

The SocialLeaderboard FeedView is part of the Trending tab, which is covered by SmokeWalletPlatform (Trending discovery tab, browsing content feeds including Tokens, Perps, Sites sections). No other areas are affected — no core controllers, navigation, shared infrastructure, or other feature areas are touched. The changes are self-contained UI enhancements with no performance implications.

Performance Test Selection:
The changes are purely UI/rendering additions to the SocialLeaderboard FeedView component — adding a conditional text label for new open positions. There are no changes to data fetching, list virtualization, asset loading, or any performance-sensitive code paths. No performance test tags are warranted.

View GitHub Actions results

@zone-live zone-live changed the title chore: adds label for open feed rows with "Just bought" / "Just opened" chore: adds label for open feed rows with "Holding" / "Open" Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low AI analysis: low risk size-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant