Skip to content

feat: update malicious alert modal to new design#24055

Merged
AugmentedMode merged 14 commits intomainfrom
fix/malicious-alert-modal
Jan 29, 2026
Merged

feat: update malicious alert modal to new design#24055
AugmentedMode merged 14 commits intomainfrom
fix/malicious-alert-modal

Conversation

@AugmentedMode
Copy link
Copy Markdown
Contributor

@AugmentedMode AugmentedMode commented Dec 16, 2025

Description

The Got it button on malicious (Danger severity) alert modals was clickable without requiring the user to first acknowledge the risk via the checkbox. This created a UX issue where users could dismiss security warnings without properly acknowledging the danger.

Changes:

  1. For malicious/danger alerts, the primary button now displays "Acknowledge" instead of "Got it"
  2. The "Acknowledge" button is disabled by default until the checkbox is checked
  3. Added a "Close" button to the left of "Acknowledge" for danger alerts, making it clearer users can dismiss without proceeding
  4. The Close button simply dismisses the modal without triggering the acknowledge callback
  5. Blocking alerts remain disabled (must use action button to proceed)

Changelog

CHANGELOG entry: Fixed malicious alert modal to require checkbox acknowledgment before enabling the Acknowledge button, and added a Close button for easier dismissal

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

Screenshot 2025-12-15 at 9 55 53 PM

After

Screenshot 2025-12-15 at 9 52 47 PM Screenshot 2025-12-15 at 9 52 39 PM

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
Changes the dismiss/acknowledge behavior of security-sensitive Danger alerts (new button semantics and disable rules), which could impact user flows if logic is wrong, but scope is limited to the alert modal UI and tests.

Overview
Danger-severity alert modals now require explicit user acknowledgement. The primary button changes from “Got it” to “Acknowledge” and is disabled until the checkbox is checked (and remains disabled for blocking alerts).

Adds a separate “Close” button for Danger alerts that only dismisses the modal (does not trigger onAcknowledgeClick), updates testIDs/selectors (alert-modal-acknowledge-button) and E2E flows accordingly, and introduces new i18n strings for acknowledge_btn and close_btn along with expanded unit coverage.

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

@AugmentedMode AugmentedMode requested a review from a team as a code owner December 16, 2025 01:08
@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.

@metamaskbot metamaskbot added the team-product-safety Push issues to Product Safety team label Dec 16, 2025
@AugmentedMode AugmentedMode self-assigned this Dec 16, 2025
imblue-dabadee
imblue-dabadee previously approved these changes Dec 17, 2025
@AugmentedMode AugmentedMode requested a review from a team as a code owner January 28, 2026 15:20
imblue-dabadee
imblue-dabadee previously approved these changes Jan 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes modify the alert modal component used in the confirmations flow, specifically:

  1. Alert Modal UI Changes: The alert-modal.tsx component has been updated to show different buttons based on alert severity - "Acknowledge" + "Close" for danger alerts vs "Got it" for non-danger alerts. This changes the user interaction flow for acknowledging security alerts.

  2. E2E Test Infrastructure Updates: The E2E page object AlertSystem.ts was updated to rename gotItAlertModalButton to acknowledgeAlertModalButton and the corresponding tap method. The spec file alert-system.spec.ts was updated to use the new method name.

  3. Test ID Changes: The test ID was renamed from alert-modal-got-it-button to alert-modal-acknowledge-button in ConfirmationView.testIds.ts.

  4. The spec file is tagged with SmokeConfirmationsRedesigned: The alert-system.spec.ts file explicitly uses SmokeConfirmationsRedesigned tag (line 8: import { SmokeConfirmationsRedesigned } from '../../../tags').

The changes are self-contained within the confirmations alert system. Running SmokeConfirmationsRedesigned will validate that:

  • The alert modal displays correctly for different alert severities
  • The new button interactions work as expected
  • The E2E test infrastructure changes are compatible with the app code changes

No other tags are needed as the alert system is specific to confirmations and doesn't affect other areas like accounts, trading, or network management.

Performance Test Selection:
The changes are focused on the alert modal UI component within confirmations. The modifications involve button renaming, conditional rendering of Close/Acknowledge buttons based on alert severity, and updated test IDs. These are UI logic changes that don't affect rendering performance, data loading, state management, or app startup. No performance-critical paths like list rendering, balance loading, or navigation flows are impacted.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@AugmentedMode AugmentedMode added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 3d05007 Jan 29, 2026
88 checks passed
@AugmentedMode AugmentedMode deleted the fix/malicious-alert-modal branch January 29, 2026 20:39
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
@metamaskbot metamaskbot added the release-7.65.0 Issue or pull request that will be included in release 7.65.0 label Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.65.0 Issue or pull request that will be included in release 7.65.0 size-M team-product-safety Push issues to Product Safety team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants