[CP Staging] Fix infinite spinner on the Save button in change card limit modal#96087
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@codex review |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@gijoe0295 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
I suggest updating |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
Save button in change card limit modalSave button in change card limit modal
Save button in change card limit modalSave button in change card limit modal
|
🚧 rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
…hange-card-limit-Save-button-infinite-spinner Fix infinite spinner on the `Save` button in change card limit modal (cherry picked from commit 81379d8) (cherry-picked to staging by roryabraham)
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/roryabraham in version: 9.4.34-4 🚀
|
Help site review — no changes requiredI reviewed the changes in this PR against the help site articles under Why: This is a purely behavioral bug fix. It adds an internal The user-facing flows that the help site documents are unchanged:
No feature names, tab names, settings labels, button labels, or workflow steps were added, removed, or renamed, so there is nothing in the affected articles (e.g. @OlGierd03 — since no help site changes are required, there is no draft PR to link. Let me know if you'd like me to reconsider any specific article. |
Explanation of Change
#92498 enabled an optimistic press spinner on form submit buttons by default. For forms built with
FormProvider, the spinner is driven by the provider itself (viausePressLoading) and is cleared only when an external loading state (formState.isLoading/Onyx) turns true or the screen regains navigation focus.The Expensify Card limit page hits neither path when the new limit drives
newAvailableSpend <= 0: itsonSubmitearly-returns into a confirmation modal without setting any loading state and the modal is a global overlay (useConfirmModal/ModalContext), so the page never loses focus.This PR adds a
shouldShowLoadingImmediatelyOnPressopt-out prop toFormProvider(defaulttrue, so no other form changes behavior), mirroring the existing prop of the same name onFormAlertWithSubmitButton. When disabled, the submit button's loading state comes only from the externalformState.isLoading/Onyx state andonSubmitruns without the press spinner. The prop is then set tofalseonDynamicExpensifyCardLimitPage.Note
This PR also includes the change from #96106 (the Expensify Card PIN Next button spinner fix)
Fixed Issues
$ #96072
$ #96088
Tests
Expensify Card Save button loads infinitely after dismissing Change card limit modal
Precondition:
Expensify Card PIN Next button loads infinitely
Precondition:
Log in as a Workspace Admin (applausetester+ecard@applause.expensifail.com)
Navigate to Workspace > Expensify Card
Invite the test user to the workspace if not already invited (Invite any validated expensifail account)
Issue a Physical Card (not a Virtual Card) to the test user
Steps:
Result: Next button starts loading infinitly
Result: Button continue infinity load
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-07-14.at.18.56.03.mov
iOS: Native
Screen.Recording.2026-07-14.at.19.14.28.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-14.at.17.36.05.mov