Skip to content

fix(chat): fade in a cash card's counterpart and token icon when they arrive late - #1228

Merged
bmc08gt merged 1 commit into
mainfrom
fix/chat-send-back-late-growth
Nov 4, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/chat-send-back-late-growth

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

A cash card's counterpart line ("from Noah Parker") and token icon popped in at full opacity when they arrived after the card was drawn. The transcript's reflow spring already grew the card to fit them; only the lines themselves didn't animate. They now fade in over ChatMotion.reflow's duration (0.35 s), matching the Send Back row and Sent Back footer since #1227.

code-payments/flipcash-client-orchestrator#117 asks for every late height change on a drawn cash card to animate with the reflow:

Late change Before this PR
Send Back row arrives Animates (#1227)
Sent Back footer arrives Animates (#1227)
Send Back row → Sent Back after a return Animates (#1227)
Counterpart line or token icon arrives Card grew with the reflow; the line popped in. Fixed here.

State known at first draw still renders at full height with no animation, and so do a redraw with nothing new and a recycled cell. ChatCashCardCell now keeps one record of what it last drew (Drawn: message id, Send Back state, counterpart, icon URL) in place of the Send Back-only one.

The fade is a CABasicAnimation on opacity, not a CATransition: Core Animation files a transition under its own transition key whatever key it is given, so the cell couldn't tell its fade apart.

Card width doesn't change: sendBackRow_keepsCardWidth lays the card out at max widths 189.44 and 250 with no row, Available, Sending and Sent Back, and the width is identical in every state.

Tests in ChatCashCardCellTests: a counterpart arriving late (from none, or from a placeholder name) fades in and grows the card; a token icon arriving late fades in; first draw, an unchanged redraw and a recycled cell don't animate. The two late-arrival tests fail on 8586fd5d9.

… arrive late

A cash card's counterpart line and token icon can land after the card is
drawn (the peer's name resolves, the icon's URL arrives). The transcript's
reflow spring already grows the card to fit them, but the lines themselves
popped in at full opacity. They now fade in over ChatMotion.reflow's
duration, as the Send Back row and footer do since #1227. A line known at
first draw, a redraw with nothing new, and a recycled cell draw without
animating.

The fade is a CABasicAnimation on opacity: a CATransition is filed under
Core Animation's own `transition` key, so it could not be told apart.

Spec: orchestrator #117.
@bmc08gt bmc08gt self-assigned this Nov 4, 2026
@bmc08gt
bmc08gt merged commit b9310fb into main Nov 4, 2026
4 checks passed
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