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
[$250] Reports-Expense still shown in Submit section after being submitted offline and going online #76519
Version Number: 9.2.67-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/folder/13176923/test-cases/41237528 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: MacBook Air 15.6.1 Chrome, iPhone 15 iOS 26.1 App Component: Search
Action Performed:
Sign in to ND
Create two expenses in the workspace chat
Navigate to the Reports tab, select Submit in To-do section
Go offline
Open the report, click Submit button
Click back button - expense is still displayed in the Submit section
Click Approve section - it has an empty state
Open Submit section again and go online
Expected Result:
Expense is not shown in Submit section after being submitted offline and going online
Actual Result:
Expense still shown in Submit section after being submitted offline and going online
When a user submits an expense report while offline and then goes back online, the report remains stuck in the "Submit" section even though it has already been submitted. The report appears in a ghost state where it shows as submitted but still displays in the Submit to-do list.
Root Cause
When submitting a report offline, the app applies optimistic updates to immediately show the report as submitted in the UI. These updates change several report fields:
statusNum and stateNum to SUBMITTED
managerID to the new approver
lastMessageText and lastMessageHtml to show the submit action
pendingAction flag on the report action
When the device goes back online, if the API request fails, the app should revert all these changes using failureData. However, the current failureData is incomplete - it only reverts the status fields but not the other changed fields like managerID, lastMessageText, and lastMessageHtml.
This partial revert creates an inconsistent state where the report shows conflicting information, causing it to remain visible in the Submit section.
Proposed Solution
Update the failureData in the submitReport function (src/libs/actions/IOU.ts) to revert all optimistically changed fields when submission fails:
📣 @ashu75575! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
We can align with the backend filter logic to improve the filter check above.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Reports-Expense still shown in Submit section after being submitted offline and going online[/-][+][$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/+]on Dec 8, 2025
changed the title [-][Due for payment 2026-01-07] [$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/-][+][$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/+]on Jan 20, 2026
Activity
melvin-bot commentedon Dec 2, 2025
Triggered auto assignment to @heyjennahay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.ashu75575 commentedon Dec 2, 2025
Proposal
Problem Statement
When a user submits an expense report while offline and then goes back online, the report remains stuck in the "Submit" section even though it has already been submitted. The report appears in a ghost state where it shows as submitted but still displays in the Submit to-do list.
Root Cause
When submitting a report offline, the app applies optimistic updates to immediately show the report as submitted in the UI. These updates change several report fields:
statusNumandstateNumtoSUBMITTEDmanagerIDto the new approverlastMessageTextandlastMessageHtmlto show the submit actionpendingActionflag on the report actionWhen the device goes back online, if the API request fails, the app should revert all these changes using
failureData. However, the currentfailureDatais incomplete - it only reverts the status fields but not the other changed fields likemanagerID,lastMessageText, andlastMessageHtml.This partial revert creates an inconsistent state where the report shows conflicting information, causing it to remain visible in the Submit section.
Proposed Solution
Update the
failureDatain thesubmitReportfunction (src/libs/actions/IOU.ts) to revert all optimistically changed fields when submission fails:This ensures when a submission fails after going online, the report returns to its exact pre-submission state.
Alternative Solutions
N/A
melvin-bot commentedon Dec 2, 2025
📣 @ashu75575! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
ashu75575 commentedon Dec 2, 2025
Contributor details
Your Expensify account email: tejveersingh.75575@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01309a71996aa312f4
melvin-bot commentedon Dec 2, 2025
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
nkdengineer commentedon Dec 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense still shown in Submit section after being submitted offline and going online
What is the root cause of that problem?
We only have the logic to filter out the report based on the status. No logic to filter out the report based on the action.
App/src/libs/SearchUIUtils.ts
Line 1557 in 92c9780
What changes do you think we should make in order to solve the problem?
Update the
shouldShowhere to filter out the report based on the action. We have two options to do that:actionfrom the query, we can check the report statusApp/src/libs/SearchUIUtils.ts
Line 1557 in 92c9780
actionfrom the query, we can check ifallActionsinclude this actionWe can align with the backend filter logic to improve the filter check above.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
melvin-bot commentedon Dec 6, 2025
@heyjennahay Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
[-]Reports-Expense still shown in Submit section after being submitted offline and going online[/-][+][$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/+]melvin-bot commentedon Dec 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021998059595376860907
48 remaining items
[-][Due for payment 2026-01-07] [$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/-][+][$250] Reports-Expense still shown in Submit section after being submitted offline and going online[/+]luacmartins commentedon Jan 20, 2026
Correct
garrettmknight commentedon Jan 21, 2026
@nkdengineer you wanna take another swing?
nkdengineer commentedon Jan 21, 2026
It's on my list, will raise the PR soon.
bernhardoj commentedon Jan 21, 2026
Hmm, if we don't want to hide the expense from the list when submitting while offline, then what's the new expected behavior?
nkdengineer commentedon Jan 25, 2026
@luacmartins @garrettmknight Can you please check the @bernhardoj 's comment?
garrettmknight commentedon Jan 27, 2026
I'm not sure I follow, where did someone say we don't want the report not to show in Submit after submitting offline?
bernhardoj commentedon Jan 27, 2026
I understand that we don't want to do the client-side filtering from these comments
#79714 (comment)
#79132 (comment)
nkdengineer commentedon Jan 27, 2026
Look like it's fixed now with live data on todo section #79506
garrettmknight commentedon Jan 29, 2026
I think we can close since it's fixed.