fix(claim): report Claim All progress in place instead of taking over the screen - #840
Open
WiktorStarczewski wants to merge 3 commits into
Open
fix(claim): report Claim All progress in place instead of taking over the screen#840WiktorStarczewski wants to merge 3 commits into
WiktorStarczewski wants to merge 3 commits into
Conversation
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.
Tapping Claim All pushed a full-screen progress page and left you there. That page follows a single transaction (
useTransactionRow(txId)), while Claim All queues one consume per faucet and only the first id survives (batchTxId = batchTxId ?? groupTxId) — so it could only ever show one of them, and would assert a confident, wrong receipt while the other faucets were still queued or already failed.Claim All now reports progress on the pending list itself, which keeps a control reading "Claiming…" while the batch is in flight.
Claiming a single note is unchanged. That is one transaction, so the progress screen represents it correctly — it still opens, still shows its receipt (sender, total consumed, note ids, fee, explorer link), and its own interval still drives the queue. #834's "Claiming…" control on a row also still opens it.
Removing the navigation from the batch path removed a load-bearing side effect, which is most of this diff:
Queuedforever. Claim All now starts the background processor directly, the shapeExplore.tsx:167-171has always used to auto-consume without navigating.unclaimedNotesCount, which gated the CTA — so the user tapped Claim All and watched the button vanish with nothing in its place.isBeingClaimedis never true in any sampled render).Two ids for the CTA, on purpose
claim-all-buttonkeeps meaning "an actionable Claim All" — the E2E helper treats that id being visible as permission to click (wallet-page.ts:1881-1883), andisVisible()is true for a disabled button, so a disabled control under that id would make 23 specs click something they cannot action and wait for actionability until timeout. The in-flight state isclaim-all-status, the same split #834 made for the row's control.Verification
10,089 tests / 607 suites. tsc, eslint and the i18n gate clean. No new i18n keys —
claimingalready existed.Sabotage-verified independently: dropping the queue driver fails the batch test; reverting the summary gate fails the in-flight test; restoring the batch navigation fails the no-navigate assertion; removing the post-claim recheck fails the fast-failure test.
The pre-existing test that asserted the batch navigate is converted, not deleted — it now asserts the driver runs and no navigation happens.
Not verified on a real fee-charging chain; the claim path's timing here is asserted through mocks.
Reviewers: the queue driver is load-bearing — if
startBackgroundTransactionProcessing(signTransaction, false, zustandProvider)is wrong off-extension, Claim All silently never processes. It is copied from Explore's auto-consume, which claims on Home today with no navigation.