Skip to content

[HOLD fireroom-2026-03-18-expense-show-not-found-page] Expense list not displaying on report #83513

Closed

Description

@m-natarajan

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.25-13
Reproducible in staging?: Needs Reproduction(Unable to reproduce)
Reproducible in production?: Needs Reproduce
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @PedroEspinoza1999
Slack conversation (hyperlinked to channel name): #Expensify Bugs #Expensify Bugs

Action Performed:

  1. User logs in to New Expensify.
  2. Navigates to the Reports page.
  3. Opens an existing expense report.
  4. Attempts to view the list of expenses within the report.

Expected Result:

All expenses associated with the selected report should be visible and properly listed under the report details.

Actual Result:

The expense list does not appear under the report. The report loads, but no expenses are displayed.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

The screenshots for the issue are in Slack thread

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @s77rt

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 26, 2026
  2. MelvinBot commented on Feb 26, 2026

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  3. melvin-bot commented on Feb 26, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  4. MelvinBot commented on Feb 26, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When a user opens an expense report in New Expensify, the report loads and the report header (showing the total) is visible, but the individual expense/transaction items do not display under the report. Only the report total is shown.

    What is the root cause of that problem?

    The report total and the individual transaction list come from two independent data sources that can get out of sync:

    1. Report total — Comes from report.total / report.nonReimbursableTotal (server-set fields on the Report Onyx object), displayed via MoneyReportHeader. This loads with the report itself and renders at MoneyRequestReportView.tsx:257.

    2. Transaction list — Comes from a derived Onyx value (REPORT_TRANSACTIONS_AND_VIOLATIONS) which maps transactions to reports using transaction.reportID. This is consumed by useReportTransactionsCollection at MoneyRequestReportView.tsx:118 and further filtered through getAllNonDeletedTransactions at MoneyRequestReportUtils.ts:86-105.

    There are two likely code paths that cause transactions to not display while the report header total is visible:

    Path A — Empty derived transaction collection: If the derived REPORT_TRANSACTIONS_AND_VIOLATIONS value does not contain transactions for the report's ID (e.g., transaction.reportID is missing/mismatched in Onyx, or the derived value computation hasn't processed the transactions yet), then reportTransactions is empty. The shouldWaitForTransactions guard at MoneyRequestReportUtils.ts:131-145 should show a loading skeleton in this case (when report.total !== 0), but if there's a timing issue where getAllNonDeletedTransactions briefly returns non-empty results (orphaned transactions with includeOrphanedTransactions=true) and then re-evaluates to empty after reportActions updates, the guard can be bypassed.

    Path B — Static skeleton from empty filtered reportActions: At MoneyRequestReportView.tsx:220-222, if reportActions.length === 0 after getFilteredReportActionsForReportView filtering, the component returns a non-animating ReportActionsSkeletonView that permanently blocks all rendering — no header, no transactions. This could appear as a "frozen" report if isLoadingInitialReportActions has already become false but the filtered actions list is empty (e.g., all actions are deleted parent money request actions or hidden report previews).

    The most likely scenario is Path A: the derived transaction collection is empty for the affected report, causing visibleTransactions to be empty. The MoneyRequestReportTransactionList then renders the empty state (SearchMoneyRequestReportEmptyState) instead of individual expense items, while the MoneyReportHeader above still shows the server-computed total from report.total.

    What changes do you think we should make in order to solve the problem?

    1. Improve the shouldWaitForTransactions guard in MoneyRequestReportUtils.ts:131-145:

    The current guard checks transactions?.length === 0, but transactions here is the output of getAllNonDeletedTransactions which depends on both reportTransactions (derived value) and reportActions. The guard should also consider whether the raw reportTransactions collection (from the derived value) is empty vs undefined, independently of the reportActions filtering. If reportTransactions is empty/undefined but report.total !== 0, we should continue showing the loading state.

    2. Add a fallback for the static skeleton at line 220 in MoneyRequestReportView.tsx:220-222:

    When reportActions.length === 0 but report.total !== 0 and there are known transactions for the report, the component should not show a permanent static skeleton. Instead, it should either show the loading skeleton or proceed to render the report view with the transaction list (since transactions can display independently of report actions in the MoneyRequestReportActionsList).

    3. Investigate data integrity: This issue likely requires checking whether the affected user's transactions have the correct reportID in the Onyx store. If transaction.reportID is missing or doesn't match the expense report, the derived REPORT_TRANSACTIONS_AND_VIOLATIONS will never include those transactions for the report.

    What alternative solutions did you explore? (Optional)

    • Alternative 1: Making the derived value computation (reportTransactionsAndViolations.ts) more resilient by also indexing transactions by their parent report action's IOUReportID, not just transaction.reportID. This would provide a fallback mapping. However, this would be a more complex change and the derived value is performance-sensitive.

    • Alternative 2: Having MoneyRequestReportActionsList fetch transactions independently (via API) when the derived collection is empty but report actions indicate expenses exist. This would be a more defensive approach but adds complexity and an extra API call.

    Detailed Investigation

    Root Cause Analysis

    The expense rendering pipeline in MoneyRequestReportView relies on a derived Onyx value (REPORT_TRANSACTIONS_AND_VIOLATIONS) that maps transactions to reports by transaction.reportID. This is computed in reportTransactionsAndViolations.ts:33-80:

    for (const transactionKey of transactionsToProcess) {
        const transaction = transactions[transactionKey];
        const reportID = transaction?.reportID;
        if (!reportID) { continue; }  // ← Skipped if reportID is missing
        reportTransactionsAndViolations[reportID].transactions[transactionKey] = transaction;
    }
    

    The report total is server-computed and stored directly on the Report Onyx object (report.total), displayed via getMoneyRequestSpendBreakdown in ReportUtils.ts:4337. These two data sources are independent — the total always reflects the server state while the transaction list depends on the client-side derived value.

    Evidence Chain

    1. Transactions mapped by transaction.reportID → derived value
    2. useReportTransactionsCollection(reportID) selects from derived value → may return empty if mapping fails
    3. getAllNonDeletedTransactions filters by reportActions → empty if no matching transactions
    4. shouldWaitForTransactions guard → depends on transactions.length and report.total
    5. MoneyReportHeader shows report.total independently → always visible when report renders
    6. MoneyRequestReportTransactionList shows empty state when no transactions

    Relevant Code

    • src/components/MoneyRequestReportView/MoneyRequestReportView.tsx:118-162 - Main data flow and rendering decisions
    • src/components/MoneyRequestReportView/MoneyRequestReportView.tsx:216-222 - Loading skeleton and static skeleton early returns
    • src/libs/MoneyRequestReportUtils.ts:86-105 - getAllNonDeletedTransactions filtering
    • src/libs/MoneyRequestReportUtils.ts:131-145 - shouldWaitForTransactions loading guard
    • src/libs/actions/OnyxDerived/configs/reportTransactionsAndViolations.ts:33-80 - Derived value computation
    • src/hooks/useReportTransactionsCollection.ts:9-22 - Transaction collection hook
    • src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx:429-446 - Empty state rendering

    Implementation Notes

    • The issue is marked as "Needs Reproduction" — it may be a race condition or data-specific
    • Without the Slack screenshots, it's unclear whether the user sees a skeleton shimmer or a completely blank transaction area
    • The affected version (9.3.25-13) includes the Onyx 3.0.38 bump (PR [No QA] Bump Onyx to 3.0.38 / Remove canBeMissing usage from the codebase #82467) which changed useOnyx undefined handling (removed canBeMissing), potentially affecting derived value timing
    • Confirming whether this is reproducible consistently vs intermittently would help distinguish between a data integrity issue and a race condition

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 26, 2026
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 26, 2026
  7. melvin-bot commented on Feb 26, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)

  8. melvin-bot commented on Feb 26, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  9. 30 remaining items

  10. neil-marcellini commented on Mar 18, 2026

    @neil-marcellini
    Contributor

    Some AI investigation from 2 days ago that seems relevant:

    What's likely broken here:

    The report genuinely has 2 transactions, but getAllNonDeletedTransactions incorrectly filters one out, leaving only 1. This triggers the single-transaction path. But now the single-transaction UX doesn't work properly either, because:

    The ReportActionsView expects this to be a real single-transaction report with a proper thread
    But the report was never meant to be single-transaction — it has 2 expenses, one of which is being wrongly filtered
    The remaining IOU report actions may also be getting filtered by getFilteredReportActionsForReportView, leaving nothing visible in the chat-style view
    So the root cause is the filtering — once one transaction gets wrongly excluded, everything cascades:

    2 transactions → 1 → treated as single-transaction report → wrong view → broken display

    I will keep debugging more and get some logs to prove this out.

  11. changed the title [-]The expense list is not displaying under the report in New Expensify. When opening a report, the individual expenses associated with it do not appear and onlt report total displayed[/-] [+]Expense list not displaying on report[/+] on Mar 18, 2026
  12. neil-marcellini commented on Mar 19, 2026

    @neil-marcellini
    Contributor

    I got a draft PR up to try and fix this on the front end only, but I'm not sure if there's really a great way to do that because it's a data inconsistency issue. If you fix one thing on the front end, it's very likely another thing in related flows will be broken. I want to investigate the root cause on the backend more and try to fix it there.

  13. neil-marcellini commented on Mar 19, 2026

    @neil-marcellini
    Contributor

    It turns out this is part of an existing fire #fireroom-2026-03-18-expense-show-not-found-page

  14. changed the title [-]Expense list not displaying on report[/-] [+][HOLD fireroom-2026-03-18-expense-show-not-found-page] Expense list not displaying on report[/+] on Mar 19, 2026
  15. self-assigned this
    on Mar 20, 2026
  16. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 20, 2026
  17. mvtglobally commented on Mar 21, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  18. melvin-bot commented on Mar 27, 2026

    @melvin-bot

    @s77rt Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  19. melvin-bot commented on Mar 27, 2026

    @melvin-bot

    @s77rt Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  20. s77rt commented on Mar 28, 2026

    @s77rt
    Member

    I guess we can close this

  21. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @s77rt Huh... This is 4 days overdue. Who can take care of this?

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNeeds ReproductionReproducible steps neededReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions