Skip to content

fix(predict): remove redundant Live filter chip#33383

Open
ghgoodreau wants to merge 1 commit into
mainfrom
pred-1082
Open

fix(predict): remove redundant Live filter chip#33383
ghgoodreau wants to merge 1 commit into
mainfrom
pred-1082

Conversation

@ghgoodreau

@ghgoodreau ghgoodreau commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

The feature-flagged Predict Live page displayed a preselected Live filter chip even though the entire page is already scoped to live markets. This adds a feed-level filter-bar display setting and disables the bar for the Live feed. The internal Live filter remains active, so market requests continue to include live: true, while filter chips on other feeds remain unchanged.

Changelog

CHANGELOG entry: Removed the redundant Live filter chip from the Live prediction markets page

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/PRED-1082

Manual testing steps

Feature: Live prediction markets page

  Background:
    Given the Predict home redesign feature flag is enabled
    And the user is on the redesigned Predict homepage

  Scenario: Open the Live page without a redundant filter
    When the user opens the Live page
    Then the Live page is displayed
    And no filter chip row is displayed
    And only live prediction markets are requested

  Scenario: Preserve filter chips on other feeds
    When the user opens the Sports page
    Then the Sports filter chip row is displayed
    And the All and Live filter chips are available

  Scenario: Preserve the existing experience when the redesign is disabled
    Given the Predict home redesign feature flag is disabled
    When the user opens Predict
    Then the legacy Predict market list is displayed

Screenshots/Recordings

Before

N/A - No screenshot or recording was captured for the redundant Live filter chip.

After

N/A - No screenshot or recording was captured; the change only removes an existing redundant chip.

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • N/A: This is a filter visibility change; no manual Android test was performed.
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • N/A: The behavior does not depend on account, token, or activity volume.
    • 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
    • N/A: This change adds no new operation or performance-sensitive code path.
    • See trace() for usage and addToken for an example

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 visibility change in Predict feeds with tests; no auth, payments, or API contract changes beyond existing live filter params.

Overview
Removes the redundant Live filter chip on the Live prediction markets screen by adding an optional feed-level showFilterBar flag (default true) and setting showFilterBar: false on the Live feed in feedConfig.

usePredictFeedConfig exposes showFilterBar, and PredictFeedView only renders PredictChipList when it is true. The Live feed still uses its internal live filter, so usePredictMarketList continues to request markets with live: true; Sports and other feeds are unchanged.

Tests cover hook behavior, unit view expectations, and a component-view check that the filter row is absent and listMarkets includes live: true.

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

@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-predict Predict team label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: @PerformancePredict
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR makes focused changes to the Predict feature area:

  1. feedConfig.ts: Adds a new optional showFilterBar property to PredictFeedConfig interface and sets it to false for the live feed.
  2. usePredictFeedConfig.ts: Exposes showFilterBar in the hook's return value (defaults to true).
  3. PredictFeedView.tsx: Conditionally renders the PredictChipList filter bar based on showFilterBar.
  4. Test files: Unit tests updated to verify the new behavior.

SmokePredictions: Directly covers Predictions views including the PredictFeedView. The live feed now hides filter chips — this needs E2E validation to ensure the live feed renders correctly without the filter bar and that market listing still works.

SmokeWalletPlatform: Per the tag description, "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views (headers, lists, full views) affect Trending." The PredictFeedView is embedded in Trending, so changes to it affect the Trending tab.

SmokeConfirmations: Per the SmokePredictions tag description, "When selecting SmokePredictions, also select SmokeConfirmations (opening/closing positions are on-chain transactions)." This is a required dependent tag when SmokePredictions is selected.

The changes are contained within the Predict component directory and don't touch shared infrastructure, navigation, controllers, or other feature areas.

Performance Test Selection:
The @PerformancePredict tag covers prediction market list loading and market details. The PredictFeedView.tsx change conditionally renders the filter bar (PredictChipList) for the live feed. While this is a minor UI change, it affects the rendering of the live feed view which is part of the prediction market flow covered by @PerformancePredict. The change could slightly affect render performance for the live feed by removing a component from the render tree.

View GitHub Actions results

@ghgoodreau ghgoodreau marked this pull request as ready for review July 15, 2026 19:48
@ghgoodreau ghgoodreau requested a review from a team as a code owner July 15, 2026 19:48
@github-actions github-actions Bot added the risk:medium AI analysis: medium risk label Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Performance Test Results

ℹ️ Performance test results are currently non-blocking and will not block this PR.

All tests passed · 3 tests · 1 device

📱 Devices tested (1)

Android: Google Pixel 8 Pro (v14.0)

✅ Passed Tests (3)
Test Platform Device Duration Team Recording
Predict Available Balance - Complete Flow Performance Android Google Pixel 8 Pro (v14.0) 1.24s @team-predict 📹 Watch
Predict Deposit - Complete Flow Performance Android Google Pixel 8 Pro (v14.0) 10.43s @team-predict 📹 Watch
Predict Market Details - Complete Flow Performance Android Google Pixel 8 Pro (v14.0) 5.03s @team-predict 📹 Watch

Branch: pred-1082 · Build: Normal · Commit: 509aa79 · View full run

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

Labels

risk:medium AI analysis: medium risk size-S team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant