Skip to content

[Due for payment 2026-01-23] Reports - Select all checkbox is not clickable when user can select the empty report #79610

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

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in with a new account.
  3. Create a workspace.
  4. Go to workspace chat.
  5. Create a report.
  6. Go to Reports > Reports.
  7. Select the empty report via checkbox.
  8. Click Select all checkbox.

Expected Result:

Select all checkbox should be clickable because user can select the empty report.

Actual Result:

Select all checkbox is not clickable when user can select the empty report.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7049414_1768427538486.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify

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 Jan 14, 2026
  2. melvin-bot commented on Jan 14, 2026

    @melvin-bot

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

  3. melvin-bot commented on Jan 14, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 14, 2026

    @melvin-bot

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

  5. github-actions commented on Jan 14, 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. OSBotify commented on Jan 14, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #75261 - "Can't select an empty report from the Reports > Reports page" by @lorretheboy (High confidence)
    Related Issues: Original issue fixed by PR: #70591

    Recommendation: ROLL FORWARD

    The fix is straightforward and surgical. PR #75261 successfully enabled empty report selection via individual checkboxes, but missed updating the "Select all" checkbox disabled state. The fix requires changing one line in src/components/Search/SearchList/index.tsx from disabled={flattenedItems.length === 0} to disabled={totalItems === 0} to account for empty reports.

    Reverting would reintroduce the original bug where users cannot select empty reports at all, which is worse than the current state where individual selection works but "Select all" doesn't.

    Labels: Removed DeployBlocker label. This is a frontend bug in App code - the fix needs to happen in the Expensify/App repository. Kept DeployBlockerCash to block the App deploy until this is resolved.

    Detailed Analysis

    Evidence

    PR #75261 was merged on 2026-01-14 at 16:33:39 UTC to fix issue #70591 where users couldn't select empty reports from the Reports page. The bug reported in this issue appeared in version 9.3.2-0, which includes PR #75261 in the deploy checklist.

    Root Cause

    The PR added support for selecting empty reports by:

    1. Creating a separate emptyReports array to track reports with no transactions
    2. Updating selectedItemsLength to count selected empty reports
    3. Updating totalItems to include both empty reports and transactions

    However, line 508 in src/components/Search/SearchList/index.tsx still uses the old logic:

    disabled={flattenedItems.length === 0}

    The problem is that flattenedItems only contains transactions (line 195: data.flatMap((item) => item.transactions)), not empty reports. When a user has ONLY empty reports (which they can now individually select), flattenedItems.length is 0, causing the "Select all" checkbox to be disabled even though totalItems (which correctly includes empty reports) is greater than 0.

    Verification

    1. Files affected: The bug occurs in the Reports search list when selecting empty reports

    2. PR modifies these files:

      • src/components/Search/SearchList/index.tsx - Contains the buggy line 508
      • src/components/Search/index.tsx - Added empty report selection logic
      • src/components/Search/SearchContext.tsx - Updated selected reports filtering
    3. Code evidence: In SearchList/index.tsx:

      • Line 195: flattenedItems only contains transactions, excludes empty reports
      • Line 199-204: emptyReports separately tracks reports with 0 transactions
      • Line 224-234: totalItems correctly counts both empty reports AND transactions
      • Line 508: "Select all" checkbox uses outdated flattenedItems.length === 0 instead of totalItems === 0

    Proposed Fix

    Change line 508 in src/components/Search/SearchList/index.tsx from:

    disabled={flattenedItems.length === 0}

    To:

    disabled={totalItems === 0}

    This makes the "Select all" checkbox use the same logic as the checkbox state calculations, properly accounting for empty reports.

  7. luacmartins commented on Jan 14, 2026

    @luacmartins
    Contributor
  8. IuliiaHerets commented on Jan 15, 2026

    @IuliiaHerets

    This issue is not reproduced anymore in the latest build

    Screen.Recording.2026-01-15.at.18.20.33.mp4
  9. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 16, 2026
  10. changed the title [-]Reports - Select all checkbox is not clickable when user can select the empty report[/-] [+][Due for payment 2026-01-23] Reports - Select all checkbox is not clickable when user can select the empty report[/+] on Jan 16, 2026
  11. melvin-bot commented on Jan 16, 2026

    @melvin-bot

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

  12. melvin-bot commented on Jan 16, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.3-8 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-01-23. 🎊

  13. melvin-bot commented on Jan 16, 2026

    @melvin-bot

    @luacmartins @trjExpensify 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

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions