Skip to content

feat: explore page v2#29169

Closed
juanmigdr wants to merge 45 commits into
mainfrom
feat/explore-page-v2
Closed

feat: explore page v2#29169
juanmigdr wants to merge 45 commits into
mainfrom
feat/explore-page-v2

Conversation

@juanmigdr
Copy link
Copy Markdown
Member

@juanmigdr juanmigdr commented Apr 22, 2026

Description

Changelog

CHANGELOG entry:

Related issues

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

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

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
Moderate UI/logic refactor of the Explore feed and section configuration, plus new token sparkline fetching and navigation/analytics paths that could affect performance and routing if misconfigured.

Overview
Reworks the Explore (Trending) screen into a tabbed feed (Now, Macro, RWAs, Crypto, Sports, Dapps) by replacing the single ScrollView + QuickActions with per-tab sectioned scroll panels.

Expands and refactors sections.config to support new section IDs (e.g. crypto_movers, multiple perps/predictions variants), adds reusable section renderers (TileSection, SectionPills, PillToggledCardSection), and changes token/perps presentation to tile cards and pill rows in the feed while keeping row-based rendering for search.

Adds token sparkline support for trending token tiles via useTrendingTokenTileSparklines (EVM fetches from the price API; non‑EVM delegates to MultichainAssetsRatesController), centralizes downsample in util/sparklines, and updates omni-search/URL autocomplete mappings and tests/E2E selectors accordingly (including removing the exploreSectionsOrder feature flag and QuickActions selectors).

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

@github-actions github-actions Bot added size-M risk:low AI analysis: low risk labels Apr 22, 2026
expect(elements[0]).toBeOnTheScreen();
});
});
});
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.

Test uses hardcoded text instead of locale keys

Low Severity

The new test selects elements using hardcoded English strings ('Now', 'Macro', 'RWAs', etc.) via getAllByText. The unit testing guidelines explicitly say to avoid selecting by hardcoded text content because it breaks when text changes (i18n, copy updates). The preferred approach is using locale keys like strings('trending.tabs.now') (which the component itself already uses) or testID props. Since the corresponding locale keys exist at trending.tabs.*, using strings() would make the test resilient to copy changes.

Fix in Cursor Fix in Web

Triggered by project rule: Unit Testing Guidelines

Reviewed by Cursor Bugbot for commit 6abc407. Configure here.

@juanmigdr juanmigdr requested a review from a team April 22, 2026 11:05
@juanmigdr juanmigdr requested a review from a team as a code owner April 22, 2026 14:50
@github-actions github-actions Bot added size-L and removed size-M labels Apr 22, 2026
@juanmigdr juanmigdr requested a review from a team as a code owner April 22, 2026 19:49
@github-actions github-actions Bot added size-XL and removed size-L labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI PR Analysis

🚫 Merge safe: false | 🟠 Risk: high

Merge decision: AI analysis did not complete — manual review required before merging.

AI analysis did not complete. Manual review recommended.

View run

@github-actions github-actions Bot added risk:high AI analysis: high risk and removed risk:low AI analysis: low risk labels Apr 22, 2026
* Sports tab: sport prediction markets (same carousel UX as the Now tab’s predictions, `sports` category).
*/
export const useSportsSections = (): (SectionConfig & { id: SectionId })[] =>
useMemo(() => [SECTIONS_CONFIG.sports_predictions], []);
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.

Prediction sections missing feature flag gate on two tabs

Medium Severity

useCryptoSections unconditionally pushes crypto_predictions and useSportsSections unconditionally includes sports_predictions, without checking isPredictEnabled. This is inconsistent with useMacroSections and useRwasSections, which both gate their prediction sections behind selectPredictEnabledFlag. When predictions are disabled, the Crypto and Sports tabs still mount prediction sections, triggering unnecessary API calls via usePredictMarketData and potentially displaying prediction content to users who shouldn't see it.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fd00f64. Configure here.

Comment thread app/components/Views/TrendingView/sections.config.tsx Outdated
@juanmigdr juanmigdr requested a review from a team as a code owner April 24, 2026 08:20
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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.

There are 3 total unresolved issues (including 2 from previous reviews).

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 c3a3165. Configure here.

case 'perps':
case 'rwa_perps':
case 'macro_stocks_commodity_perps':
case 'crypto_perps':
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 prediction section IDs missing from data transformation

Medium Severity

The sectionIdToCategory mapping correctly handles sports_predictions, crypto_predictions, and politics_predictions (lines 105–107), but the data transformation switch at line 313 only matches case 'predictions':. The new prediction section IDs are missing, so their data would remain an empty transformedData array. This is inconsistent with the perps and tokens branches, where all new variants (rwa_perps, macro_stocks_commodity_perps, crypto_perps, crypto_movers) were added to both switches.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c3a3165. Configure here.

@juanmigdr juanmigdr marked this pull request as draft April 24, 2026 10:18
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.63910% with 236 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.28%. Comparing base (f7de05a) to head (b1f3efb).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
...nts/Views/TrendingView/sections/perps.sections.tsx 40.00% 45 Missing and 3 partials ⚠️
...ews/TrendingView/sections/predictions.sections.tsx 36.95% 28 Missing and 1 partial ⚠️
...nents/Views/TrendingView/tabs/ExploreTabPanels.tsx 62.29% 18 Missing and 5 partials ⚠️
...s/useBrowserRecentsSites/useBrowserRecentsSites.ts 15.38% 22 Missing ⚠️
...nts/Sections/SectionTypes/AllSportsPillSection.tsx 8.33% 22 Missing ⚠️
...nts/Views/TrendingView/sections/sites.sections.tsx 25.00% 13 Missing and 2 partials ⚠️
...eBrowserFavoritesSites/useBrowserFavoritesSites.ts 18.18% 9 Missing ⚠️
...Sections/SectionTypes/SectionPills/SectionPill.tsx 59.09% 2 Missing and 7 partials ⚠️
.../TilesSection/TileTypes/SiteRecentsTileRowItem.tsx 43.75% 9 Missing ⚠️
...ts/Views/TrendingView/sections/tokens.sections.tsx 68.96% 6 Missing and 3 partials ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29169      +/-   ##
==========================================
- Coverage   82.35%   82.28%   -0.07%     
==========================================
  Files        5139     5159      +20     
  Lines      136323   136829     +506     
  Branches    30711    30851     +140     
==========================================
+ Hits       112266   112591     +325     
- Misses      16430    16579     +149     
- Partials     7627     7659      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@juanmigdr juanmigdr removed the request for review from a team April 28, 2026 09:40
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@github-actions
Copy link
Copy Markdown
Contributor

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

@juanmigdr juanmigdr closed this May 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants