Skip to content

[$250] Report list is not properly updated after removing multiple expenses #79360

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.2.99-4
Reproducible in staging?: Y
Reproducible in production?: Y
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: @LukasMod
Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Add 3 expenses to workspace
  2. Navigate to Reports => Reports (filter)
  3. Select 2 expenses and delete them

Expected Result:

Show details of last remaining report

Actual Result:

There is only value visible, scroll bar is very short

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

bug.reports.mov
Recording.2184.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022011162722544191726
  • Upwork Job ID: 2011162722544191726
  • Last Price Increase: 2026-02-18
Issue OwnerCurrent Issue Owner: @mananjadhav

Activity

  1. added
    Daily
    Bug
    on Jan 12, 2026
  2. melvin-bot commented on Jan 12, 2026

    @melvin-bot

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

  3. sohrabq commented on Jan 12, 2026

    @sohrabq

    proposal

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

    The issue involves the Report Details view incorrectly switching layouts when multiple expenses are deleted, leaving only one remaining expense.

    What is the root cause of that problem?

    When a report contains multiple transactions (expenses), it is displayed using a "Table View" (MoneyRequestReportActionsList), which lists expenses in a grid.
    When expenses are deleted and only one transaction remains, the application logic (shouldDisplayReportTableView in MoneyRequestReportUtils.ts) detects a "Single Transaction Report" and switches the view to a "Chat View" (similar to a 1:1 IOU request).
    However, for Group Policy (Workspace) Reports, this "Chat View" does not render the single expense details correctly in this context, resulting in the user seeing "Only value visible" (the report header total) with an apparently empty body (short scroll bar).

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

    In MoneyRequestReportUtils.ts:
    Before:
    I updated the imports to include isReportInGroupPolicy and modified shouldDisplayReportTableView to check for group policies.

    import {
        getMoneyRequestSpendBreakdown,
        getNonHeldAndFullAmount,
        hasHeldExpenses as hasHeldExpensesReportUtils,
        hasOnlyHeldExpenses as hasOnlyHeldExpensesReportUtils,
        hasUpdatedTotal,
        isInvoiceReport,
        isMoneyRequestReport,
        isOneTransactionReport,
        isReportTransactionThread,
    } from './ReportUtils';
    
    // ... lines 112-114 ...
    
    /**
     * Returns whether a "table" ReportView/MoneyRequestReportView should be used for the report.
     *
     * If report is a special "transaction thread" we want to use other Report views.
     * Likewise, if report has only 1 connected transaction, then we also use other views.
     */
    function shouldDisplayReportTableView(report: OnyxEntry<Report>, transactions: Transaction[]) {
        return !isReportTransactionThread(report) && !isSingleTransactionReport(report, transactions);
    }
    

    After:
    Now, if a report is part of a group policy workspace (isReportInGroupPolicy), it will always display the table view, even if there is only one transaction left. This prevents the view from collapsing into the broken single-transaction state.

    import {
        getMoneyRequestSpendBreakdown,
        getNonHeldAndFullAmount,
        hasHeldExpenses as hasHeldExpensesReportUtils,
        hasOnlyHeldExpenses as hasOnlyHeldExpensesReportUtils,
        hasUpdatedTotal,
        isInvoiceReport,
        isMoneyRequestReport,
        isOneTransactionReport,
        isReportInGroupPolicy,
        isReportTransactionThread,
    } from './ReportUtils';
    
    // ... lines 112-114 ...
    
    /**
     * Returns whether a "table" ReportView/MoneyRequestReportView should be used for the report.
     *
     * If report is a special "transaction thread" we want to use other Report views.
     * Likewise, if report has only 1 connected transaction, then we also use other views.
     */
    function shouldDisplayReportTableView(report: OnyxEntry<Report>, transactions: Transaction[]) {
        return !isReportTransactionThread(report) && (!isSingleTransactionReport(report, transactions) || isReportInGroupPolicy(report));
    }
    
  4. abbasifaizan70 commented on Jan 12, 2026

    @abbasifaizan70
    Contributor

    Proposal

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

    After deleting expenses from the Reports filter view, the remaining report details are compressed to the bottom of the screen, showing only minimal content with a very short scrollbar.

    What is the root cause of that problem?

    The issue is in SearchMoneyRequestReportPage.tsx where the report details container uses styles.justifyContentEnd:

    <View style={[styles.flex1, styles.justifyContentEnd, styles.overflowHidden]}>

    The justifyContentEnd style aligns flex children to the bottom of the container. When there are fewer expenses (e.g., 1 remaining after deleting 2), the minimal content is pushed to the bottom, creating the appearance of compressed content with a very short scrollbar.

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

    Remove styles.justifyContentEnd from the container to allow the report content to fill the available space naturally from the top.

    File: App/src/pages/Search/SearchMoneyRequestReportPage.tsx

    <View style={[styles.flex1, styles.justifyContentEnd, styles.overflowHidden]}>

    // Before
    <View style={[styles.flex1, styles.justifyContentEnd, styles.overflowHidden]}>
    
    // After
    <View style={[styles.flex1, styles.overflowHidden]}>

    This change allows the MoneyRequestReportView component to properly fill the available space and display all content correctly, regardless of the number of remaining expenses after deletion.

    Demo

    Screen.Recording.2026-01-12.at.11.29.12.PM.mov
  5. added
    External
    on Jan 13, 2026
  6. changed the title [-]Report list is not properly updated after removing multiple expenses[/-] [+][$250] Report list is not properly updated after removing multiple expenses[/+] on Jan 13, 2026
  7. melvin-bot commented on Jan 13, 2026

    @melvin-bot
  8. added
    Help Wanted
    on Jan 13, 2026
  9. melvin-bot commented on Jan 13, 2026

    @melvin-bot

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

  10. melvin-bot commented on Jan 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  11. 11 remaining items

  12. mvtglobally commented on Feb 7, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  13. mananjadhav commented on Feb 7, 2026

    @mananjadhav
    Collaborator

    @dylanexpensify I think it’s safe to close this one.

  14. melvin-bot commented on Feb 11, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  15. mananjadhav commented on Feb 15, 2026

    @mananjadhav
    Collaborator

    Quick bump @dylanexpensify

  16. melvin-bot commented on Feb 18, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  17. melvin-bot commented on Feb 19, 2026

    @melvin-bot

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

  18. mvtglobally commented on Feb 21, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Third week)

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

Metadata

Metadata

Labels

BugDailyExternalHelp Wanted

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions