Skip to content

Conversation

@georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Jan 31, 2026

Description

This PR replaces the tooltip feedback with a toast notification when users copy a transaction ID from the transaction details view. This change makes the copy transaction ID action consistent with other copy actions in the application (like copy address) which already use the toast notification system.

What changed:

  • Removed local tooltip state (justCopied) from transaction details component
  • Added new toast notification system integration for copy transaction ID
  • Added copiedTransactionId locale message
  • Created CopyTransactionIdToast component in toast-master
  • Added Redux action and reducer logic for showCopyTransactionIdToast

Why:

  • Provides a more consistent user experience across all copy actions
  • Uses the centralized toast system instead of component-local tooltip state
  • Better visibility and accessibility for the copy confirmation

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Updated copy transaction ID feedback to use toast notification for consistency with other copy actions

Related issues

Fixes: N/A - UX improvement for consistency

Manual testing steps

  1. Go to the activity/transaction list in MetaMask
  2. Click on any completed transaction to view details
  3. Click the "Copy Transaction ID" button
  4. Verify that a toast notification appears at the bottom of the screen saying "Transaction ID copied"
  5. Verify the toast automatically disappears after ~2 seconds
  6. Test with multiple transactions to ensure consistent behavior

Screenshots/Recordings

Before

Clicking "Copy Transaction ID" showed a tooltip with "Copied!" text that appeared above the button

After

Clicking "Copy Transaction ID" now shows a toast notification at the bottom with "Transaction ID copied" text and a success icon

after720.mov

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 UI-only change that reuses the existing toast framework and adds a small Redux flag; main risk is minor regressions in toast display/stacking due to the portal/z-index adjustments.

Overview
Replaces the transaction details “copied” tooltip feedback with a centralized toast when users click Copy Transaction ID, aligning it with the existing copy-to-clipboard toast pattern.

Adds a new copiedTransactionId locale string and a showCopyTransactionIdToast Redux flag (action, reducer, selector), refactors copy-success toasts into a reusable CopySuccessToast, and updates ToastContainer to render via a portal with a higher toast z-index to ensure visibility.

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

@github-actions
Copy link
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-design-system All issues relating to design system in Extension label Jan 31, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 31, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (4 files, +22 -27)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 transaction-list-item-details/
          • 📄 transaction-list-item-details.component.js +11 -25
          • 📄 transaction-list-item-details.container.js +4 -0
      • 📁 multichain/
        • 📁 toast/
          • 📄 toast.tsx +6 -1
    • 📁 css/
      • 📁 design-system/
        • 📄 _z-index.scss +1 -1

@georgewrmarshall georgewrmarshall self-assigned this Jan 31, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 31, 2026

Builds ready [efdd2fc]
UI Startup Metrics (1322 ± 109 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13221079174910913841480
load--1127919146010111881267
domContentLoaded--1121914145410111801263
domInteractive--3017140232382
firstPaint--1396638473187309
backgroundConnect--24021731914247265
firstReactRender--18113762031
initialActions--106113
loadScripts--8957001223999541032
setupStore--1364761624
numNetworkReqs--221587171570
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--21101523618676220154173
load--1073947178114310941439
domContentLoaded--1058930176614110701409
domInteractive--36181723034125
firstPaint--185731423147234299
backgroundConnect--44427933934713591753
firstReactRender--24166072643
initialActions--108112
loadScripts--81870314491248251133
setupStore--1564161727
numNetworkReqs--1214825954142241
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--8496691107959141023
load--70359998285781873
domContentLoaded--69859497485772869
domInteractive--2616113192281
firstPaint--1076327146139199
backgroundConnect--44181452950113
firstReactRender--15103641624
initialActions--104113
loadScripts--69559296584765867
setupStore--1266271226
numNetworkReqs--221578171573
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1281893223125014901678
load--71162212791247031049
domContentLoaded--70261512681246881045
domInteractive--36181653034119
firstPaint--142641027130140318
backgroundConnect--16013138752160317
firstReactRender--23174852531
initialActions--103111
loadScripts--69961312611236861037
setupStore--1142031418
numNetworkReqs--1224826356151250
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14801171208017516031753
load--1192997145011212841394
domContentLoaded--1191997144911212831393
domInteractive--833524048120179
firstPaint--------
backgroundConnect--74243675892181
firstReactRender--14104671341
initialActions--103122
loadScripts--115097313449212161323
setupStore--165121211266
numNetworkReqs--231288171876
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27201968466647728333614
load--12781067247122912741749
domContentLoaded--12781067247123012741749
domInteractive--131361441150124314
firstPaint--------
backgroundConnect--35012418952984751024
firstReactRender--22156152328
initialActions--203123
loadScripts--12231048243820312371586
setupStore--1879746216288674
numNetworkReqs--76372234789212
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17561480261021518632186
load--14991269209515216061757
domContentLoaded--14981269209415216061756
domInteractive--923022747133193
firstPaint--------
backgroundConnect--802825652102186
firstReactRender--16125041622
initialActions--103122
loadScripts--14511199198213115161723
setupStore--194264431336
numNetworkReqs--231286181876
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29702089439248931834037
load--16361304276233317652555
domContentLoaded--16351304276233317652554
domInteractive--13333673120124459
firstPaint--------
backgroundConnect--3261231135239333912
firstReactRender--2515182172633
initialActions--203123
loadScripts--15801282266430816932403
setupStore--1889771224304705
numNetworkReqs--75382404586179
19--------
📊 Page Load Benchmark Results

Current Commit: efdd2fc | Date: 1/31/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±43ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 715ms (±38ms) 🟢 | historical mean value: 721ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±13ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 43ms 1.00s 1.32s 1.04s 1.32s
domContentLoaded 715ms 38ms 693ms 985ms 727ms 985ms
firstPaint 77ms 13ms 56ms 196ms 88ms 196ms
firstContentfulPaint 77ms 13ms 56ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 120 Bytes (0%)
  • ui: 2.36 KiB (0.03%)
  • common: 8.99 KiB (0.1%)

georgewrmarshall and others added 2 commits February 1, 2026 17:43
Replace inline tooltip with toast notification when copying transaction ID in transaction details modal. This provides better visibility and consistency with other copy actions in the application.

Changes:
- Add toast state management for copy transaction ID
- Remove tooltip and local state from transaction details component
- Add CopyTransactionIdToast component with 2-second auto-hide
- Add "Transaction ID copied" translation message

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Updated toast z-index from 200 to 1100 in design system
- Made ToastContainer use ReactDOM.createPortal to render to document.body
- Ensures toasts and modals share same stacking context for proper layering
- Fixes issue where copy transaction ID toast appeared behind modal dialog
- Remove unused setShowCopyTransactionIdToast import from component
- Add showCopyTransactionIdToast to Sentry errors test snapshot
- Fixes lint error (no-unused-vars, no-shadow)
- Fixes e2e test: 'should capture UI application state'
…oast

- Create reusable CopySuccessToast component to reduce duplication
- CopyAddressToast and CopyTransactionIdToast now use the shared component
- Parameterized selector, messageKey, setAction, toastKey, and dataTestId
- Addresses PR review comment about duplicate code
Copy link

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

<NewSrpAddedToast />
<InfuraSwitchToast />
<CopyAddressToast />
<CopyTransactionIdToast />
Copy link

Choose a reason for hiding this comment

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

Toast Not Shown When Copying Transaction ID From Asset Page

Medium Severity

The CopyTransactionIdToast component is only rendered when onHomeScreen is true (when on / route). However, users can copy transaction IDs from the asset page (/asset route) which also renders the transaction list. When copying from the asset page, the Redux state showCopyTransactionIdToast gets set to true, but no toast appears because ToastMaster returns null on non-home screens. The previous tooltip-based feedback worked everywhere since it used component-local state. Additionally, if the user later navigates to the home screen, the stale toast may unexpectedly appear there.

Fix in Cursor Fix in Web

@georgewrmarshall
Copy link
Contributor Author

Closing Due to Architectural Limitation

This PR is being closed due to a significant architectural limitation with the current toast system that was identified during review.

The Problem

The CopyTransactionIdToast component only renders when onHomeScreen is true (when on the / route). However, users can copy transaction IDs from multiple locations:

  • Home screen (/) ✅ Works
  • Asset page (/asset) ❌ Does not work

When copying from the asset page:

  1. The Redux state showCopyTransactionIdToast gets set to true
  2. No toast appears because ToastMaster returns null on non-home screens
  3. If the user later navigates to the home screen, the stale toast may unexpectedly appear

The previous tooltip-based feedback worked everywhere since it used component-local state.

Why This Happens

The ToastMaster component has conditional rendering based on route:

if (onHomeScreen) {
  return (
    <ToastContainer>
      {/* toasts including CopyTransactionIdToast */}
    </ToastContainer>
  );
}

This architectural pattern means any toast added to the home screen section won't appear on other routes.

The Solution

This issue cannot be properly fixed within the current toast architecture without:

  1. Moving toast to a design-system-level component that renders globally
  2. Refactoring ToastMaster to not be route-dependent
  3. Migrating toasts to the design system monorepo (planned work)

Next Steps

  • Ticket MDP-463 should be moved to cancelled status
  • This work should be re-evaluated once the toast migration to the design system monorepo is complete
  • At that time, we can replace all copy feedback instances with an improved, globally-available toast component

Related Links

Thank you to Cursor Bugbot for identifying this architectural issue before it reached production! 🤖

@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-M team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants