Skip to content

Expense - Button spinner is not displayed for "Amount" field. #96058

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.32-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #92498
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Motorola MotoG60 / Android 12 (Hybrid app)
App Component: Money Requests

Action Performed:

  1. Open the Expensify app.
  2. Start a manual expense creation flow.
  3. Enter any amount and tap on "Next"
  4. Note that no spinner is visible on "Next" button while moving to the following step.
  5. On confirm page, reopen amount field, edit it and tap "Save"
  6. Note that no spinner is displayed on "Save" button.
  7. Open a different field such as "Merchant" or "Description"
  8. Edit the field and tap "Save"
  9. Note that a spinner is visible while field is saved.

Expected Result:

During expense creation flow, a spinner should be visible after editing a field and tapping "Save" or "Next"

Actual Result:

During expense creation flow, no spinner can be seen on "Save" or "Next" button after saving amount.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7207978_1784030720247.Spin.1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7207978

Issue OwnerCurrent Issue Owner: @OlGierd03

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 14, 2026
  2. applause-bot commented on Jul 14, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/c17c6b87118747c434869e1c4933dcb589aa6967bee3594f9572b1725136590f

  3. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #92498

  4. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jul 14, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jul 14, 2026

    @MelvinBot
    Contributor

    Proposal

    Root Cause

    The Amount step's Next/Save button is a plain Button rendered by MoneyRequestAmountForm, which bypasses the entire Form stack. PR Expensify/App#92498 added the "instant spinner on press" behavior only to the Form stack (FormProvider → FormWrapper → FormAlertWithSubmitButton, driven by the usePressLoading hook). Because the Amount step never touches that stack, its button was never wired up — so no spinner appears.

    By contrast, the Merchant and Description steps render their Save button through FormProvider, which calls usePressLoading and drives the spinner — which is why they behave correctly.

    The Button component only shows a spinner when a parent explicitly passes isLoading={true} (Button/index.tsx); MoneyRequestAmountForm never does, and Button has no shouldShowLoadingImmediatelyOnPress prop of its own.

    Recommended Fix

    Mirror what FormProvider does — wire usePressLoading into MoneyRequestAmountForm's Button:

    1. const {isLoading, startWithLoading} = usePressLoading(); in MoneyRequestAmountForm.
    2. Add isLoading={isLoading} to the <Button>, and change onPress to run the submit through startWithLoading(...).
    3. Validate first, then start the spinner. submitAndNavigateToNextPage can bail out early via setFormError (lines 199 & 204) without navigating. Since usePressLoading only auto-resets on focus loss, a failed-validation press won't navigate and could leave the spinner stuck — so only call startWithLoading on the valid path.
    Investigation details & evidence

    Data flow contrast:

    • Merchant/Description: press → FormProvider.submit → startWithLoading sets isPressed=true → spinner paints → onSubmit deferred one macrotask → spinner shows via isLoading.
    • Amount: press → plain <Button> onPress → submitAndNavigateToNextPage() runs synchronously → no isLoading ever set → no spinner.

    Note / correction to the PR description: the Form stack explicitly passes shouldShowLoadingImmediatelyOnPress={false} in FormWrapper.tsx:196-204 and relies on FormProvider's own usePressLoading, not the default true on FormAlertWithSubmitButton. So the correct fix mirrors FormProvider, not a prop flip.

    Out of scope: the PAY + skipConfirmation branch uses SettlementButton (its own KYC/async flow), not the standard Next/Save button this bug is about.

    Confidence: High — code path fully traced end-to-end; explains why Merchant/Description work but Amount doesn't.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96058) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. rlinoz commented on Jul 14, 2026

    @rlinoz
    Contributor

    No need to block on this, but lets get this fixed.

  8. removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jul 14, 2026
  9. 12 remaining items

  10. melvin-bot commented on Jul 24, 2026

    @melvin-bot

    @OlGierd03 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. OlGierd03 commented on Jul 25, 2026

    @OlGierd03
    Contributor

    I've been consulting on and refining the proposal, weighing different ways we could introduce the immediate spinner globally. Heads up I'm OOO next week (back Aug 3). Once I'm back I'll share a proposal.

  12. added and removed on Jul 27, 2026
  13. rlinoz commented on Jul 27, 2026

    @rlinoz
    Contributor

    Moving to weekly based on that.

  14. reopened this on Jul 27, 2026
  15. melvin-bot commented on Jul 28, 2026

    @melvin-bot

    @rlinoz @OlGierd03 this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  16. OlGierd03 commented on Aug 6, 2026

    @OlGierd03
    Contributor

    Quick update: I have the approach and the proposal ready, but for completeness I've also been putting together a POC PR of the changes so the proposal comes with something concrete to look at.

    Heads up that I'm OOO again, this time until Aug 17. In the meantime @mikolajpochec will help me polish the proposed changes. I'll share the full proposal once I'm back and the POC is refined.

  17. OlGierd03 commented on Aug 25, 2026

    @OlGierd03
    Contributor

    I published proposal on the expert-contributors channel (link)

  18. OlGierd03 commented on Sep 1, 2026

    @OlGierd03
    Contributor

    @rlinoz I think we can close this issue as we already have a new, general issue open for instant spinner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions