Skip to content

Swap stepper, dismissable overlays, EmptyState consolidation, live wallet mismatch detection - #380

Merged
james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
Markodiba:feature/232-235-a11y-wallet-ux-improvements
Sep 1, 2026
Merged

Swap stepper, dismissable overlays, EmptyState consolidation, live wallet mismatch detection#380
james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
Markodiba:feature/232-235-a11y-wallet-ux-improvements

Conversation

@Markodiba

Copy link
Copy Markdown
Contributor

Summary

  • Adds SubmissionStepper, a shared visual stepper for the connecting → building → awaiting-signature → submitting state machine, wired into SwapCard and the solver registration tab. awaiting-signature calls out "check your wallet"; errors show which step failed.
  • Adds useDismissableOverlay, a shared Escape/outside-click/focus-trap hook, applied to the mobile nav menu and settings dropdown, and used to replace SwapCard's chain-picker overlay logic (which had become duplicated/broken by a prior merge) with a single implementation that also gains outside-click support.
  • Extends EmptyState with a variant prop (role="alert" vs role="status") and consolidates the hand-rolled loading/error/empty markup in ExplorePageClient, my-intents, and solve/[address] onto it.
  • Adds live Freighter account/network mismatch detection: useWalletStore gains checkForChanges(), polled on an interval and on focus/visibility from ConnectWalletButton while connected (never calls requestAccess() unprompted). The mismatch banner now offers a one-click reconnect, and canSwap/canRegister block submission while a mismatch is unresolved.

While implementing these, Nav.tsx, SwapCard.tsx, ConnectWalletButton.tsx, and solve/[address]/page.tsx were found in a non-compiling state (undeclared locale/overlay refs, a duplicated chain-picker effect, missing slippage/stale-quote/dst-address state, missing CopyButton/SkeletonCard/isValidStellarPublicKey imports) — 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.tsx and src/app/solve/page.tsx contain duplicated/conflicting content with a leftover merge-conflict artifact, and src/app/solve/[address]/page.test.tsx has a syntax error. All three are unrelated to these issues but currently fail project-wide tsc --noEmit, which also fails the repo's pre-commit hook regardless of what a change touches — --no-verify was used for this commit only, per explicit approval.

Closes #235
Closes #234
Closes #233
Closes #232

Validation performed

  • eslint clean on every file touched in this PR.
  • vitest run 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-existing explore/page.tsx/solve/page.tsx breakage described above.
  • tsc --noEmit fails 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).

odibaegba and others added 2 commits August 31, 2026 18:14
…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.
@james2177
james2177 merged commit 452a190 into stellar-vortex-protocol:main Sep 1, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment