feat(wallet): refine home activity and swap rate note#638
Conversation
Move Recent activity above the home upsell section, remove the LendaSat homepage entry, and add an accessible animated rate note to the swap review drawer. Remove temporary dev swap asset scaffolding so the wallet only uses real portfolio rows.
Deploying wallet-mutinynet with
|
| Latest commit: |
e6201cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2bc776a1.arkade-wallet.pages.dev |
| Branch Preview URL: | https://wt-home-activity-swap-rate-n.arkade-wallet.pages.dev |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Deploying tmp-boltz-upstream-mainnet-arkade-wallet with
|
| Latest commit: |
e6201cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e726de4d.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
| Branch Preview URL: | https://wt-home-activity-swap-rate-n.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
Deploying wallet-bitcoin with
|
| Latest commit: |
e6201cf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://95c20824.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://wt-home-activity-swap-rate-n.wallet-bitcoin.pages.dev |
There was a problem hiding this comment.
✅ Approved — clean UI PR, no protocol-critical concerns
What I reviewed
- Full diff (10 files, +199 / -96)
- Cross-repo impact:
devSwapTestAssetshad zero consumers outside this repo.usePortfolioFiat/PortfolioRowexports unchanged except for removing the dev-onlycontainsDevSwapTestAssetshelper. - LendaSat route (
Pages.AppLendasat) still exists innavigation.tsxand is accessible fromApps/Index.tsx— removing the homepage upsell card is non-breaking. - CI: Cloudflare Pages build passing.
File-by-file
src/lib/devSwapTestAssets.ts (deleted) — Clean removal. All consumers (usePortfolioFiat.ts, Swap/Index.tsx) updated in the same PR. VITE_DEV_SWAP_TEST_ASSETS removed from vite-env.d.ts. No orphaned references.
src/hooks/usePortfolioFiat.ts — Removed dev asset injection block and containsDevSwapTestAssets export. The remaining normalizeMinorUnits and portfolio logic untouched. Good.
src/screens/Wallet/Index.tsx — Section reorder (RecentActivitySection before UpsellsSection). Purely presentational. ✓
src/screens/Wallet/UpsellsSection.tsx — Removed LendaSat card + handleLoans + LandmarkIcon import. Section label kept as "Do more with your money". Clean.
src/screens/Wallet/Swap/Index.tsx — Two changes:
swapAssets = assets(line ~86): Previously filtered to dev-only assets when test flag was on. Now just uses the realassetsarray directly. Sinceassetsis already memoized viauseMemo, no unnecessary re-renders introduced. ✓RateLabelcomponent (lines ~917–989): Good accessibility —aria-labelon the button,aria-describedbypointing to tooltip viauseId(),role="tooltip". Timer cleanup viauseEffect(() => clearDismissTimer, [clearDismissTimer])correctly prevents stale timeouts on unmount.pointer-events: noneon tooltip is fine for a short read-only note.
src/index.css — Tooltip styles are scoped to .swap-rate-* classes. touch-action: manipulation and -webkit-tap-highlight-color: transparent are good mobile UX choices. color-mix(in srgb, ...) has solid browser support (baseline 2023).
Tests — Two new swap tests cover tooltip visibility and auto-dismiss. Auto-dismiss test uses { timeout: 3500 } for a 2400ms timer — adequate margin. Wallet index test updated to assert section ordering and LendaSat removal. VITE_DEV_MNEMONIC env stub added to App.test.tsx.
Nits (non-blocking)
Swap/Index.tsx:86—const swapAssets = assetscould just be inlined at usage sites (swapAssetsis now a pure alias), but readability is fine as-is.Swap/Index.tsx:61—rateNoteAutoDismissMs = 2400: consider whether this should be configurable or at least documented as a UX constant somewhere centralized if other tooltips adopt the same pattern later.
Protocol-critical: No. This PR touches only UI layout, a tooltip, and dev scaffolding removal. No VTXO, signing, forfeit, round, or exit path code.
🤖 arkana review — opus
Summary
Testing
Affected areas