You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-12-02] Spend - Export button loads infinitely after marking report as paid offline #107797
Version Number: 9.5.53-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:#105752 Email or phone of affected tester (no customers):sdsdojndosondjisjio@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Search
Action Performed:
Precondition:
Workspace is connected to Sage Intacct.
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense.
Submit, approve and pay the report.
Wait for export to fail.
Open the report.
Click More > Cancel payment > Cancel payment.
Go to Spend > Reports.
Go offline.
Bulk select the report and click Pay > Mark as paid.
Expected Result:
Export button will be shown after marking report as paid offline.
Actual Result:
Export button loads infinitely after marking report as paid offline.
👋 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:
Identify the pull request that introduced this issue and revert it.
Confidence: Medium–High. The code explains the reported offline spinner, but browser reproduction was not performed.
What is the root cause of that problem?
The PR enabled offline bulk Mark as paid, exposing an existing loading state that requires a server response to finish.
The payment optimistically updates the report and sets its Search action to loading. The report’s button changes to Export, but inherits that loading flag. While offline, the payment remains queued, so no response arrives to clear the spinner.
This establishes persistence while offline, not that loading continues after reconnecting.
The PR merged November 23 and is included in the staging release checklist. Ancestry inspection confirmed it is present in staging 9.5.53-0, but absent from production 9.5.52-4. It introduced access to the affected path—not the underlying loading helper.
What changes do you think we should make in order to solve the problem?
For immediate containment, revert the enabling PR; revert cleanliness remains untested.
For a forward fix, distinguish a queued offline payment from an actively processing request. Preserve pending-payment feedback without leaving Export spinning until reconnection. Export can remain disabled offline.
Verify the complete reported flow on web, then reconnect and verify both payment success and failure.
A Sage Intacct export failure alone does not explain this client-side flag remaining set offline. The separate Wise response-holding path explicitly excludes offline operation. Neither provides a stronger explanation.
Suggested review rule: Flag newly offline-enabled writes whose button-loading state clears only on server response, without separate queued/pending presentation.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/107797) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Same root cause as #107784: after an offline bulk Mark as paid, isActionLoading stays true until the server responds. Here the flag surfaces as the Export button in the Search row. I suggest fixing both in #107784 with a single fix that covers every place reading this flag, then retesting this flow before closing this issue.
Please re-state the problem that we are trying to solve in this issue?
When a user marks an expense report as paid via bulk actions while offline, the action button in the Spend > Reports row transitions to "Export", but becomes stuck displaying an infinite loading spinner.
When payMoneyRequest is invoked, Search.ts adds optimistic data setting isActionLoading: true in RAM_ONLY_REPORT_LOADING_STATE for each paid report. The success and failure data callbacks set isActionLoading: false.
However, while offline, the network request (WRITE_COMMANDS.PAY_MONEY_REQUEST) is queued in SequentialQueue and cannot execute until connectivity is restored. Consequently, neither the success data nor failure data runs while offline.
In src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx (lines 126–128) and ActionCell/index.tsx (lines 111–130), the row optimistically renders the updated status (Mark as paid completed, so the button becomes Export), but reads isActionLoading from RAM_ONLY_REPORT_LOADING_STATE.
Because isActionLoading remains true until the server responds, the Export button displays an infinite spinner for the duration of the offline session.
What changes do you think we should make in order to solve the problem?
In src/libs/actions/Search.ts and src/hooks/useSearchBulkActions.ts:
Check network connectivity before setting optimistic isActionLoading: true. When offline (isOffline), do not set isActionLoading: true for queued actions.
Offline state is already visually indicated by pendingFields and the offline indicator on the report item. Only set isActionLoading: true when a request is actively in-flight over the network:
This preserves immediate optimistic status updates offline without locking the action button in a perpetual spinner.
What alternative solutions did you explore? (Optional)?
Reverting PR #105752 was considered, but removes offline bulk payment functionality. Conditioning isActionLoading on active network transmission provides seamless offline feedback while completely eliminating infinite spinners.
What specific scenarios should we cover in automated tests to prevent reoccurrence?
Add automated unit tests in tests/unit/hooks/useSearchBulkActionsPayTest.ts:
Offline Bulk Mark as Paid: Verify that executing bulk Mark as paid while offline updates the report status without setting isActionLoading: true on RAM_ONLY_REPORT_LOADING_STATE.
Online Bulk Mark as Paid: Verify that when online, isActionLoading: true is set optimistically and cleared upon server response.
changed the title [-]Spend - Export button loads infinitely after marking report as paid offline[/-][+][Due for payment 2026-12-02] Spend - Export button loads infinitely after marking report as paid offline[/+]on Nov 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.53-3 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-12-02. 🎊
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]
Activity
applause-bot commentedon Nov 24, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/325cd0523747e7e9362ec01276bde3c4788ad6c515d5090f93448215c32d45cf
expensify-chore-bot commentedon Nov 24, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #105752
expensify-chore-bot commentedon Nov 24, 2026
@grgia @suneox you have been assigned to this deploy blocker because you reviewed the offending PR: #105752
expensify-chore-bot commentedon Nov 24, 2026
@eszlamczyk you have been assigned to this deploy blocker because you authored the offending PR: #105752
expensify-chore-bot commentedon Nov 24, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Nov 24, 2026
👋 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:
MelvinBot commentedon Nov 24, 2026
Proposal
Deploy recommendation: Keep blocked; revert “fix(spend): not able to pay the report via bulk section while offline” unless a targeted fix is verified before deployment.
Confidence: Medium–High. The code explains the reported offline spinner, but browser reproduction was not performed.
What is the root cause of that problem?
The PR enabled offline bulk Mark as paid, exposing an existing loading state that requires a server response to finish.
The payment optimistically updates the report and sets its Search action to loading. The report’s button changes to Export, but inherits that loading flag. While offline, the payment remains queued, so no response arrives to clear the spinner.
This establishes persistence while offline, not that loading continues after reconnecting.
Code evidence and release attribution
isActionLoading: true, clearing it only on success or failure.The PR merged November 23 and is included in the staging release checklist. Ancestry inspection confirmed it is present in staging 9.5.53-0, but absent from production 9.5.52-4. It introduced access to the affected path—not the underlying loading helper.
What changes do you think we should make in order to solve the problem?
For immediate containment, revert the enabling PR; revert cleanliness remains untested.
For a forward fix, distinguish a queued offline payment from an actively processing request. Preserve pending-payment feedback without leaving Export spinning until reconnection. Export can remain disabled offline.
Verify the complete reported flow on web, then reconnect and verify both payment success and failure.
Regression-test gap
The existing bulk-payment tests mock the Search update helper, excluding the loading lifecycle responsible here. Add coverage using its actual updates.
What alternative solutions did you explore?
A Sage Intacct export failure alone does not explain this client-side flag remaining set offline. The separate Wise response-holding path explicitly excludes offline operation. Neither provides a stronger explanation.
Suggested review rule: Flag newly offline-enabled writes whose button-loading state clears only on server response, without separate queued/pending presentation.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/107797)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
suneox commentedon Nov 24, 2026
Same root cause as #107784: after an offline bulk Mark as paid,
isActionLoadingstaystrueuntil the server responds. Here the flag surfaces as the Export button in the Search row. I suggest fixing both in #107784 with a single fix that covers every place reading this flag, then retesting this flow before closing this issue.kevinjosh10 commentedon Nov 24, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue?
When a user marks an expense report as paid via bulk actions while offline, the action button in the Spend > Reports row transitions to "Export", but becomes stuck displaying an infinite loading spinner.
What is the root cause of that problem?
In
src/libs/actions/Search.ts(lines 600–645):useSearchBulkActions.ts.payMoneyRequestis invoked,Search.tsadds optimistic data settingisActionLoading: trueinRAM_ONLY_REPORT_LOADING_STATEfor each paid report. The success and failure data callbacks setisActionLoading: false.WRITE_COMMANDS.PAY_MONEY_REQUEST) is queued inSequentialQueueand cannot execute until connectivity is restored. Consequently, neither the success data nor failure data runs while offline.src/components/Search/SearchList/ListItem/ExpenseReportListItem.tsx(lines 126–128) andActionCell/index.tsx(lines 111–130), the row optimistically renders the updated status (Mark as paidcompleted, so the button becomesExport), but readsisActionLoadingfromRAM_ONLY_REPORT_LOADING_STATE.isActionLoadingremainstrueuntil the server responds, the Export button displays an infinite spinner for the duration of the offline session.What changes do you think we should make in order to solve the problem?
In
src/libs/actions/Search.tsandsrc/hooks/useSearchBulkActions.ts:isActionLoading: true. When offline (isOffline), do not setisActionLoading: truefor queued actions.pendingFieldsand the offline indicator on the report item. Only setisActionLoading: truewhen a request is actively in-flight over the network:This preserves immediate optimistic status updates offline without locking the action button in a perpetual spinner.
What alternative solutions did you explore? (Optional)?
Reverting PR #105752 was considered, but removes offline bulk payment functionality. Conditioning
isActionLoadingon active network transmission provides seamless offline feedback while completely eliminating infinite spinners.What specific scenarios should we cover in automated tests to prevent reoccurrence?
Add automated unit tests in
tests/unit/hooks/useSearchBulkActionsPayTest.ts:isActionLoading: trueonRAM_ONLY_REPORT_LOADING_STATE.isActionLoading: trueis set optimistically and cleared upon server response.Contributor details?
melvin-bot commentedon Nov 24, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
arosiclair commentedon Nov 24, 2026
CP was finished. Waiting on QA
arosiclair commentedon Nov 25, 2026
QA passed
[-]Spend - Export button loads infinitely after marking report as paid offline[/-][+][Due for payment 2026-12-02] Spend - Export button loads infinitely after marking report as paid offline[/+]melvin-bot commentedon Nov 25, 2026
@suneox
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.53-3 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-12-02. 🎊
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]