Skip to content

chore: adds ab test for WH positioning in explore cp-7.78.0#30303

Merged
joaosantos15 merged 2 commits into
mainfrom
TSA-531-explore-ab-test
May 18, 2026
Merged

chore: adds ab test for WH positioning in explore cp-7.78.0#30303
joaosantos15 merged 2 commits into
mainfrom
TSA-531-explore-ab-test

Conversation

@joaosantos15

@joaosantos15 joaosantos15 commented May 18, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an AB test for the positioning of the Whats Happening section in the Explore page.

Changelog

CHANGELOG entry: no-changelog

Related issues

Fixes:

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

Low Risk
Low risk UI-only change gated by a remote A/B test flag; primary risk is unintended section ordering or missing content in Explore for certain variants.

Overview
Adds a new remote A/B test (socialAiTSA531AbtestWhatsHappeningExplore) to control whether the Explore "Now" tab shows Whats Happening before or after the Predict carousel.

NowTab now reads the variant via useABTest and renders the two intro sections in the chosen order, while analytics are updated to attach the new assignment to EXPLORE_INTERACTED events (registry + unit test coverage).

Reviewed by Cursor Bugbot for commit 166fec1. 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.

@metamaskbotv2 metamaskbotv2 Bot added the team-social-ai Social & AI team label May 18, 2026
@joaosantos15 joaosantos15 marked this pull request as ready for review May 18, 2026 12:09
@joaosantos15 joaosantos15 requested a review from a team as a code owner May 18, 2026 12:09
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes introduce an A/B test for the Trending/Explore tab's NowTab that controls the ordering of the WhatsHappening section relative to the Predictions section:

  1. feature-flag-registry.ts (CRITICAL): Adds a new remote feature flag socialAiTSA531AbtestWhatsHappeningExplore with control/treatment percentage rollout variants. This is a test infrastructure file but the change is additive (new flag entry only).

  2. TrendingView/abTestConfig.ts (NEW): Defines the A/B test configuration - control variant keeps Predictions before WhatsHappening, treatment variant reverses the order.

  3. TrendingView/tabs/NowTab.tsx: Uses useABTest hook with the new flag to conditionally reorder the WhatsHappening and Predictions sections. The logic is straightforward - creates both sections as variables and orders them based on the variant.

  4. abTestAnalyticsRegistry.ts: Registers the new A/B test analytics mapping for EXPLORE_INTERACTED events.

  5. NowTab.test.tsx and enrichWithABTests.test.ts: Unit tests for the new behavior.

Impact Assessment:

  • Changes are entirely contained within the TrendingView/Explore tab (NowTab)
  • The A/B test only affects the ordering of two sections (WhatsHappening and Predictions) within the Trending tab
  • No changes to core controllers, navigation, confirmations, accounts, networks, or other critical paths
  • SmokeWalletPlatform covers the Trending discovery tab including its subsections
  • SmokePredictions is needed because the Predictions section ordering is directly affected, and per the tag description "Predictions is also a section inside the Trending tab (SmokeWalletPlatform)"
  • Per SmokePredictions description: "When selecting SmokePredictions, also select SmokeWalletPlatform (Trending section)" - both are selected
  • No other tags are warranted as the changes don't touch confirmations, accounts, networks, swaps, browser, snaps, or other areas

Performance Test Selection:
The changes are limited to UI section ordering within the TrendingView NowTab based on an A/B test variant. This is a simple conditional array reordering of two pre-rendered React elements - no new data fetching, no new API calls, no new list rendering, no changes to state management or controllers. The performance impact is negligible and does not warrant performance test execution.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@joaosantos15 joaosantos15 changed the title chore: adds ab test for WH positioning in explore chore: adds ab test for WH positioning in explore cp-7.78.0 May 18, 2026
@joaosantos15 joaosantos15 enabled auto-merge May 18, 2026 15:09
@joaosantos15 joaosantos15 added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit e3a4312 May 18, 2026
184 of 200 checks passed
@joaosantos15 joaosantos15 deleted the TSA-531-explore-ab-test branch May 18, 2026 15:30
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-M team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants