Skip to content

refactor: replace speed-up/cancel retry modal with error toasts#27857

Open
vinistevam wants to merge 9 commits intomainfrom
vs/redesign-retry-modal-to-toast
Open

refactor: replace speed-up/cancel retry modal with error toasts#27857
vinistevam wants to merge 9 commits intomainfrom
vs/redesign-retry-modal-to-toast

Conversation

@vinistevam
Copy link
Copy Markdown
Contributor

@vinistevam vinistevam commented Mar 24, 2026

Description

Speed up and cancel failures no longer open a blocking Retry modal. Users see a toast with a clear title and, when available, a short error description—including a friendlier message when the failure is due to “nonce too low” (already confirmed).

Changes

  • Removed RetryModal and related state (retryIsOpen, errorMsg, toggleRetry, retry) from the legacy Transactions screen and UnifiedTransactionsView.
  • On failure, legacy Transactions uses ToastService.showToast with shared options from getTransactionUpdateErrorToastOptions.
  • Unified flow uses ToastContext in useUnifiedTxActions to show the same toast shape.
  • Centralized toast config in app/util/confirmation/transactions.ts (variant, icon, colors, transparent background, copy) so both entry points stay in sync.
  • Added resolveTransactionUpdateErrorMessage to map raw errors to user-facing strings where we special-case known cases.

Changelog

CHANGELOG entry: Redesigned speed-up/cancel retry modal with error toasts

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1076

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

toast.failed.webm

Before

After

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 UX refactor that changes how speed-up/cancel failures are surfaced (toast instead of a blocking modal) without altering transaction update logic; main risk is missing toast context/service wiring in some views.

Overview
Speed-up/cancel failures no longer open a blocking Retry modal; they now show an error toast in both the legacy Transactions list (via ToastService) and the unified flow (via ToastContext).

Adds shared helpers resolveTransactionUpdateErrorMessage and getTransactionUpdateErrorToastOptions in util/confirmation/transactions.ts, including a friendlier message for “nonce too low” (already confirmed), and updates tests/mocks accordingly. Locale strings are migrated from transaction_update_retry_modal to transaction_update_toast across supported languages.

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

…nsaction update errors

- Removed the RetryModal component from UnifiedTransactionsView.
- Integrated toast notifications to handle transaction update errors using ToastContext.
- Updated useUnifiedTxActions to show toast messages instead of managing retry state.
- Added utility functions to resolve error messages and create toast options for transaction updates.
- Updated tests to reflect changes in error handling and toast notifications.
- Modified localization files to support new toast messages for transaction updates.
@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Mar 24, 2026
@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.

@vinistevam vinistevam marked this pull request as ready for review March 24, 2026 14:59
@vinistevam vinistevam requested a review from a team as a code owner March 24, 2026 14:59
@github-actions github-actions bot added the risk-medium Moderate testing recommended · Possible bug introduction risk label Mar 24, 2026
@vinistevam vinistevam requested a review from a team as a code owner March 27, 2026 08:09
@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 Mar 27, 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 Mar 27, 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 1, 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 1, 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 8, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

Reviewed by Cursor Bugbot for commit 65106db. Configure here.

@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 8, 2026
jpuri
jpuri previously approved these changes Apr 10, 2026
PatrykLucka
PatrykLucka previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Contributor

@PatrykLucka PatrykLucka left a comment

Choose a reason for hiding this comment

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

LGTM, just left one non-blocking comment.

@vinistevam vinistevam dismissed stale reviews from PatrykLucka and jpuri via d49b050 April 13, 2026 08:22
@vinistevam vinistevam requested review from PatrykLucka and jpuri April 13, 2026 08:23
@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 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR replaces the RetryModal (a modal dialog with Retry/Cancel buttons) with a toast notification for speed-up and cancel transaction failures. Key changes:

  1. RetryModal deleted - The component is fully removed from both Transactions/index.js and UnifiedTransactionsView.tsx.
  2. Toast notification added - ToastService.showToast() and ToastContext are now used to display error feedback when speed-up/cancel transactions fail.
  3. New utility functions - resolveTransactionUpdateErrorMessage and getTransactionUpdateErrorToastOptions in transactions.ts handle error message resolution and toast configuration.
  4. Locale strings updated - transaction_update_retry_modal key replaced with transaction_update_toast with simplified strings (no more retry/cancel button text).
  5. useUnifiedTxActions.ts - Removed retry state management (retryIsOpen, retryErrorMsg, toggleRetry) and replaced with toast-based error display.
  6. useCancelSpeedupGas.ts - Trivial import reordering, no functional change.

SmokeConfirmations: The cancel and speed-up transaction flows are directly affected. The error handling UX has changed from a modal to a toast, which needs validation in the confirmation/transaction management flows.

SmokeWalletPlatform: The transaction history view (Transactions/index.js and UnifiedTransactionsView) is where speed-up/cancel actions originate. The activity/transaction history display is tested here.

No performance impact expected - this is a UX change replacing a modal with a toast notification. No performance-sensitive code paths are affected.

Performance Test Selection:
The changes replace a modal dialog with a toast notification for transaction failure feedback. This is a pure UX change with no impact on rendering performance, data loading, account/network lists, or critical user flows that would affect performance metrics. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk-medium Moderate testing recommended · Possible bug introduction risk size-L team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants