Skip to content

[Due for payment 2026-11-05] [$175] Green loading button&Submit button are shown together briefly after dismissing download modal #105206

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.24-2
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: #104534
Email or phone of affected tester (no customers): djosdionjonijsdioj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Complete onboarding with Submit expenses to my employer.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Open the expense.
  5. Click Submit dropdown button.
  6. Click Submit via PDF.
  7. Quickly click outside Generate PDF modal to dismiss it.

Expected Result:

Green loading button will disappear and be replaced by Submit button.

Actual Result:

Green loading button and Submit button are shown together briefly after dismissing download modal.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Image
Bug7298392_1793143245585.4.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7298392

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @daledah

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Oct 27, 2026

    @melvin-bot

    @roryabraham @daledah you have been assigned to this deploy blocker because you reviewed the offending PR: #104534

  4. melvin-bot commented on Oct 27, 2026

    @melvin-bot

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

  5. github-actions commented on Oct 27, 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 Oct 27, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR (high confidence): Decouple the file download modal from report and Expensify Card logic

    Recommendation: Revert. It's a refactor that wasn't meant to change behavior, and it was the last App PR merged in the Deploy Checklist: New Expensify 2026-10-27, so the revert should be clean.

    Root cause: Before this PR, cancelling Submit via PDF stopped the green "Submitting" animation as soon as you clicked to dismiss. That happened while the modal was still fading out. Now the cleanup waits until the modal has fully hidden. The header then replaces AnimatedSubmitButton with the Submit dropdown on a clear screen. Meanwhile, the old spinner's Reanimated exiting animation keeps it visible for about 250ms next to the new button.

    Fix-forward alternative: In FileDownloadModalWrapper.tsx:25-35, call resolveModal({action: closeActionRef.current}) inside handleClose. Keep closeModal() in onModalHide. resolveModal settles the show promise without taking the modal off the stack. The wrapper already receives it but never calls it. This brings back the old dismiss-time timing.

    Investigation details

    Why this PR

    • It's the only PR in the 9.5.24-2 checklist that touches the Submit via PDF dismiss flow or SubmitPrimaryAction.tsx.
    • Introduce immediate spinner to ButtonCompose changes Button loading, but only when a caller opts in, and AnimatedSubmitButton doesn't.
    • The PR description says the retract and stopAnimation() "now run after the modal finishes hiding, not at the moment the user dismisses it."

    Mechanism (App 13567c6)

    1. Before the PR, handleClose called onCancel before onClose (ReportPDFDownloadModal.tsx:62-66). onCancel ran stopAnimation() and retractReport() right away (SubmitPrimaryAction.tsx:187-191).
    2. After the PR, handleClose only hides the modal. closeModal() runs from onModalHide (FileDownloadModalWrapper.tsx:39-45). Then the .then runs stopAnimation() and retractReport() (SubmitPrimaryAction.tsx:188-197).
    3. stopAnimation() sets isSubmittingAnimationRunning to false (usePaymentAnimations.ts:10-14), so the header switches to ButtonWithDropdownMenu (SubmitPrimaryAction.tsx:224-261).
    4. The spinner in AnimatedSubmitButton has an exiting keyframe that runs for 200–250ms (AnimatedSubmitButton/index.tsx:161-178). Reanimated keeps it on screen after unmount while the new dropdown is already showing. Before the PR, the fading modal overlay hid this overlap.

    Caveat: The overlap comes from a timing problem in AnimatedSubmitButton that existed before this PR. This PR only made it visible. Removing it completely would mean skipping the exit animation when the animation is cancelled.

    Demoting is defensible: The glitch is cosmetic, lasts about 250ms, and only appears in a new feature that isn't in production. The retract still completes. Reverting or fixing is still cheap.


    view run

  7. daledah commented on Oct 28, 2026

    @daledah
    Contributor

    Checking now

  8. daledah commented on Oct 28, 2026

    @daledah
    Contributor

    @MelvinBot please create a PR to fix this issue:

    1. In src/components/Modal/Global/FileDownloadModalWrapper.tsx, add an optional shouldResolveOnDismiss prop (default false). When it is true, call resolveModal({action: closeActionRef.current}) at the end of handleClose, after setIsVisible(false). Keep closeModal in handleModalHide so the modal still leaves the stack once it has finished hiding.
    2. In src/components/ReportPDFDownloadModal.tsx, pass shouldResolveOnDismiss to FileDownloadModalWrapper.
    3. Leave ExpensifyCardStatementPDFDownloadModal unchanged
  9. 5 remaining items

  10. roryabraham commented on Oct 28, 2026

    @roryabraham
    Contributor

    Requested retest of the AdHoc build for my fix: https://expensify.slack.com/archives/C09V78U42D8/p1793223509531819

  11. roryabraham commented on Oct 28, 2026

    @roryabraham
    Contributor

    opened #105297 for review

  12. m-natarajan commented on Oct 28, 2026

    @m-natarajan

    Windows 11 / Chrome, Google Pixel 7a / Android 17, iPhone 15 Pro / iOS 27.0.1, v9.5.24-8
    The green loading button is no longer displayed.

    Expensify_105206_Retest_iOS.mp4
    Expensify_105206_Retest_Android.mp4
    Expensify_105206_Retest_Web.mp4
  13. changed the title [-][$175] Green loading button&Submit button are shown together briefly after dismissing download modal[/-] [+][Due for payment 2026-11-05] [$175] Green loading button&Submit button are shown together briefly after dismissing download modal[/+] on Oct 29, 2026
  14. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    @daledah

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.24-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-11-05. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  15. mkhutornyi commented on Oct 30, 2026

    @mkhutornyi
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: Decouple the file download modal from report and Expensify Card logic #104534 (comment)
      Link to the comment on the Issue:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Precondition:

    Complete onboarding with Submit expenses to my employer.

    Test:

    1. Go to workspace chat.
    2. Create an expense.
    3. Open the expense.
    4. Click Submit dropdown button.
    5. Click Submit via PDF.
    6. Quickly click outside Generate PDF modal to dismiss it.
    7. Verify that Green loading button will disappear and be replaced by Submit button.

    Do we agree 👍 or 👎

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.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions