feat(money): play card flip animation on link card sheet (MUSD-1199) - #33704
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Feature Flag Registry CheckThis PR introduces feature flag references that are not yet registered in the Unregistered flags
How to fixAdd an entry for each flag in myNewFlag: {
name: 'myNewFlag',
type: FeatureFlagType.Remote,
inProd: false,
productionDefault: false,
status: FeatureFlagStatus.Active,
},Set If you access the flag via a constant (e.g. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cfae263. Configure here.
| const reduceMotion = useReduceMotion(); | ||
| const [hasRiveError, setHasRiveError] = useState(false); | ||
|
|
||
| const animate = flagEnabled && !reduceMotion && !hasRiveError; |
There was a problem hiding this comment.
On users without reduce-motion and with cached card data, this briefly shows the static PNG before Rive because useReduceMotion defaults to true until the async check resolves.
Could we treat “reduce motion not yet resolved” like !variantKnown (placeholder / hold) so we don’t flash static → flip? Otherwise, first paint hits the static <Image>, then swaps to Rive + 250ms entrance.
| @@ -0,0 +1,24 @@ | |||
| import { StyleSheet } from 'react-native'; | |||
|
|
|||
| // 620 / 400 is the native size of the MainTilt artboard in card_tilt_v1.2.riv. | |||
There was a problem hiding this comment.
Comment says 620/400 is from MainTilt, but we render the per-variant Y Animation artboards.
Can we confirm those share that size and update the comment? Otherwise Fit.Contain may letterbox.
There was a problem hiding this comment.
I can confirm that both of them are exactly 620×400, same as MainTilt.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|




Description
The link-card half-sheet now plays a Rive card-flip animation when it is presented: the card graphic appears and flips into view, for both the virtual and the metal card variants. Previously the sheet showed a static card image.
MoneyCardFlipAnimationcomponent renderscard_tilt_v1.2.rivby playing the one-shotyAnimationflip timeline on the per-variant artboards (Card Tilt Y Animation - Digital/Card Tilt Y Animation - Metal), wrapped in a short Reanimated entrance (opacity 0.5→1, translateY 10→0 over 250 ms). TheMainTiltstate machine's data-boundstartAnimationtrigger does not fire the flip in this asset version (verified on-device and in a headless runtime simulation), so the state machine is deliberately bypassed.useReduceMotionhook) and falls back to the previous static card image when reduce motion is on, when the animation is disabled remotely, or when the Rive runtime errors.selectMoneyCardFlipAnimationEnabledFlag, a version-gated remote kill-switch (earnMoneyCardFlipAnimationEnabled, default ON, local overrideMM_MONEY_CARD_FLIP_ANIMATION_ENABLED), mirroring the existing Money animation flags.card_tilt_v1.2.rivasset (147 KB) is authored to also serve the upcoming card-tilt and receive-card surfaces; its ViewModel (cardType/startAnimation/xValue/yValue) is not consumed in this PR and the state-machine wiring needs a follow-up with the designer.Changelog
CHANGELOG entry: Added a card flip animation to the link card sheet in the Money account
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MUSD-1199
Manual testing steps
Screenshots/Recordings
Before
N/A
After
IMG_4408.MOV
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Money UI-only change with remote kill-switch, reduce-motion and Rive error fallbacks to static images; no auth, payments, or data-path changes.
Overview
The link card half-sheet swaps its static card image for a new
MoneyCardFlipAnimationthat plays a one-shot Rive flip (card_tilt_v1.2.riv, digital vs metal artboards) with a short Reanimated entrance when animations are allowed.Gating and fallbacks: Remote/env kill-switch
selectMoneyCardFlipAnimationEnabledFlag(earnMoneyCardFlipAnimationEnabled,MM_MONEY_CARD_FLIP_ANIMATION_ENABLED, default on). The animation is skipped for reduce motion, disabled flag, or Rive errors, with the previous PNGs as fallback.useReduceMotionState(nullwhile the OS setting is unresolved) avoids a static-to-Rive flash; the sheet passesisMetalCardasundefineduntil card home data finishes loading so the flip runs once on the right variant.Sheet polish: Bottom sheet
goBackwiring, CTAact/async handling, and tests forconfirmLinkInBackgroundrejections not surfacing. Dedicated component tests and flag selector tests added; link-sheet card image styles removed.Reviewed by Cursor Bugbot for commit 04c2e71. Bugbot is set up for automated code reviews on this repo. Configure here.