Skip to content

[Due for payment 2026-01-27] Reports- All Data - report level disappears after exporting report via All Data - report level #79404

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.0-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: #77740
Email or phone of affected tester (no customers): sidjnsoijdosijndsoij2@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. Go to workspace chat.
  3. Create an expense.
  4. Go to Reports > Expenses.
  5. Select the expense via checkbox.
  6. Click dropdown button > Export.
  7. Click All Data - report level.
  8. Click Got it.
  9. Select the expense via checkbox.
  10. Click dropdown button > Export.

Expected Result:

All Data - report level will not disappear after exporting report via All Data - report level.

Actual Result:

All Data - report level disappears after exporting report via All Data - report level.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7047466_1768275224633.2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @bfitzexpensify

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

    @melvin-bot

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

  3. melvin-bot commented on Jan 13, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 13, 2026

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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 13, 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. mitarachim commented on Jan 13, 2026

    @mitarachim
    Author

    Unable to reproduce issue using Staging while Use Staging Server is disable

    Screen.Recording.2026-01-13.at.10.39.33.AM.mov
  7. OSBotify commented on Jan 13, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #77740 - "Refactor ConfirmModal usage to useConfirmModal in Search pages" by @nkdengineer (High confidence)
    Related Issues: None

    Recommendation: REVERT

    This PR introduced a timing issue in the export flow that causes the "All Data - report level" option to disappear after the first export. The bug is straightforward to understand and the PR can be cleanly reverted.

    📋 Detailed Analysis

    Evidence

    The issue is reproducible only on staging (not production), and PR #77740 was the last PR that modified the export flow in SearchPage.tsx before this issue appeared.

    Looking at the changes in beginExportWithTemplate function (lines 247-283 in the PR diff):

    1. The PR refactored from using ConfirmModal component to useConfirmModal hook
    2. The modal is shown AFTER calling queueExportSearchWithTemplate (line 271-276)
    3. When the user clicks "Got it", it calls clearSelectedTransactions(undefined, true) (line 280)

    Root Cause

    The "All Data - report level" export option only appears when ALL transactions on the report are selected. This is determined by:

    const includeReportLevelExport = allTransactionsLength === selectedTransactionIDs.length;

    The bug occurs because:

    1. User selects an expense and exports via "All Data - report level"
    2. After export, clearSelectedTransactions(undefined, true) is called immediately when user clicks "Got it"
    3. This clears the selection, so selectedTransactionIDs.length becomes 0
    4. includeReportLevelExport becomes false (since 0 !== allTransactionsLength)
    5. The export menu is rebuilt without the "All Data - report level" option

    The old code with ConfirmModal had the same logic but the timing was different. The new useConfirmModal implementation processes the confirmation callback in a way that triggers the menu rebuild before the user can interact with it again, making the disappearance immediately visible.

    The second parameter true in clearSelectedTransactions(undefined, true) appears to be causing the issue - this parameter likely controls whether to deselect all items, which is too aggressive after a successful export when the user might want to export again.

  8. 15 remaining items

  9. changed the title [-]Reports- All Data - report level disappears after exporting report via All Data - report level[/-] [+][Due for payment 2026-01-27] Reports- All Data - report level disappears after exporting report via All Data - report level[/+] on Jan 20, 2026
  10. melvin-bot commented on Jan 20, 2026

    @melvin-bot

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

  11. melvin-bot commented on Jan 20, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.4-6 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-27. 🎊

  12. melvin-bot commented on Jan 20, 2026

    @melvin-bot

    @roryabraham @bfitzexpensify 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]

  13. nkdengineer commented on Jan 22, 2026

    @nkdengineer
    Contributor

    @roryabraham Can I get the partial compensation since I provided the RCA and solution here?

  14. roryabraham commented on Jan 22, 2026

    @roryabraham
    Contributor

    No - in this case I independently solved the bug and didn't see your comment until after the PR was created.

  15. bfitzexpensify commented on Jan 27, 2026

    @bfitzexpensify
    Contributor

    Payment summary:

    @shubham1206agra due $250 via NewDot manual request

  16. garrettmknight commented on Apr 2, 2026

    @garrettmknight
    Contributor

    $250 approved for @shubham1206agra

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions