Skip to content

chore: remove explore feature flag#26275

Merged
Prithpal-Sooriya merged 6 commits into
mainfrom
chore/remove-trending-feature-flag
Feb 20, 2026
Merged

chore: remove explore feature flag#26275
Prithpal-Sooriya merged 6 commits into
mainfrom
chore/remove-trending-feature-flag

Conversation

@Prithpal-Sooriya

@Prithpal-Sooriya Prithpal-Sooriya commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Description

This feature was shipped a month ago, this is a cleanup since we will not be reverting this feature now.

Changelog

CHANGELOG entry: chore: remove explore feature flag

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2736

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
Changes core navigation/tab registration and back/close routing behavior, which can impact user flows if any routes assumed the old flag-gated Browser tab behavior.

Overview
Removes the assetsTrendingTokens/Explore feature flag and makes Trending/Explore navigation unconditional.

TabBar now always navigates to Routes.TRENDING_VIEW, and MainNavigator always registers the Explore tab plus a hidden Routes.BROWSER.HOME tab and always registers Explore-related stack screens (EXPLORE_SEARCH, SITES_FULL_VIEW, BROWSER.HOME). BrowserTab close behavior is simplified to always route back to Trending when not opened from Trending/Perps, and unit tests/snapshots are updated while the now-dead assetsTrendingTokens selector + tests are deleted.

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

This feature was shipped a month ago, this is a cleanup since we will not be reverting this feature now.
@Prithpal-Sooriya Prithpal-Sooriya requested review from a team as code owners February 19, 2026 14: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.

Comment thread app/components/Nav/Main/MainNavigator.test.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm really not a fan of this test file. We are testing and asserting against mocks 🤦🏾

I timeboxed some time to see if we can refactor this, but testing the @react-navigation navigation stack is not trivial.

I think this can be something we pencil down once we migrate/upgrade our navigation libraries.

juanmigdr
juanmigdr previously approved these changes Feb 19, 2026
Comment thread app/components/Nav/Main/MainNavigator.test.js
Cal-L
Cal-L previously approved these changes Feb 19, 2026

@Cal-L Cal-L 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

@Prithpal-Sooriya

Copy link
Copy Markdown
Contributor Author

@cursor READ AND FOLLOW THESE MEMORY FILES:

Can you please resolve merge conflicts, thanks

@cursor

cursor Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

I've successfully resolved the merge conflicts and pushed the changes.

Summary of changes:

  1. Resolved merge conflict in MainNavigator.js:

    • Kept the new MarketInsightsView feature from main branch (conditionally rendered)
    • Removed the selectAssetsTrendingTokensEnabled feature flag import (as per PR intent)
    • Made explore/trending screens unconditional (the core purpose of this PR)
  2. Fixed Bugbot review comments in MainNavigator.test.js:

    • Removed unused queryByTestId destructuring in 'shows Trending tab' test
    • Renamed 'should show Rewards tab' to 'shows Rewards tab with core tabs' to follow naming conventions

All MainNavigator tests pass (8/8). The pre-existing TypeScript errors in the codebase (related to migrations and termsOfUse files) are unrelated to this PR's changes.

Reflection Statement: No memory update required - this was a routine merge conflict resolution applying the PR's feature flag removal intent while preserving new features from main branch.

Open in Cursor Open in Web

- Kept MarketInsightsView feature (new from main)
- Removed selectAssetsTrendingTokensEnabled feature flag (as per PR intent)
- Made explore/trending screens unconditional

Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
- Remove unused queryByTestId in 'shows Trending tab' test
- Rename 'should show Rewards tab' to follow naming convention

Co-authored-by: Prithpal Sooriya <prithpal.sooriya@gmail.com>
@cursor cursor Bot dismissed stale reviews from Cal-L and juanmigdr via 5e81fb7 February 19, 2026 16:09

@Cal-L Cal-L 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

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
This PR removes the assetsTrendingTokens feature flag and makes the Trending feature always enabled. The changes affect core navigation components:

  1. TabBar.tsx - Removes feature flag check, now always navigates to TRENDING_VIEW when the Trending tab is pressed
  2. MainNavigator.js - Removes conditional rendering based on feature flag, now always shows Trending tab and hides Browser tab (Browser is accessible through Trending)
  3. BrowserTab.tsx - Removes feature flag check, now always navigates to TRENDING_VIEW when going back from browser

Why these tags:

  • SmokeWalletPlatform: Trending tests are tagged with this. The Trending tab, search, browser navigation, and feed tests all use this tag. Changes to Trending navigation directly impact these tests.
  • FlaskBuildTests: Snaps tests use the browser for dApp interactions. Browser navigation changes could affect how snaps tests access the browser.
  • SmokeConfirmations: Many confirmation tests navigate through browser to interact with dApps. The browser access pattern change (now through Trending) could affect these flows.
  • SmokeNetworkExpansion: Multi-chain tests (including Solana) use browser for dApp connections. Navigation changes could affect these tests.
  • SmokeMultiChainAPI: Multi-chain API tests use browser for dApp sessions and permissions. Navigation changes could affect these tests.
  • SmokeNetworkAbstractions: Network tests may use browser for dApp chain permissions. Navigation changes could affect these tests.
  • SmokePerps: Perps is a section inside Trending tab. Changes to Trending navigation could affect Perps tests.
  • SmokePredictions: Predictions is a section inside Trending tab. Changes to Trending navigation could affect Predictions tests.

The test infrastructure already uses navigateToBrowserView() which goes through Trending → Browser, so most tests should work. However, the navigation component changes are significant enough to warrant broader testing to ensure no regressions.

Performance Test Selection:
This PR removes a feature flag and changes navigation logic, but does not introduce any performance-impacting changes. The changes are primarily about removing conditional rendering based on a feature flag, making the Trending feature always enabled. There are no changes to: UI rendering performance, data loading patterns, list rendering, animations, state management, or app startup. The navigation changes are simple route changes, not performance-critical operations.

View GitHub Actions results

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

describe('MainNavigator', () => {
beforeEach(() => {
jest.clearAllMocks();
selectAssetsTrendingTokensEnabled.mockReturnValue(false);

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.

New assertion uses weak toBeDefined() matcher

Low Severity

The newly added assertion expect(getByTestId('tab-bar-item-Trending')).toBeDefined() uses the weak toBeDefined() matcher instead of toBeOnTheScreen(). This is inconsistent with the same file's test at line 154 which correctly uses toBeOnTheScreen() for the identical tab-bar-item-Trending element. Per the unit testing guidelines, toBeOnTheScreen() is the mandatory matcher for asserting element presence — toBeDefined() doesn't actually verify the element rendered properly.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

@sonarqubecloud

Copy link
Copy Markdown

@Prithpal-Sooriya Prithpal-Sooriya added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 64c3c99 Feb 20, 2026
106 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the chore/remove-trending-feature-flag branch February 20, 2026 10:56
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 20, 2026
@metamaskbot metamaskbot added the release-7.68.0 Issue or pull request that will be included in release 7.68.0 label Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.68.0 Issue or pull request that will be included in release 7.68.0 size-L team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants