Skip to content

Expense- When bulk selecting two expenses and deleting one of them, selection mode is cleared #104657

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.16-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #103703
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Open the report.
  5. Click More > Switch to table view.
  6. Create two more expenses.
  7. Bulk select all expenses.
  8. Open any expense and delete it.
    → Selection mode persists.
  9. Open any expense and delete it.
    → Selection mode is clear when there is still one expense in table view.

Expected Result:

When bulk selecting two expenses and deleting one of them, selection mode will persist.

Actual Result:

When bulk selecting two expenses and deleting one of them, selection mode is cleared.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7292586_1792617209475.13.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7292586

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 21, 2026
  2. applause-bot commented on Oct 21, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/5f27633080f2b506fc8098c5f850caaa6259c4f83e89a50e2b4e1c27a8636005

  3. melvin-bot commented on Oct 21, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 21, 2026

    @melvin-bot

    @Beamanator @mountiny @lakchote @daledah you have been assigned to this deploy blocker because you reviewed the offending PR: #103703

  5. github-actions commented on Oct 21, 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.
  6. melvin-bot commented on Oct 21, 2026

    @melvin-bot

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

  7. MelvinBot commented on Oct 21, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Reapply "Add a More menu option to switch single-expense reports between expense view and table view" (high confidence). The auto-assignment is correct.

    Root cause: On wide layouts, MoneyReportHeaderActions clears the selection whenever transactionThreadReportID becomes set (index.tsx:65-71). When the report drops from 2 expenses to 1, that ID changes from undefined to a real ID, so the effect wipes the selection. The PR made a single expense a selectable row in table view and updated isTransactionThread on line 63, but it didn't update this effect.

    Recommendation: Roll forward with a one-line fix. Revert the PR only if the fix can't land quickly.

    useEffect(() => {
        if (!transactionThreadReportID || shouldUseTableViewForSingleExpense) {
            return;
        }
        clearSelectedTransactions(true);
    }, [transactionThreadReportID, shouldUseTableViewForSingleExpense]);
    Investigation details
    • transactionThreadReportID comes from useMoneyReportTransactionThread(). That context passes the raw ID, not the table-view-aware effectiveTransactionThreadReportID (MoneyReportTransactionThreadContext.tsx:43-56, useTransactionThreadReportID.ts:31-39).
    • This matches the repro. Going from 3 expenses to 2 (step 8) leaves the ID undefined, so the selection survives. Going from 2 to 1 (step 9) sets the ID and clears the selection.
    • The PR already keeps the selection for this case on narrow layouts (MoneyReportHeader.tsx:147-156). That explains why the bug was reported on desktop Chrome and Safari.
    • A remount doesn't explain it. MoneyRequestReportView keeps rendering MoneyRequestReportActionsList at 1 expense because shouldUseTableViewForSingleExpense stays true.
    • The fix adds shouldUseTableViewForSingleExpense to the dependency list, so switching back to expense view still clears the selection. Another option is to read effectiveTransactionThreadReportID here instead.
    • Add a test next to tests/ui/components/MoneyReportHeaderActionsSingleExpenseTableViewTest.tsx that goes from 2 selected expenses to 1 in table view.
    • Other PRs in the StagingDeployCash checklist were ruled out. None of them change how the selection is cleared or how the transaction-thread ID is worked out.
    • Production isn't affected, because table view for single-expense reports is new in this PR.

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


    view run

  8. m-natarajan commented on Oct 22, 2026

    @m-natarajan

    Chrome / v9.5.16-1
    No Switch to table view option

    bandicam.2026-10-22.16-03-03-619.mp4
  9. Beamanator commented on Oct 22, 2026

    @Beamanator
    Contributor

    groovy, closing!

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.DeployBlockerCashThis issue or pull request should block deploymentEngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions