Skip to content

feat(wallet): show a grabbed deposit landing in the wallet - #697

Open
bmc08gt wants to merge 1 commit into
mainfrom
feat/wallet-deposit-arrival
Open

feat(wallet): show a grabbed deposit landing in the wallet#697
bmc08gt wants to merge 1 commit into
mainfrom
feat/wallet-deposit-arrival

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Grabbing a cash bill and tapping Put in Wallet dismissed the bill and left the user on the Scan tab. Nothing showed that the money had arrived: the grab refreshes Session.balances while the bill is still on screen, so the balance had already risen out of sight.

The button now routes to the wallet, and a new WalletDeposit carries the pre-deposit total and card set across the dismissal. On arrival the wallet rewinds to those figures in one un-animated frame — still under the outgoing bill — waits for the bill and its sheet to clear, then sets the real ones. The balance header rolls its digits on its existing .numericText() transition, and a token the wallet had no card for rises into the deck.

Two things that are not obvious from the diff:

  • The baseline is held on the session, not in the view. The pre-iOS 26 tab path builds the wallet when its tab is selected, which is the moment "Put in Wallet" asks for, so the view can be constructed after the deposit has already landed. WalletScreenContent.init seeds from the pending landing.
  • While a deposit is pending, refresh() is held off the balance figures — refreshing mid-flight would put the total straight to the value the animation is on its way to. It runs once more after the animation completes, to pick up anything that shifted meanwhile.

The arriving card keeps its slot in cards for the whole animation and only its own offset and opacity move, so the deck does not jump a frame as indices shift.

New tests cover WalletDeposit's arm/release/discard/consume transitions and the Session.walletCardBalances filter, plus AppRouter.showWallet() routing: selects the balance tab at root, clears sheets, closes an expanded card, and does not refire while a request is in flight.

"Put in Wallet" dismissed the bill and left the user on the Scan tab,
with nothing to show that the money had arrived. The grab refreshes
`Session.balances` while the bill is still on screen, so by then the
balance had already risen out of sight.

The button now routes to the wallet, and `WalletDeposit` carries the
pre-deposit total and card set across. On arrival the wallet rewinds to
those figures in one un-animated frame, still under the outgoing bill,
waits for the bill and its sheet to clear, then sets the real ones: the
balance header rolls its digits, and a token the wallet had no card for
rises into the deck.

The baseline is held on the session rather than in the view because the
wallet may not exist yet — the pre-iOS 26 tab path builds it when the
tab is selected, which is the moment "Put in Wallet" asks for. While a
deposit is pending, `refresh()` is held off the figures the animation is
moving; it runs once more after, to pick up anything that shifted.
@bmc08gt bmc08gt self-assigned this Aug 28, 2026
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.

1 participant