Skip to content

fix(transaction): non-blocking boarding settlement UX#556

Open
sahilc0 wants to merge 2 commits into
masterfrom
wt-nonblocking-boarding-20260422
Open

fix(transaction): non-blocking boarding settlement UX#556
sahilc0 wants to merge 2 commits into
masterfrom
wt-nonblocking-boarding-20260422

Conversation

@sahilc0
Copy link
Copy Markdown
Contributor

@sahilc0 sahilc0 commented Apr 22, 2026

Summary

When users press "Complete boarding" on a pending boarding transaction, the app currently shows a full-screen WaitingForRound animation that blocks all interaction for 1+ minute. This PR replaces that blocking UI with an inline settling banner, allowing users to navigate freely while settlement processes in background.

Changes:

  • Remove WaitingForRound full-screen blocking overlay
  • Add inline purple "Settling" banner using Info component with LoadingIcon
  • Fix LoadingIcon small size from 32px to 20px to match other inline icons
  • Add UI state guards to prevent conflicting banners (e.g., showing both "Success" and "Pending boarding")
  • Remove stale setTxInfo callback that could corrupt navigation if user views another tx during settlement

Test plan

  • Open a pending boarding transaction (requires 1 on-chain confirmation)
  • Press "Complete boarding" button
  • Verify inline "Settling" banner appears (purple, with spinner)
  • Verify you can navigate back while settlement continues
  • Wait for settlement to complete - should show "Success" banner
  • Verify no conflicting status banners appear

Files changed

  • src/icons/Loading.tsx - Fix small icon size
  • src/screens/Wallet/Transaction.tsx - Replace blocking UX with inline banner

Summary by CodeRabbit

  • Bug Fixes

    • Fixed Loading icon small variant size.
  • Improvements

    • Transaction screen shows a new "Settling" banner while settling; status now reads "Settled" on completion.
    • Status banners and resend button are hidden during settlement and after success for clarity.
    • Replaced multi-step waiting screens with concise loading banners (e.g., "Renewing", "Paying to mainnet") across settings and send flows.

@sahilc0 sahilc0 requested review from bordalix and pietro909 April 22, 2026 19:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@sahilc0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 14 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 873d0dcc-2f61-4f40-9d3f-f0e30dc558dd

📥 Commits

Reviewing files that changed from the base of the PR and between 946928f and ef431f3.

📒 Files selected for processing (5)
  • src/components/WaitingForRound.tsx
  • src/icons/Loading.tsx
  • src/screens/Settings/Vtxos.tsx
  • src/screens/Wallet/Send/Details.tsx
  • src/screens/Wallet/Transaction.tsx

Walkthrough

Adjusted LoadingIcon small sizing and removed the WaitingForRound component, replacing its usages with LoadingLogo/Info banners across wallet and settings screens; transaction settling flow was simplified (new "Settling" banner, gated status UI, and updated status computation).

Changes

Cohort / File(s) Summary
Icon sizing
src/icons/Loading.tsx
Changed small variant SVG dimensions from 32 to 20.
Removed waiting component
src/components/WaitingForRound.tsx
Deleted WaitingForRound component and its props/interface and all associated polling/log message logic.
Wallet transaction UI
src/screens/Wallet/Transaction.tsx
Eliminated WaitingForRound branch; always render Body; added `hideStatusBanners = settling
Send details loading
src/screens/Wallet/Send/Details.tsx
Replaced WaitingForRound with LoadingLogo showing "Paying to mainnet" for on‑chain sending; preserved done/exit behavior.
Vtxos / rollover UI
src/screens/Settings/Vtxos.tsx
Stopped using WaitingForRound; render an Info banner with LoadingIcon and "Renewing" text while rollingover; kept main content rendering under Padded.

Sequence Diagram(s)

(omitted — changes are UI component replacements and do not introduce multi-actor sequential flows requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • bordalix
  • pietro909
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(transaction): non-blocking boarding settlement UX' directly describes the main change: replacing a blocking overlay with a non-blocking inline banner for transaction settlement.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wt-nonblocking-boarding-20260422

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 42 minutes and 14 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 22, 2026

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef431f3
Status: ✅  Deploy successful!
Preview URL: https://17e15612.wallet-bitcoin.pages.dev
Branch Preview URL: https://wt-nonblocking-boarding-2026.wallet-bitcoin.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 22, 2026

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef431f3
Status: ✅  Deploy successful!
Preview URL: https://a5deb5e3.arkade-wallet.pages.dev
Branch Preview URL: https://wt-nonblocking-boarding-2026.arkade-wallet.pages.dev

View logs

Copy link
Copy Markdown

@arkanaai arkanaai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arkana Code Review — wallet#556

Verdict: Approve

This is a well-scoped UX improvement. The changes are UI-only — no protocol logic, no VTXO handling, no signing paths touched. The settlement itself still goes through the same settlePreconfirmed()settleVtxos() path in the wallet provider. Safe to merge.


What this PR does right

  1. Removes the setTxInfo optimistic update (Transaction.tsx:96→removed) — this was the most important fix. The old code did setTxInfo({ ...tx, preconfirmed: false, settled: true }) after an async settlePreconfirmed() + sleep(2000). If the user navigated to a different transaction during that ~3+ second window, this would corrupt the displayed transaction by overwriting txInfo in FlowContext with stale data. Good catch.

  2. hideStatusBanners guard (Transaction.tsx:55) — prevents "Settling" and "Pending boarding" / "Expired" banners from rendering simultaneously. Clean approach.

  3. Adds defaultButtonLabel to useEffect deps (Transaction.tsx:57) — fixes a React lint warning / stale closure. The old code only depended on [settling], so if defaultButtonLabel changed (theoretically possible if boardingTx state changed), the button text would be stale.

  4. Status priority reorder (Transaction.tsx:112-124) — putting settleSuccess || tx.settled first ensures the "Settled" status shows immediately after settlement completes, rather than still showing "Pending boarding" because tx.preconfirmed hasn't been cleared yet (since we no longer optimistically update txInfo). This is the correct priority order.

Minor observations (non-blocking)

  1. LoadingIcon small size change (Loading.tsx:2, 32→20) — this is a global change to all <LoadingIcon small /> consumers. I checked: there are currently zero other call sites using small prop — the only existing consumer is Loading.tsx itself, and this PR introduces the first usage. So this is safe. But worth noting: if anyone adds <LoadingIcon small /> elsewhere in the future, they'll get 20px, not 32px.

  2. WaitingForRound import left in master (Transaction.tsx:16) — the PR removes the import, which is correct. The component is still imported in Vtxos.tsx for the rollover flow, so the component file itself shouldn't be deleted. No dead code issue.

  3. No error reset on success — after setSettleSuccess(true), if there was a previous error from a failed attempt, both the error banner and the success banner could render simultaneously. The setError('') at the top of handleSettle handles this for retries, but if somehow the flow gets into settleSuccess=true AND error!='' (shouldn't happen with current code), both would show. Non-issue in practice.

  4. No testsTransaction.tsx has no test file. This is pre-existing tech debt, not introduced by this PR.

Protocol safety

  • settlePreconfirmed() is unchanged — still calls settleVtxos() in the wallet provider
  • No changes to signing, VTXO selection, forfeit paths, or round lifecycle
  • The removal of setTxInfo is strictly safer (removes a race condition)
  • This is purely UI/UX — no protocol-critical review needed

LGTM. Ship it.

🤖 Reviewed by Arkana

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 22, 2026

Deploying tmp-boltz-upstream-mainnet-arkade-wallet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef431f3
Status: ✅  Deploy successful!
Preview URL: https://25d65892.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev
Branch Preview URL: https://wt-nonblocking-boarding-2026.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev

View logs

@sahilc0 sahilc0 requested a review from tiero April 22, 2026 19:44
@bordalix
Copy link
Copy Markdown
Collaborator

@sahilc0 we should do the same on the other usage of WaitingForRound (i.e. Settings > Coin Control) and remove the WaitingForRound component after that.

Copy link
Copy Markdown
Collaborator

@bordalix bordalix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the same on the other usage of WaitingForRound and remove component.

sahilc0 added a commit that referenced this pull request Apr 30, 2026
Extends the non-blocking settlement UX to remaining usages:

- Vtxos.tsx (Coin Control): Replace blocking WaitingForRound with
  inline "Renewing" Info banner during rollover
- Send/Details.tsx: Replace WaitingForRound with LoadingLogo for
  mainnet payments (matches Lightning/Ark payment patterns)
- Delete WaitingForRound component now that all usages are removed

Addresses bordalix's review comment on PR #556.
@sahilc0
Copy link
Copy Markdown
Contributor Author

sahilc0 commented Apr 30, 2026

@bordalix Done! Extended the non-blocking UX to Coin Control (Vtxos.tsx) and cleaned up Send/Details.tsx. The WaitingForRound component is now deleted entirely.

Changes in this commit:

  • Vtxos.tsx: Replaced blocking WaitingForRound rollover with inline purple "Renewing" Info banner
  • Send/Details.tsx: Replaced WaitingForRound with LoadingLogo for mainnet payments (consistent with Lightning/Ark payment patterns)
  • Deleted src/components/WaitingForRound.tsx

Let me know if this looks good!

@bordalix
Copy link
Copy Markdown
Collaborator

@sahilc0 please rebase. This PR is still using ionic.

sahilc0 added 2 commits May 4, 2026 11:24
…ng banner

The full-screen WaitingForRound animation blocks all interaction for 1+ minute
when completing boarding. This replaces it with an inline purple Info banner
that shows "Processing your boarding transaction..." while settlement runs,
allowing users to navigate freely.

Changes:
- Remove WaitingForRound blocking overlay during settlement
- Add inline settling banner using Info component with LoadingIcon
- Fix LoadingIcon small size (32px -> 20px) to match other inline icons
- Add guards to prevent conflicting UI states (settled + pending banners)
- Remove stale setTxInfo callback that could corrupt navigation state
Extends the non-blocking settlement UX to remaining usages:

- Vtxos.tsx (Coin Control): Replace blocking WaitingForRound with
  inline "Renewing" Info banner during rollover
- Send/Details.tsx: Replace WaitingForRound with LoadingLogo for
  mainnet payments (matches Lightning/Ark payment patterns)
- Delete WaitingForRound component now that all usages are removed

Addresses bordalix's review comment on PR #556.
@sahilc0 sahilc0 force-pushed the wt-nonblocking-boarding-20260422 branch from 946928f to ef431f3 Compare May 4, 2026 16:31
@sahilc0
Copy link
Copy Markdown
Contributor Author

sahilc0 commented May 4, 2026

@bordalix Rebased this onto current master and pushed the updated branch. The WaitingForRound usage in Coin Control is removed, the component is deleted, and local lint/unit/build are passing. Cloudflare + normal CI are green; the Playwright regtest job was still running last I checked. Ready for another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants