Skip to content

fix(predict): add home_section entrypoint to Predict Feed Viewed event#28944

Merged
vinnyhoward merged 1 commit into
mainfrom
chore-tmcu-609-predict-viewed-event-prop-update
Apr 16, 2026
Merged

fix(predict): add home_section entrypoint to Predict Feed Viewed event#28944
vinnyhoward merged 1 commit into
mainfrom
chore-tmcu-609-predict-viewed-event-prop-update

Conversation

@vinnyhoward
Copy link
Copy Markdown
Contributor

@vinnyhoward vinnyhoward commented Apr 16, 2026

Description

The Predict Feed Viewed event tracks where users navigate from via an entry_point property. When users tapped into the Predict Feed from the homepage Predictions section (trending markets carousel, no active positions), no entry_point value was being passed. The property was absent from the event.

This PR adds a new home_section entry point value and wires it into the homepage navigation handler that leads to the Predict Feed.

Changelog

CHANGELOG entry:null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-609

Manual testing steps

Feature: Predict Feed Viewed entry_point from homepage

  Scenario: user navigates to Predict Feed from homepage with no positions
    Given the user has no active Predict positions
    And the user is on the Wallet homepage

    When user taps the "Predictions" section header title
    Then the Predict Feed opens
    And a "Predict Feed Viewed" event is fired with entry_point: "home_section"

Screenshots/Recordings

Screen.Recording.2026-04-16.at.1.02.34.PM.mov

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
Small analytics/navigation parameter change scoped to the Predict homepage entry point with unit test coverage; minimal functional impact beyond event attribution.

Overview
Ensures the Predict Feed Viewed analytics entry_point is populated when users enter the Predict market list from the homepage Predictions section.

This introduces a new PredictEventValues.ENTRY_POINT.HOME_SECTION value, extends the PredictEntryPoint type to include it, and updates the homepage Predictions navigation handler to pass entryPoint: home_section when tapping the section title (with tests updated/added to assert the new navigation params).

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

@vinnyhoward vinnyhoward requested a review from a team as a code owner April 16, 2026 19:11
@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-mobile-ux Mobile UX team label Apr 16, 2026
@github-actions github-actions Bot added size-S risk-low Low testing needed · Low bug introduction risk labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are focused and low-risk:

  1. eventNames.ts: Adds a new HOME_SECTION constant ('home_section') to PredictEventValues.ENTRY_POINT — purely additive, no breaking changes.

  2. navigation.ts: Extends the PredictEntryPoint type union to include the new HOME_SECTION value — additive type change.

  3. PredictionsSection.tsx: Updates handleViewAllPredictions to pass entryPoint: PredictEventValues.ENTRY_POINT.HOME_SECTION as a navigation param when navigating from the homepage Predictions section to the market list. This is an analytics/tracking enhancement — the navigation itself still works the same way.

  4. PredictionsSection.test.tsx: Unit tests updated to verify the new entry point param is passed correctly.

Tag selection rationale:

  • SmokePredictions: Directly covers the Predictions feature, including navigation to the market list from entry points. The change modifies how the homepage Predictions section navigates to the market list (adding an entry point param), which should be validated by Predictions E2E tests.
  • SmokeWalletPlatform: The PredictionsSection is embedded in the Trending tab (Homepage), which is explicitly covered by SmokeWalletPlatform. Per the SmokePredictions tag description, changes to Predictions views affect Trending, so SmokeWalletPlatform is required as a dependent tag.

No other tags are needed — this change doesn't affect confirmations, accounts, networks, swaps, or other features. The PredictionsSection is only imported by its index file and test file, confirming the narrow scope.

Performance Test Selection:
The changes are purely additive — adding an analytics entry point constant and passing it as a navigation param. There is no UI rendering change, no new data fetching, no state management modification, and no component structure change that would affect performance. No performance tests are warranted.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

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

@sonarqubecloud
Copy link
Copy Markdown

@vinnyhoward vinnyhoward added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit de87a97 Apr 16, 2026
118 checks passed
@vinnyhoward vinnyhoward deleted the chore-tmcu-609-predict-viewed-event-prop-update branch April 16, 2026 20:14
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 16, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.75.0 Issue or pull request that will be included in release 7.75.0 label Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.75.0 Issue or pull request that will be included in release 7.75.0 risk-low Low testing needed · Low bug introduction risk size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants