feat: open to Activity tab on failed transaction#41531
Conversation
|
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. |
| ENVIRONMENT_TYPE_SIDEPANEL, | ||
| PLATFORM_FIREFOX, | ||
| MESSAGE_TYPE, | ||
| POPUP_FILE, |
| function onTransactionFailed() { | ||
| failedTxCount += 1; | ||
| const popupFile = isFirefox ? 'popup.html' : 'popup-init.html'; | ||
| function setClientOpenOptions(tab) { |
There was a problem hiding this comment.
- Extracted from call sites: onTransactionFailed and clearFailedTxBadge
| } | ||
|
|
||
| function onTransactionFailed() { | ||
| if (isClientOpenStatus()) { |
There was a problem hiding this comment.
- Don't run this unless the extension is closed
| try { | ||
| if (isManifestV3) { | ||
| browser.action.setPopup({ popup: `${popupFile}?tab=activity` }); | ||
| browser.action.setPopup({ popup }); |
There was a problem hiding this comment.
Set the next popup action
| if (isManifestV3) { | ||
| browser.action.setPopup({ popup: `${popupFile}?tab=activity` }); | ||
| browser.action.setPopup({ popup }); | ||
| browser.sidePanel?.setOptions?.({ path: sidepanelPath }); |
There was a problem hiding this comment.
Set sidepanel option on next open
|
Builds ready [c4c3bbd]
⚡ Performance Benchmarks (Total: 🟢 7 pass · 🟡 12 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|


Description
When a transaction fails while the extension is closed, a red badge now shows on the extension icon.
This PR restores ensures it opens directly to the Activity tab.
Changelog
CHANGELOG entry: feat: open to Activity tab when badge is clicked on failed transaction
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes how the extension action popup (and MV3 side panel path) are configured at runtime, which could alter what UI opens across browsers if paths/query params are wrong.
Overview
Ensures that when a transaction fails while the UI is closed, clicking the extension icon opens directly to the Activity tab by dynamically setting the action popup URL (and resetting it when the failure badge is cleared).
This refactors action URL handling into
setClientOpenOptions, adds shared constants forpopup.html/popup-init.html/sidepanel.html, and updates environment-type detection to use those constants (including setting MV3sidePaneloptions where supported).Reviewed by Cursor Bugbot for commit c4c3bbd. Bugbot is set up for automated code reviews on this repo. Configure here.