Swap stepper, dismissable overlays, EmptyState consolidation, live wallet mismatch detection - #380
Merged
james2177 merged 2 commits intoSep 1, 2026
Conversation
…dation, live wallet mismatch detection Closes stellar-vortex-protocol#235 Closes stellar-vortex-protocol#234 Closes stellar-vortex-protocol#233 Closes stellar-vortex-protocol#232 - Add SubmissionStepper, a shared visual stepper for the connecting/building/ awaiting-signature/submitting state machine, wired into SwapCard and the solver registration tab. The awaiting-signature step calls out "check your wallet", and errors show which step failed. - Add useDismissableOverlay, a shared hook for Escape-to-close, outside-click, and focus-trap behavior; applied to the mobile nav menu and settings dropdown, and used to replace SwapCard's chain-picker overlay logic (which had become duplicated and non-functional after a prior merge) with a single implementation that also gets outside-click support. - Extend EmptyState with a variant prop (role="alert" vs role="status") and consolidate the hand-rolled loading/error/empty markup in ExplorePageClient, my-intents, and solve/[address] onto it. - Add live Freighter account/network mismatch detection: useWalletStore gains checkForChanges(), polled on an interval and on focus/visibility from ConnectWalletButton while connected, without ever calling requestAccess() unprompted. The mismatch banner now offers a one-click reconnect, and canSwap/canRegister block submission while a mismatch is unresolved. While implementing these, found Nav.tsx, SwapCard.tsx, ConnectWalletButton.tsx and solve/[address]/page.tsx in a non-compiling state (undeclared locale/ overlay refs, a duplicated chain-picker effect, missing slippage/stale-quote/ dst-address state, and missing CopyButton/SkeletonCard/isValidStellarPublicKey imports) left over from an incomplete prior merge. Restored them to a working baseline with minimal, non-crashing state so these components render. Pre-existing issues found outside this scope, left unfixed: explore/page.tsx and solve/page.tsx contain duplicated/conflicting content with a leftover merge-conflict artifact, and solve/[address]/page.test.tsx has a syntax error - all 3 unrelated to the assigned issues, but they currently fail project-wide `tsc --noEmit` (and so the pre-commit hook) regardless of what this change touches; --no-verify used for this commit only, by request.
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.
Summary
SubmissionStepper, a shared visual stepper for the connecting → building → awaiting-signature → submitting state machine, wired intoSwapCardand the solver registration tab.awaiting-signaturecalls out "check your wallet"; errors show which step failed.useDismissableOverlay, a shared Escape/outside-click/focus-trap hook, applied to the mobile nav menu and settings dropdown, and used to replaceSwapCard's chain-picker overlay logic (which had become duplicated/broken by a prior merge) with a single implementation that also gains outside-click support.EmptyStatewith avariantprop (role="alert"vsrole="status") and consolidates the hand-rolled loading/error/empty markup inExplorePageClient,my-intents, andsolve/[address]onto it.useWalletStoregainscheckForChanges(), polled on an interval and on focus/visibility fromConnectWalletButtonwhile connected (never callsrequestAccess()unprompted). The mismatch banner now offers a one-click reconnect, andcanSwap/canRegisterblock submission while a mismatch is unresolved.While implementing these,
Nav.tsx,SwapCard.tsx,ConnectWalletButton.tsx, andsolve/[address]/page.tsxwere found in a non-compiling state (undeclared locale/overlay refs, a duplicated chain-picker effect, missing slippage/stale-quote/dst-address state, missingCopyButton/SkeletonCard/isValidStellarPublicKeyimports) — leftovers from an incomplete prior merge. These were restored to a minimal, non-crashing working baseline so the touched components actually render; no new UI was added beyond what each issue asked for.Pre-existing, out-of-scope issues found and left unfixed (flagging for visibility):
src/app/explore/page.tsxandsrc/app/solve/page.tsxcontain duplicated/conflicting content with a leftover merge-conflict artifact, andsrc/app/solve/[address]/page.test.tsxhas a syntax error. All three are unrelated to these issues but currently fail project-widetsc --noEmit, which also fails the repo's pre-commit hook regardless of what a change touches —--no-verifywas used for this commit only, per explicit approval.Closes #235
Closes #234
Closes #233
Closes #232
Validation performed
eslintclean on every file touched in this PR.vitestrun against the touched test suites: SwapCard, Nav, SettingsPanel, ConnectWalletButton, EmptyState, useSwapSubmission, useSolverRegistration, wallet — most pass; remaining failures are pre-existing (a wallet hydrate test, and a SwapCard test expecting a slippage-input UI that has no corresponding markup in this codebase) or depend on the pre-existingexplore/page.tsx/solve/page.tsxbreakage described above.tsc --noEmitfails project-wide due to the pre-existing unrelated syntax errors noted above; no new errors were introduced by this change in any file it touches (verified per-file via eslint's type-aware rules and by rendering each touched component under vitest).