Skip to content

fix: use modal for transaction progress in Chrome extension#87

Merged
WiktorStarczewski merged 5 commits intomainfrom
wiktor-chrome-fixxes
Jan 23, 2026
Merged

fix: use modal for transaction progress in Chrome extension#87
WiktorStarczewski merged 5 commits intomainfrom
wiktor-chrome-fixxes

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Replace tab-opening pattern with in-popup modal for transaction progress, unifying UX across all platforms (mobile, desktop, extension).

  • Remove isExtension() early return in TransactionProgressModal
  • Simplify openLoadingFullPage/closeLoadingFullPage to use modal for all platforms
  • Update openConsumingFullPage/closeConsumingFullPage similarly
  • Pre-create modal container for all platforms in provider.tsx
  • Add smaller font/icon sizes for extension modal
  • Re-enable animate-spin for transaction progress spinner

Copy link
Copy Markdown
Collaborator

@0xnullifier 0xnullifier left a comment

Choose a reason for hiding this comment

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

How are transaction which throw error are handled ? I don't see any explicit modal opening in that case or UI flow of any kind

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator Author

WiktorStarczewski commented Jan 22, 2026

How are transaction which throw error are handled ? I don't see any explicit modal opening in that case or UI flow of any kind

Error Handling is in TransactionProgressModal.tsx:

  1. Error detection (lines 51-60):
const success = await dbTransactionsLoop(signTransaction);
if (success === false) {
  setError(true);  // ← Error state is tracked
}
  1. Error passed to UI (line 139):
<GeneratingTransaction ... hasErrors={error} />
  1. Auto-close prevented on error (line 84):
if (isOpen && hasLoadedOnce && transactions.length === 0 && !error) {
  1. Overlay dismissable on error (line 124):
shouldCloseOnOverlayClick={transactionComplete || error}

Error UI in GeneratingTransaction.tsx:

When hasErrors=true and transactionComplete=true:

  • Shows Failed icon (line 215):
  • Shows "Transaction Failed" header (line 237): t('transactionFailed')
  • Shows error description (lines 246-251): t('transactionErrorDescription')
  • Shows Done button to close (lines 301-306)

@0xnullifier
Copy link
Copy Markdown
Collaborator

Yeah but if I closed the modal and then it throws error what happens then

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator Author

Yeah but if I closed the modal and then it throws error what happens then

Ah nice, yeah thats a good point. Let me fix this.

Replace tab-opening pattern with in-popup modal for transaction progress,
unifying UX across all platforms (mobile, desktop, extension).

- Remove isExtension() early return in TransactionProgressModal
- Simplify openLoadingFullPage/closeLoadingFullPage to use modal for all platforms
- Update openConsumingFullPage/closeConsumingFullPage similarly
- Pre-create modal container for all platforms in provider.tsx
- Add smaller font/icon sizes for extension modal
- Re-enable animate-spin for transaction progress spinner
When the user clicked "Hide" on the transaction modal, navigating back
to the home page would reopen the modal because Explore.tsx auto-opens
when queued transactions exist. Added isTransactionModalDismissedByUser
flag to track user dismissal and skip auto-open until transactions
complete or a new transaction is initiated.
Replace openLoadingFullPage/closeLoadingFullPage/openConsumingFullPage/
closeConsumingFullPage with direct useWalletStore.getState() calls.
The wrapper functions were misleading (said "FullPage" but opened modals)
and added unnecessary indirection.

Also add mobile-e2e/ to Jest's testPathIgnorePatterns.
When user clicks Hide, transactions now continue processing in the
background. If a transaction fails while the modal is hidden, it
automatically re-opens to show the error to the user.
@WiktorStarczewski WiktorStarczewski merged commit 0224e6b into main Jan 23, 2026
9 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor-chrome-fixxes branch January 23, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants