Skip to content

fix: slide between usdt receive pages - #1132

Merged
ovitrif merged 4 commits into
masterfrom
fix/usdt-receive-transitions
Oct 27, 2026
Merged

ovitrif merged 4 commits into
masterfrom
fix/usdt-receive-transitions

Conversation

@ovitrif

@ovitrif ovitrif commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1018
Twin: synonymdev/bitkit-android#1588

Description

  • Fixes USDT receive pages swapping in at once: the address, network, amount and fee pages now slide like Edit Invoice on the Bitcoin tabs, because UsdtReceiveView switched pages through local state with no animation while the Bitcoin tabs push routes on the sheet's NavigationStack.
  • Moving to a later page slides it in from the right; going back (Back, Continue from the fee page to the QR, picking a network that returns to the QR) slides the outgoing page out to the right, as Android does.
  • Renders a change of direction before the page changes, so a page leaving right after a forward move slides out to the right instead of the side the incoming page comes from.
  • Moves the page padding inside each opaque page and slides the header and QR with it, so the slide spans the full sheet width.
  • Ports the Edit slide step that fix: slide between usdt receive pages bitkit-android#1588 adds to usdt-receive-amount-and-units.xml.

Out of Scope

Design

Figma: USDT receive. Motion follows the existing receive sheet transitions; the frames do not specify it.

Preview

Savings Edit for reference, then USDT Edit and Back, Network and Back; after also Network, Ethereum (to Amount), Back and Back (regtest, iOS 26.5 simulator, 2x):

Before After
usdt-receive-before.mp4
usdt-receive-after.mp4

QA Notes

Journeys

  • J1: updated usdt-receive-amount-and-units.xml — USDT Edit slides the Amount screen in from the right and Back slides it out to the right over the QR

Manual Tests

N/A

Automated Checks

  • ran unit tests (unit-tests.yml selection) — passed except SendConfirmationLifecycleTests.testCustomFeeWalletSwitchSurvivesFeeScreenNavigation, which fails the same way on master on this Xcode 27 / iOS 26.5 simulator and passes in CI; in CI at 14ca4e2 its sibling testPendingWalletSwitchResumesAfterTags failed once and passed on rerun
  • ran SwiftFormat lint on UsdtReceiveView.swift — passed

Verified at ed1ce78 on an iOS 26.5 simulator (regtest, USDT enabled with placeholder RPC and bundler URLs, so the fee page was not reached): every page change in the Preview slides in the expected direction, checked frame by frame, including Back right after a forward move.

Rechecked at 14ca4e2, after merging master: Edit, Back, Network and Back slide the same way, the QR slides in with its page, and a swipe across the USDT page still switches tabs. At 51e6253, Edit, 7, Back keeps $7 on the Amount page through the slide.

Models used

  • Planning/scoping: claude-opus-5-5 (reasoning: medium)
  • Implementation: claude-opus-5-5 (reasoning: medium)
  • Review: claude-sonnet-5-5 (reasoning: high)

@ovitrif ovitrif self-assigned this Oct 26, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T17:37:50.540011Z ed1ce78 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ovitrif
ovitrif requested review from a team, ben-kaufman and pwltr and removed request for a team October 26, 2026 17:37

@talosmachina talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No findings. Moves the USDT receive pages (address, network, amount, fees) onto one .id(page) view with push and pop slide transitions, and routes every page change through show(_:), which renders a direction flip before the page change so the outgoing page leaves on the correct side. Reviewed ed1ce78, full tier, reasoned from the code: iOS does not build on this reviewer's Linux host, so CI's Run Tests and build-local are the build gate, and both were still pending when this was posted.

What I checked, and 5 candidates I ruled out

Read in full: UsdtReceiveView.swift, the caller in Receive/ReceiveQr.swift, UsdtNetworkPicker.swift, UsdtReceiveAmountView.swift

Direction table, traced through show(_:) with Page: Comparable (synthesized from declaration order, fine on the iOS 17 target): Edit and Network from the QR push; network row to Amount (networks < amount) pushes; Amount to Fees pushes; Back from Fees/Amount/Networks pops; Continue on Fees, Continue on Amount with no network, and a network row returning to the QR all pop. goBack() keeps the old branch logic as is, including clearing network only while deposit == nil.

Ruled out

  • Direction flip never applies the page: onChange(of: isGoingBack) fires on every flip because show only takes that branch when isBack != isGoingBack, and it clears pageAfterDirectionChange before setting page, so no stale pending page survives.
  • show to the current page leaves the flag toggled: no call site passes the current page; each caller sits on a page different from its target.
  • State lost by the new .id(page): the old switch already tore down each page's subtree on change, so showDetails in UsdtReceiveAddressContent and draftAmount handling behave as before (draftAmount lives on the parent).
  • Outgoing page renders the new title or content: a removed view is not re-evaluated, so the leaving page keeps its own header and body for the 0.3 s slide.
  • Lifetimes of the refresh and depositNetworks tasks: moved to the outer ZStack unchanged, still attached for the whole time UsdtReceiveView is shown and not restarted per page.

CI at review time: SwiftFormat, validate and detect-changes green; Run Tests, Run Integration Tests and build-local pending.

Merge confidence: 4/5, no findings, but the change was not built here and the build and unit test jobs had not finished; the slide itself is covered only by the updated journey step, not by an automated test.

@ovitrif

ovitrif commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 14ca4e2: merged master, which conflicted in UsdtReceiveView with #1003 (full-height swipe area around the USDT address content). The swipe area now sits inside the sliding page.

After the merge the QR image no longer sat in a ScrollView, so on Back it appeared at its final position over the outgoing page while the rest slid in. geometryGroup() on the sliding page keeps it on its page. Rechecked on an iOS 26.5 simulator: Edit, Back, Network and Back slide as before, and a swipe across the USDT page still switches tabs.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code scan at 14ca4e2: one LOW inline (the outgoing Amount page shows the reset value during the Back slide), reproduced on the simulator. No HIGH or MEDIUM.

Checked and clean:

  • Back and cancel don't lose a shown address or invoice. Edit → Back on a deposit QR keeps the deposit, since iOS doesn't clear deposit on Edit. Fees Back and Continue, Network Back, picking the same network, a failed Continue and the async prepareDeposit follow the same branch logic as master.
  • The Android leads from synonymdev/bitkit-android#1588 (the Fees body vanishing, the outgoing page drawing live state) don't apply: SwiftUI doesn't re-render a view being removed, apart from the case inline.

Not performance-relevant; no strings changed.

The journeys/README.md row in bitkit-android that says the slide step "waits on bitkit-ios#1018" goes stale once this merges.

Device gate (partial): 14ca4e2 — not run yet; pending usdt-receive-amount-and-units.xml (new step 4) and a tap on the outgoing Fees Continue during the slide. Device results will follow in a separate review.

Comment thread Bitkit/Views/Wallets/UsdtReceiveView.swift Outdated
@ovitrif

ovitrif commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 51e6253: the Amount page keeps the typed amount while it slides out on Back, as @jvsena42 found in #1132 (comment). Back no longer resets the draft amount; picking a network sets it instead, and Edit already did. Rechecked on an iOS 26.5 simulator.

The bitkit-android journeys/README.md row that says the slide step waits on #1018 is flagged to the owner of synonymdev/bitkit-android#1588.

@ovitrif
ovitrif requested a review from jvsena42 October 27, 2026 09:47

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-reviewed 51e6253. It fixes my LOW on UsdtReceiveView.swift:131, and I have no new findings. draftAmount is committed only on the Amount page's Continue, and every entry to that page (Edit, the network row) resets it, so a Back-cancelled draft can't reach a later invoice.

Device gate (partial): 51e6253, not run yet. Pending: usdt-receive-amount-and-units.xml step 4 with Slow Animations on, to confirm the outgoing page keeps the typed digits during the slide.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. The device gate passed at 51e6253 on the iPhone 17 simulator, with USDT enabled.

usdt-receive-amount-and-units.xml steps 3–5: Receive opens on USDT with Network: Arbitrum One. Edit slides the Amount page in. I entered 5 and tapped Back while recording the screen at 30 fps. In every frame of the slide-out, the outgoing Amount page still shows "$ 5" (₿ 6 210) and never the reset digits, and the QR page underneath slides in to the left. After Back, the QR is the plain one with no amount, as step 5 expects.

The other steps aren't touched by 51e6253. I didn't re-run them.

@ovitrif
ovitrif merged commit 3d16b62 into master Oct 27, 2026
19 checks passed
@ovitrif
ovitrif deleted the fix/usdt-receive-transitions branch October 27, 2026 16:11
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.

bug: receive usdt edit sheet screen has no transitions

3 participants