Skip to content

[Due for payment 2026-05-20] [Due for payment 2026-05-20] Invoice - Invoice report loads infinitely when sent offline #90293

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

Action Performed:

Precondition:

  • Invoice is enabled.
  1. Go to staging.new.expensify.com
  2. Go offline.
  3. Open FAB > Send invoice.
  4. Send invoice to any user.
  5. Open the invoice report.

Expected Result:

Invoice report will load when sent offline.

Actual Result:

Invoice report loads infinitely when sent offline.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7151443_1778553716481.6.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

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: #90072

  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: #90072 - "feat: Open reports at first unread action V2" by @chrispader (High confidence)
    Related Issues: #35011, #90030, #90032, #90052, #90064

    Recommendation: REVERT

    PR #90072 introduced a new loading gate (isUnreadMessagePageLoadingInitially) in ReportActionsView.tsx that blocks report rendering while offline, causing the infinite loading spinner when opening a newly-sent invoice report offline.

    Assigned: @chrispader (PR author), @rlinoz (approving reviewer)
    Labels: DeployBlockerCash retained (frontend App bug). DeployBlocker removed — fix is needed in Expensify/App, not in the backend.

    📋 Detailed Analysis

    Evidence

    PR #90072 added the following new logic to src/pages/inbox/report/ReportActionsView.tsx:

    const isUnreadMessagePageLoadingInitially =
        !reportActionIDFromRoute && isReportUnread && !oldestUnreadReportAction && !hasOnceLoadedReportActions;
    
    const isReportReady = !isInitiallyLoadingReport && !isUnreadMessagePageLoadingInitially;
    
    if (isLoadingOnyxValue(reportResult) || !report || !isReportReady || shouldShowSkeleton) {
        return <ReportActionsSkeletonView />;
    }

    When a user sends an invoice while offline and then opens the invoice report, all four conditions that make isUnreadMessagePageLoadingInitially = true are satisfied simultaneously:

    1. !reportActionIDFromRoute — true, no deep-link action ID is provided
    2. isReportUnread — true, the newly-created invoice report has lastReadTime < lastVisibleActionCreated (or no lastReadTime at all)
    3. !oldestUnreadReportAction — true, no OpenReport API response has arrived yet (device is offline)
    4. !hasOnceLoadedReportActions — true, the report has never successfully completed an OpenReport call

    This makes isReportReady = false, causing ReportActionsSkeletonView to render indefinitely because while offline, neither oldestUnreadReportAction nor hasOnceLoadedReportActions will ever become truthy.

    Before this PR, the skeleton was only shown via shouldShowSkeleton, which included the guard shouldShowSkeletonForInitialLoad = !!isLoadingInitialReportActions && ... && !isOffline. This explicitly excluded offline scenarios. The new isUnreadMessagePageLoadingInitially gate has no !isOffline guard, so it incorrectly blocks rendering while offline.

    The bug is staging-only (not reproducible in production), consistent with PR #90072 being a staging-only change.

    Verification

    • Affected file: src/pages/inbox/report/ReportActionsView.tsx
    • PR modifies this file: Confirmed — the diff shows PR feat: Open reports at first unread action V2 #90072 modified ReportActionsView.tsx and introduced the isUnreadMessagePageLoadingInitially condition
    • The changes directly relate to the reported symptom: The new loading gate blocks the invoice report view from rendering while offline
    • Bug is staging-only: Confirmed — not reproducible in production

    Root Cause

    isUnreadMessagePageLoadingInitially was designed to wait for the OpenReport API response before displaying the unread anchor position. However, it does not handle the offline case: when the device is offline, the API call is queued but never resolves, so oldestUnreadReportAction stays undefined and hasOnceLoadedReportActions stays false indefinitely. The fix should add an || isOffline escape hatch to isUnreadMessagePageLoadingInitially, or revert the PR and ship the fix separately.

  6. 13 remaining items

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

  8. melvin-bot commented on May 13, 2026

    @melvin-bot

    @rlinoz @chrispader 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]

  9. changed the title [-][Due for payment 2026-05-20] Invoice - Invoice report loads infinitely when sent offline[/-] [+][Due for payment 2026-05-20] [Due for payment 2026-05-20] Invoice - Invoice report loads infinitely when sent offline[/+] on May 13, 2026
  10. 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:

  11. melvin-bot commented on May 13, 2026

    @melvin-bot

    @rlinoz @chrispader 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]

  12. abzokhattab commented on Aug 8, 2026

    @abzokhattab
    Contributor

    Looks like the payment is missing here, can we please reopen? I reviewed the PR @Beamanator @rlinoz

  13. reopened this on Aug 10, 2026
  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on Aug 10, 2026
  15. melvin-bot commented on Aug 10, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Aug 10, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
  17. mallenexpensify commented on Aug 10, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @abzokhattab due $250 via NewDot

  18. quinthar commented on Aug 19, 2026

    @quinthar
    Contributor

    Approved $250 to @abzokhattab

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething 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