Skip to content

refactor(analytics): migrate Batch 3-15: mobile-platform#26591

Merged
NicolasMassart merged 2 commits into
mainfrom
refactor/MCWP-302_analytics_migration_batch_3-15_mobile-platform
Feb 27, 2026
Merged

refactor(analytics): migrate Batch 3-15: mobile-platform#26591
NicolasMassart merged 2 commits into
mainfrom
refactor/MCWP-302_analytics_migration_batch_3-15_mobile-platform

Conversation

@NicolasMassart

@NicolasMassart NicolasMassart commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Description

Phase 3 analytics migration (Batch 3-15): migrate the ResetPassword view from MetaMetrics.getInstance() / MetricsEventBuilder to the new analytics utility and AnalyticsEventBuilder.

Reason: Deprecate MetaMetrics in favour of the shared analytics utility and AnalyticsController.

Changes: ResetPassword/index.js now uses analytics.trackEvent() and AnalyticsEventBuilder from app/util/analytics; test mocks updated to mock the analytics utility instead of MetaMetrics.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-302 (Batch 3-15)

Manual testing steps

Feature: Settings analytics

  Scenario: user triggers a password change event
    Given app is open and user is in Settings > Change Password flow

    When user performs an action that triggers analytics (e.g. password change confirmation)
    Then the event is tracked on Mixpanel

Screenshots/Recordings

N/A – analytics migration, no UI change.

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

Low Risk
Low risk refactor limited to analytics plumbing in the password reset flow; main risk is mis-tracking or missing the PASSWORD_CHANGED event due to the API swap.

Overview
Migrates ResetPassword analytics from legacy MetaMetrics.getInstance()/MetricsEventBuilder to the shared analytics utility with AnalyticsEventBuilder, keeping the PASSWORD_CHANGED event and its biometry-related properties.

Updates the ResetPassword tests to mock util/analytics/analytics instead of MetaMetrics.

Written by Cursor Bugbot for commit 22501d0. This will update automatically on new commits. 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.

@NicolasMassart NicolasMassart requested a review from a team February 25, 2026 18:02
@NicolasMassart NicolasMassart added the team-mobile-platform Mobile Platform team label Feb 25, 2026
@NicolasMassart NicolasMassart self-assigned this Feb 25, 2026
@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Feb 25, 2026
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue Feb 25, 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.

Comment thread app/components/Views/ResetPassword/index.js
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are a straightforward analytics module migration in the ResetPassword component. The code is being updated from the old analytics pattern (MetaMetrics.getInstance().trackEvent() with MetricsEventBuilder) to the new pattern (analytics.trackEvent() with AnalyticsEventBuilder). This is a pure refactoring change with no functional impact:

  1. The PASSWORD_CHANGED event tracking remains identical in behavior
  2. Only import paths and method calls are updated
  3. The unit test was properly updated to mock the new analytics module
  4. No UI changes, no logic changes, no user-facing functionality affected

The existing E2E tests for password change functionality (change-password.spec.ts and delete-wallet.spec.ts) are regression tests tagged with RegressionAccounts and RegressionWalletPlatform respectively, which are not part of the available smoke test tags. Since this is a low-risk internal refactoring with proper unit test coverage, no smoke E2E tests are required.

Performance Test Selection:
This change is a pure analytics module migration with no impact on UI rendering, data loading, state management, or any performance-critical paths. The ResetPassword component's functionality remains unchanged - only the analytics tracking import paths and method calls were updated. No performance tests are needed.

View GitHub Actions results

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

LGTM

@NicolasMassart NicolasMassart added this pull request to the merge queue Feb 27, 2026
@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Feb 27, 2026
Merged via the queue into main with commit b64014f Feb 27, 2026
58 of 59 checks passed
@NicolasMassart NicolasMassart deleted the refactor/MCWP-302_analytics_migration_batch_3-15_mobile-platform branch February 27, 2026 19:54
@github-project-automation github-project-automation Bot moved this from Review finalised - Ready to be merged to Merged, Closed or Archived in PR review queue Feb 27, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 27, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Feb 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-S team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants