Repository navigation
Fix indexer-unreachable popup destroying in-flight payment flows - #983
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
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.
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
Tests
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.