Skip to content

Fix indexer-unreachable popup destroying in-flight payment flows - #983

Merged
dangershony merged 1 commit into
mainfrom
fix/indexer-popup-modal-clobber
Oct 15, 2026
Merged

dangershony merged 1 commit into
mainfrom
fix/indexer-popup-modal-clobber

Conversation

@dangershony

Copy link
Copy Markdown
Member

Problem

UAT tests (MultiFundClaimAndRecoverTest, MultiInvestClaimAndRecoverTest) were failing intermittently at invest steps with \WalletButton not found within timeout\ — on main as well as on feature branches — whenever the signet indexer returned transient 5xx errors.

Root cause: two interacting bugs around the shell's single-slot modal host (\ShellViewModel.ShowModal\ just overwrites \ModalContent) and the Indexer unreachable popup (issue #971):

  1. Popup clobbers open modals. \OnIndexerUnreachable\ called \ShowModal\ unconditionally from a background event. If an invest/deploy PaymentFlow modal was open, it was ripped out of the visual tree — unrecoverable, since nothing restores it.

  2. Popup blocks the payment flow from mounting. \InvestPageView.ShowShellModal\ bailed when \IsModalOpen\ was true. If the popup held the slot when the user submitted an investment, the PaymentFlow VM was created but its view never mounted — the invest flow dead-ended. This is the exact sequence captured in the failing-run logs: popup shown → invest submitted ('advancing to WalletSelector') → no WalletButton ever appears.

Fix

  • \ShellViewModel.OnIndexerUnreachable: skip the popup while any modal is open (latch reset so the NetworkService cooldown re-raise can show it later, once the slot is free).
  • \InvestPageView.ShowShellModal: an explicit payment action wins over the informational popup — close it through its own Close path (resets the reopen latch) and mount the payment flow.

Tests

  • New headless regression tests \IndexerUnreachablePopupTests\ (3 tests): popup never clobbers an open modal; still shows when the slot is free; a skipped popup does not latch shut.
  • \PlatformBackRegressionTests\ (8) still pass.
  • End-to-end on signet: MultiFundClaimAndRecoverTest passed (6m35s) and MultiInvestClaimAndRecoverTest passed (8m21s) — both failed consistently before this fix.

Note: the underlying signet indexer 5xx flakiness on test.indexer.angor.io is real and worth tracking separately; this PR makes the app degrade gracefully instead of killing in-flight payment flows.

Two interacting bugs around the shell's single-slot modal host and the
'Indexer unreachable' popup (issue #971):

1. ShellViewModel.OnIndexerUnreachable called ShowModal unconditionally,
   silently destroying any open modal (e.g. an in-flight invest/deploy
   PaymentFlow) - unrecoverable. Now the popup is skipped while another
   modal is open; NetworkService's cooldown re-raise shows it once the
   slot is free.

2. InvestPageView.ShowShellModal bailed when IsModalOpen was true, so if
   the popup held the slot when the user submitted an investment, the
   PaymentFlow VM was created but its view never mounted - the invest
   flow dead-ended (UAT: 'WalletButton not found within timeout').
   An explicit payment action now closes the popup through its own
   Close path (resetting the reopen latch) and mounts the payment flow.

Both were triggered intermittently by signet indexer 5xx responses and
caused repeated UAT failures at invest steps, on main as well.

Adds IndexerUnreachablePopupTests (headless): popup never clobbers an
open modal, still shows when the slot is free, and a skipped popup does
not latch shut. Verified end-to-end: MultiFundClaimAndRecoverTest and
MultiInvestClaimAndRecoverTest pass on signet.
@dangershony
dangershony merged commit 3654e67 into main Oct 15, 2026
3 checks passed
@dangershony
dangershony deleted the fix/indexer-popup-modal-clobber branch October 15, 2026 11:44
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.

1 participant