Repository navigation
feat(layout): show pending transaction count spinner badge on wallet button (#791) - #852
Open
Emmycivity wants to merge 5 commits into
Open
Emmycivity wants to merge 5 commits into
Emmycivity wants to merge 5 commits into
Conversation
The Navbar has no indicator for submitted-but-unconfirmed transactions, so these tests describe the expected behaviour first: the store counter is released on success, rejection and concurrent submissions and never drops below zero, and the Navbar shows a count (capped at 9+) over the wallet button only while something is pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Users who navigate away from the page that submitted a transaction lose any sign that the ledger submit is still in flight. invokeContract is the single submit point for all contract calls, so wrapping its send and confirmation poll in trackPendingSubmission gives one global count. The release happens in a finally block so confirmed, reverted, aborted and timed-out submissions all clear the count. Closes conduit-protocol#791 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The count needs to be visible from every page, and the Navbar is the only persistent element, so the wallet button is wrapped in a relative container and the badge renders over it whenever the count is above zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare number is easy to miss and is not announced to assistive tech. The badge gets an animated ring (motion-safe, so it stays still for users who prefer reduced motion), black/white/gray colours per the design rules, and an always-mounted polite live region so count changes are announced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…badge Records the new indicator under [Unreleased] as the contributing guide requires and confirms the change is typecheck and lint clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Shows an animated ring with the number of pending (submitted but not yet confirmed) transactions over the wallet button in the Navbar. A pending ledger submit stays visible after you navigate away.
Changes
lib/store.tspendingSubmissionscounter, plus atrackPendingSubmission()wrapper that always releases the count, even when a submission failslib/soroban.tsinvokeContract, which every contract call goes through, wraps the send and the confirmation poll with that trackercomponents/Navbar.tsxConnectButtonwith a spinning ring that stops for users who prefer reduced motion. It uses black/white/gray only and caps at "9+". Screen readers announce "2 transactions pending"components/__tests__/Navbar.test.tsxlib/store.test.tsCHANGELOG.md[Unreleased]Notes for reviewers
lib/soroban.ts, so it needs the extra maintainer approval. The send and submit logic itself is unchanged.mainis already red: lint errors in 3 other files, 28 failing test files, and the dependency audit. This PR adds no new failures, and all of its new tests pass.Closes #791