Skip to content

feat: add remote feature flag for section ordering and made predictions a carousel#28239

Merged
juanmigdr merged 8 commits into
mainfrom
feat/revert-to-previous-structure-explore
Apr 6, 2026
Merged

feat: add remote feature flag for section ordering and made predictions a carousel#28239
juanmigdr merged 8 commits into
mainfrom
feat/revert-to-previous-structure-explore

Conversation

@juanmigdr

@juanmigdr juanmigdr commented Apr 1, 2026

Copy link
Copy Markdown
Member

Description

The Explore page section order was previously hardcoded, making it impossible to reorder sections (tokens, predictions, perps, stocks, sites) without a code change. Additionally, the predictions section used a row item layout that was inconsistent with the desired carousel experience. This PR:

  • Introduces the exploreSectionsOrder remote feature flag (LaunchDarkly JSON) that independently controls the order of sections for the home view, quick actions, and search results.
  • Splits the previous single useSectionsArray hook into useQuickActionsSectionsArray and useSearchSectionsArray so each surface can be ordered independently.
  • Adds a validated selector (selectExploreSectionsOrder) with progressive-rollout unwrapping and graceful fallback to hardcoded defaults when the flag is absent or invalid.
  • Switches the predictions section from SectionCard to SectionCarrousel and renders the full PredictMarket card component instead of PredictMarketRowItem.

Changelog

CHANGELOG entry: updated Explore page predictions section to carousel layout and added remote-configurable section ordering

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-3010 & https://consensyssoftware.atlassian.net/browse/ASSETS-3011

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-01.at.17.11.53.mov

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
Adds a new remote feature flag that controls Explore section ordering across multiple surfaces, which can change UI behavior at runtime if misconfigured. Also changes Predictions rendering to a carousel layout, impacting layout/interaction and related navigation tests.

Overview
Explore section ordering is now remotely configurable. Adds a new exploreSectionsOrder LaunchDarkly flag and selector (selectExploreSectionsOrder) that validates/unwraps flag values and falls back to defaults when invalid, then uses it to independently order sections on the home feed, Quick Actions, and search (splitting the prior useSectionsArray into useQuickActionsSectionsArray and useSearchSectionsArray).

Predictions section UI is updated. Predictions is moved to a carousel-style section and now renders PredictMarket cards (with a carousel skeleton) instead of the row-item layout; minor carousel sizing is adjusted (minHeight vs fixed height).

Tests are aligned to the new behavior. Updates unit tests to mock the renamed hooks/added components, registers the new flag in the E2E feature-flag registry, and adjusts smoke/page-object expectations for the new default section order and Quick Action ordering.

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

@github-actions github-actions Bot added size-S risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 1, 2026
Comment thread app/components/Views/TrendingView/sections.config.tsx
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 2, 2026
Comment thread app/components/Views/TrendingView/sections.config.tsx
@github-actions github-actions Bot added size-M and removed size-S labels Apr 2, 2026
@juanmigdr juanmigdr changed the title feat: revert to previous structure explore page feat: add remote feature flag for section ordering and reverted to carousel Apr 2, 2026
@juanmigdr juanmigdr changed the title feat: add remote feature flag for section ordering and reverted to carousel feat: add remote feature flag for section ordering and made predictions a carousel Apr 2, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 2, 2026
Comment thread app/components/Views/TrendingView/hooks/useExploreSearch.ts
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 2, 2026

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

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.

Comment thread app/selectors/featureFlagController/exploreSectionsOrder/index.ts
@juanmigdr juanmigdr requested a review from a team as a code owner April 2, 2026 16:55
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 2, 2026
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 3, 2026
@juanmigdr juanmigdr enabled auto-merge April 3, 2026 08:32
@github-actions github-actions Bot added risk-medium Moderate testing recommended · Possible bug introduction risk and removed risk-medium Moderate testing recommended · Possible bug introduction risk labels Apr 3, 2026
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes in this PR are focused on the Trending/Explore view with the following key modifications:

  1. Section ordering now feature-flag driven: A new exploreSectionsOrder remote feature flag controls the order of sections in home, quickActions, and search views. The default home order changed from tokens→stocks→perps→predictions→sites to predictions→tokens→perps→stocks→sites.

  2. Predictions section UI change: The predictions section now uses SectionCarrousel instead of SectionCard, and renders PredictMarket component (carousel style) instead of PredictMarketRowItem. This is a significant UI change for predictions.

  3. Hook renaming: useSectionsArray split into useQuickActionsSectionsArray and useSearchSectionsArray for better separation of concerns.

  4. SectionCarrousel fix: height changed to minHeight for card sizing.

  5. E2E test updates: The trending-feed.spec.ts and TrendingView.ts page object were updated to reflect the new section order.

Tag selection rationale:

  • SmokeWalletPlatform: Directly tests the Trending tab, section ordering, QuickActions, and search functionality. The test file trending-feed.spec.ts is tagged with SmokeWalletPlatform. This is the primary tag.
  • SmokePredictions: The predictions section UI was significantly changed (carousel vs card layout, different component). SmokePredictions tests prediction market interactions which now use a different UI component. Per tag description, Predictions is a section inside Trending (SmokeWalletPlatform), so both are needed.
  • SmokePerps: Perps section ordering changed (now appears before stocks in quickActions). Per tag description, Perps is also a section inside Trending (SmokeWalletPlatform), so both are needed.

Tags NOT selected:

  • SmokeConfirmations: No changes to confirmation flows
  • SmokeAccounts/SmokeIdentity: No account management changes
  • SmokeNetworkAbstractions/SmokeNetworkExpansion: No network changes
  • SmokeTrade: No swap/bridge changes (though SmokePredictions and SmokePerps are related to trade, the changes don't affect the trade flow itself)
  • SmokeCard/SmokeRamps: No card or ramp changes
  • FlaskBuildTests: No snap changes

Performance Test Selection:
The changes are primarily about section ordering (controlled by feature flag) and a minor UI fix (height → minHeight in SectionCarrousel). While there is a UI component change for predictions (SectionCarrousel vs SectionCard), this is not expected to have a measurable performance impact. The ordering change is a data/config change, not a rendering performance concern. No performance tests are warranted.

View GitHub Actions results

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

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

@sonarqubecloud

sonarqubecloud Bot commented Apr 3, 2026

Copy link
Copy Markdown

@cortisiko cortisiko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

approving from an e2e perspective

@juanmigdr juanmigdr added this pull request to the merge queue Apr 6, 2026
Merged via the queue into main with commit 98d60f3 Apr 6, 2026
95 checks passed
@juanmigdr juanmigdr deleted the feat/revert-to-previous-structure-explore branch April 6, 2026 16:24
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 6, 2026
@metamaskbot metamaskbot added the release-7.74.0 Issue or pull request that will be included in release 7.74.0 label Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.74.0 Issue or pull request that will be included in release 7.74.0 risk-medium Moderate testing recommended · Possible bug introduction risk size-M team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants