Skip to content

[Due for payment 2026-05-20] [Due for payment 2026-05-20] Report - Expense details load infinitelly after adding expense to empty report offline. #90287

Closed

Description

@mitarachim

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.3.70-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #89791
Email or phone of affected tester (no customers): ibellicotest+2250@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has at least one workspace.

  1. Open the staging.new.expensify.com website.
  2. Open any workspace chat.
  3. Create a new empty report.
  4. Turn off internet connection.
  5. Open the just created report and click on "Add Expense"
  6. Add a new manual expense.
  7. Note that after expense is created, receipt thumbnail is visible (On Web), but expense details load infinitelly.
  8. Turn on internet connection
  9. Note that now, expense details load correctly.

Expected Result:

Expense report should be automatically visible without glitches or excesive loading after adding an expense to an empty report while offline.

Actual Result:

After adding an expense to an empty report while offline, expense´s details load infinitelly on report. On Web, only receipt thumbnail is correctly visible and on Android app, entire report loads infinitelly.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7151392_1778546769656.S5.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @ShridharGoel

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on May 12, 2026
  2. melvin-bot commented on May 12, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 12, 2026

    @melvin-bot

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

  4. github-actions commented on May 12, 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.
  5. OSBotify commented on May 12, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #89791 - "Re-land of smooth post-submit navigation and rendering on Spend tab" by @JakubKorytko (High confidence)
    Related Issues: #89669 (previous deploy blocker that this PR was trying to fix)

    Recommendation: REVERT

    PR #89791 introduced a regression in the offline flow for adding expenses to empty reports. Reverting it will resolve the infinite loading state.

    Assigned: @JakubKorytko (PR author), @ShridharGoel, @mountiny (approving reviewers)
    Labels: Both DeployBlockerCash and DeployBlocker are already present. The fix is in App (frontend), so DeployBlocker (backend label) should be removed. DeployBlockerCash (App label) should stay.

    Details

    Evidence

    Verification

    The affected files from PR #89791 that relate directly to this bug:

    1. src/pages/inbox/report/MoneyReportContentCreated.tsx (new file introduced by the PR)
    2. src/components/ReportActionItem/MoneyReportView.tsx (modified to accept isTotalPending prop)
    3. src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx (modified skeleton logic)

    Root Cause

    PR #89791 introduced MoneyReportContentCreated, a new component that handles the IOU/Expense/Invoice branch of ReportActionItemContentCreated. Inside it, a transient pending state is detected via:

    const isPendingSingleExpenseThread =
      isSingleTransactionReport(report, reportTransactions) &&
      !transactionThreadReport?.reportID;

    This flag is forwarded as isTotalPending to MoneyReportView, which then renders an ActivityIndicator instead of the total amount. The intent is to handle the brief gap between a transaction landing in Onyx and the transaction-thread report's useOnyx subscription delivering.

    The offline bug: When a user adds an expense to an empty report while offline, the transaction is written optimistically to Onyx locally, making isSingleTransactionReport return true. However, transactionThreadReport?.reportID never arrives because the API call to create the thread report cannot complete without network connectivity. As a result, isPendingSingleExpenseThread remains true indefinitely — the ActivityIndicator is shown forever and expense details never load.

    Additionally, in MoneyRequestReportActionsList.tsx, the isAwaitingDeferredTransaction skeleton logic uses hasDeferredWriteForReport — a non-reactive module-level Map check. When offline, the deferred write mechanism may not behave as expected (the write callback may never execute), potentially also contributing to the report loading infinitely on Android.

    The previous version of this code (before PR #89791) did not have this issue because the ReportActionItemContentCreated component did not have the isPendingSingleExpenseThread transient-gap detection; the component fell through to MoneyReportView directly without the pending override.

  6. 5 remaining items

  7. IuliiaHerets commented on May 12, 2026

    @IuliiaHerets

    Issue not repro anymore on Web and Android, v9.3.70-3

    screen-20260512-125719.mp4
    expense.detail.mp4
  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 12, 2026
  9. changed the title [-]Report - Expense details load infinitelly after adding expense to empty report offline.[/-] [+][Due for payment 2026-05-20] Report - Expense details load infinitelly after adding expense to empty report offline.[/+] on May 13, 2026
  10. melvin-bot commented on May 13, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  11. melvin-bot commented on May 13, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 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-05-20. 🎊

    For reference, here are some details about the assignees on this issue:

  12. melvin-bot commented on May 13, 2026

    @melvin-bot

    @ShridharGoel The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  13. changed the title [-][Due for payment 2026-05-20] Report - Expense details load infinitelly after adding expense to empty report offline.[/-] [+][Due for payment 2026-05-20] [Due for payment 2026-05-20] Report - Expense details load infinitelly after adding expense to empty report offline.[/+] on May 13, 2026
  14. melvin-bot commented on May 13, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.73-4 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-05-20. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on May 13, 2026

    @melvin-bot

    @ShridharGoel The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions