Skip to content

feat: explore page v2#29473

Merged
juanmigdr merged 82 commits into
mainfrom
feat/explore-page-v2-reorg
May 1, 2026
Merged

feat: explore page v2#29473
juanmigdr merged 82 commits into
mainfrom
feat/explore-page-v2-reorg

Conversation

@juanmigdr

@juanmigdr juanmigdr commented Apr 29, 2026

Copy link
Copy Markdown
Member

Description

Rollout / safety net

  • Feature flag explorePageV2Enabled (app/selectors/featureFlagController/explorePageV2/index.ts): defaults to false. When off, users get the legacy single-page Explore in ExplorePageV1.tsx (one scroll: Quick Actions, predictions, tokens, perps, stocks, sites). When on, they get the tabbed Explore V2—ops can switch back to V1 via the flag without reverting code.

Main additions

  • Tabbed Explore (V2) in TrendingView.tsx using TabsList: Now, Macro, RWAs, Crypto, Sports, and Dapps—each tab is its own focused vertical experience instead of one long mixed feed.
  • Six tab screens under app/components/Views/TrendingView/tabs/ that split content by theme (e.g. Macro uses macro-style perps + predictions; Crypto emphasizes crypto perps/tokens; Sports uses sports-oriented prediction markets via useSportsMarketsFeed).
  • Richer presentation: pill carousels and toggles (PillScrollList, PillToggleCardList, ExplorePill, perps/token pill row items) so movers and macro views are easier to scan than the old single-stack layout alone.
  • Dapps tab adds browser-grounded sections: recents, favorites, and networks (new feeds/dapps/ hooks and tile/list UI) plus trending sites, wired through Sites / UrlAutocomplete / SitesFullView and hooks like useBrowserFavoritesSites and useBrowserRecentsSites.
  • Perps feeds are tab-aware: usePerpsFeed supports variants (all / macro / crypto, etc.) so each tab can show the right subset with row vs tile vs pill layouts as needed.
  • Explore search rework under app/components/Views/TrendingView/search/ (useExploreSearch, ExploreSearchResults, SearchFeedRow, TapView, search analytics)—multi-feed omni-search with debouncing and clearer section typing for renderers.
  • Supporting infra: feature-flag registry for tests, new i18n strings, navigation type updates where Explore touches routes, and TabsBar tweaks for the new tab strip.

Main removals / replacements

  • Removed the “sections config” architecture: sections.config.tsx (and tests) that drove dynamic section composition is gone in favor of explicit tab components.
  • Removed exploreSectionsOrder feature-flag plumbingremote ordering of Explore sections is no longer the model with fixed tabs on V2 (V1 keeps a fixed legacy stack in ExplorePageV1).
  • Removed / replaced older Explore search helpers: utils/exploreSearch and the hooks-local useExploreSearch in favor of the search/ module and a single consolidated hook API.

What stayed the same (high level)

  • Core feeds (tokens, stocks, predictions, sites, perps) remain the building blocks; they are recomposed per tab with new filters/UI where needed—not entirely new domains everywhere.
  • V1 behavior stays available behind the flag for rollback and gradual rollout.

Changelog

CHANGELOG entry: developed explore page v2 behind a FF

Related issues

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

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

Screen.Recording.2026-04-29.at.19.23.23.mov

s] -->

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

Medium Risk
Large UI/navigation refactor across Explore, search, and Sites with new hooks/components and removed legacy section-config plumbing; regression risk is mitigated by gating V2 behind explorePageV2Enabled but still touches multiple user entry points.

Overview
Adds a feature-flagged tabbed Explore V2 in TrendingView (Now/Macro/RWAs/Crypto/Sports/Dapps) and preserves a new ExplorePageV1 fallback when explorePageV2Enabled is off.

Reworks Explore’s composition primitives with new reusable UI building blocks (HorizontalCarousel, CardList, pill rows/toggles) and updates PredictHomeFeaturedCarousel to render directly from usePredictionsFeed instead of the old Section abstraction.

Overhauls Explore search to use the new search/useExploreSearch API (section list shape + debouncing), updates UrlAutocomplete to adapt the new sections model (including merging tokens+stocks), and updates “View all” results rendering to use SearchFeedRow.

Improves Sites UX and data plumbing: SiteRowItem now supports local/remote icons with WebsiteIcon fallback + favorite removal action, SitesList owns navigation (removing SiteRowItemWrapper), SitesFullView gains a favorites mode wired to Redux removeBookmark, and adds new Redux-driven hooks for favorites/recents plus shared query matching helpers.

Includes small correctness/UX fixes: avoids usePredictMarketData empty-frame flash via useLayoutEffect, appends customQueryParams to Polymarket pagination queries, adds new TokenDetailsSource values for Explore entry points, refactors trending token row press handling into useTrendingTokenPress, and adjusts TabsBar padding for scroll vs non-scroll layouts.

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

bergarces
bergarces previously approved these changes Apr 30, 2026
Comment thread app/components/UI/UrlAutocomplete/index.tsx
Comment thread app/component-library/components-temp/Tabs/TabsBar/TabsBar.tsx
Comment thread app/components/Views/TrendingView/TrendingView.tsx

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

Would it be possible to add component view test to this PR before it is merged.
It would be nice it you could add things such:

  • Feature-flag fallback works end-to-end
  • Dapps tab favorites behavior (new star/remove flow)
  • Dapps/Sites row browser navigation contract
  • Sites Full View mode: favorites behavior
  • Sports tab loading/empty/list transitions
  • Predict featured carousel integration in Explore context
  • Tab strip UX regression guard

Comment thread tests/smoke/predict/predict-cash-out.spec.ts
matallui
matallui previously approved these changes Apr 30, 2026
@juanmigdr juanmigdr requested a review from racitores April 30, 2026 17:42
@juanmigdr juanmigdr dismissed stale reviews from matallui and bergarces via 97f3435 April 30, 2026 17:49
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokePerps, SmokePredictions, SmokeBrowser, SmokeConfirmations
  • Selected Performance tags: @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR introduces a major refactor of the Trending/Explore page with significant structural changes:

  1. SmokeWalletPlatform (primary): The Trending tab is the core feature tested by this tag. The PR completely restructures TrendingView.tsx to support a tabbed V2 layout (gated by feature flag) while extracting the old layout to ExplorePageV1.tsx. The existing E2E test tests/smoke/trending/trending-feed.spec.ts (tagged SmokeWalletPlatform) directly tests the Trending feed sections (tokens, perps, stocks, predictions, sites), QuickActions navigation, and section full views. The testIds file was also modified (QUICK_ACTIONS_SCROLL_VIEW moved). SitesList.tsx and SitesFullView.tsx were refactored with new navigation logic and favorites mode. These changes could break existing trending feed tests.

  2. SmokePerps (required): The perps navigation was refactored - PerpsExploreSection.tsx was deleted and replaced with new perpsNavigation.ts helper and PerpsTileRowItem. The navigateToPerpsMarketList function is a new navigation entry point. Perps section rendering in the explore feed changed significantly.

  3. SmokePredictions (required): PredictHomeFeaturedCarousel.tsx was refactored to use usePredictionsFeed directly instead of the old Section component. usePredictMarketData.tsx got a useLayoutEffect fix for loading state. predictionsNavigation.ts is a new navigation helper. These changes affect the Predictions section in the explore feed and the Predict home carousel.

  4. SmokeBrowser (required): UrlAutocomplete/index.tsx was significantly refactored - it now uses the new useExploreSearch API from search/useExploreSearch.ts (different module path and API shape), added stocks feed support, and changed how search results are bridged. The URL autocomplete is used in the browser search bar. SitesList.tsx navigation logic changed (now navigates to browser with fromTrending: true). SitesFullView.tsx now supports favorites mode.

  5. SmokeConfirmations (included per tag dependency rules): SmokePerps and SmokePredictions descriptions specify to also select SmokeConfirmations since their flows involve on-chain transactions.

The useExploreSearch hook was completely moved from hooks/useExploreSearch.ts to search/useExploreSearch.ts with a different API (returns sections array instead of data/isLoading records). This is a breaking change for any consumers - UrlAutocomplete was updated accordingly. The TabsBar.tsx layout change (moving px-4 from container to ScrollView contentContainerStyle) is a visual fix that affects the tab bar rendering across the app.

Performance Test Selection:
The PR includes significant changes to the Trending/Explore feed rendering architecture (tabbed layout, new feed components, new hooks). The usePredictMarketData hook received a useLayoutEffect fix specifically for loading state performance (avoiding painted frames with empty data). The PredictHomeFeaturedCarousel was refactored to use usePredictionsFeed directly. The perps feed rendering was restructured with new tile components. These changes could impact render performance for the Predict and Perps sections. @PerformancePredict covers prediction market list loading and balance display. @PerformancePreps covers perps market loading and position management.

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 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 97f3435. Configure here.

Comment thread app/components/Views/TrendingView/ExplorePageV1.tsx
@Prithpal-Sooriya

Copy link
Copy Markdown
Contributor

Thanks @racitores 🫶

Discussed with @juanmigdr and we will do this as a fast follow once this is merged.
The feature flag works and we plan to keep this disabled in RC.

I'll create tickets around CV tests (I agree that we should capture these).

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
66.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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

One component-library concern stood out here. The TabsBar spacing change looks like an Explore-driven fix, but because it changes how caller-provided padding works it affects every existing TabsBar consumer, not just this screen.

non-blocking: since this PR also adds several Explore-specific UI compositions, it would be useful to get a quick pass from @brianacnguyen on design-system usage and whether any newer shared components fit here before we grow these patterns further.

Comment thread app/component-library/components-temp/Tabs/TabsBar/TabsBar.tsx

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

Platform file lgtm

@juanmigdr juanmigdr removed the request for review from racitores May 1, 2026 08:10

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

It was confirmed that the additional e2e tests for Explore v2 would be submitted in a separate PR. As a result, the current changes to the E2E files look correct to me.

@juanmigdr juanmigdr added this pull request to the merge queue May 1, 2026
Merged via the queue into main with commit da43681 May 1, 2026
97 of 100 checks passed
@juanmigdr juanmigdr deleted the feat/explore-page-v2-reorg branch May 1, 2026 15:34
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-XL skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.