Skip to content

[Due for payment 2025-12-16] [$250] Reports - Selected state remains after the expense disappears from the page #74822

Closed

Description

@lanitochka17

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.49-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): biruknew45+66dsswdsdlhhj@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in with a new account
  3. Create a workspace
  4. In the workspace chat, create an expense (ensure it has no violations so that the Submit button appears in Reports)
  5. Navigate to Reports > Submit
  6. Click the Select All checkbox
  7. Click the Submit button from the right side of the report (not from the dropdown menu)

Expected Result:

The selection state should reset automatically

Actual Result:

The selection state remains active

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
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug7000580_1762868439075.bandicam_2025-11-11_15-57-09-792.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021990924724170294870
  • Upwork Job ID: 1990924724170294870
  • Last Price Increase: 2025-11-18
Issue OwnerCurrent Issue Owner: @JmillsExpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 11, 2025
  2. melvin-bot commented on Nov 11, 2025

    @melvin-bot

    Triggered auto assignment to @JmillsExpensify (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. daledah commented on Nov 11, 2025

    @daledah
    Contributor

    Proposal

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

    The selection state remains active

    What is the root cause of that problem?

    We are not clear selected when there is no item in the search page

    useEffect(() => {
    if (!isSearchResultsEmpty || prevIsSearchResultEmpty) {
    return;
    }
    turnOffMobileSelectionMode();
    }, [isSearchResultsEmpty, prevIsSearchResultEmpty]);

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

    We should clear selected when there is no item in the search page.

        const hasSelectedTransactions = Object.keys(selectedTransactions).length > 0; // or we can use the condition `!data.length` here
        ...
        useEffect(() => {
            if (!isSearchResultsEmpty || prevIsSearchResultEmpty || !hasSelectedTransactions) {
                return;
            }
            clearSelectedTransactions();
            turnOffMobileSelectionMode();
        }, [isSearchResultsEmpty, prevIsSearchResultEmpty, hasSelectedTransactions, clearSelectedTransactions]);
    

    useEffect(() => {
    if (!isSearchResultsEmpty || prevIsSearchResultEmpty) {
    return;
    }
    turnOffMobileSelectionMode();
    }, [isSearchResultsEmpty, prevIsSearchResultEmpty]);

    What alternative solutions did you explore? (Optional)

    Or we can create a new useEffect that will clear transactions when we don't have any selected transactions

        useEffect(() => {
            if (data.length > 0) {
                return;
            }
    
            if (Object.keys(selectedTransactions).length === 0) {
                return;
            }
    
            clearSelectedTransactions();
            turnOffMobileSelectionMode(); 
        }, [data.length, selectedTransactions, clearSelectedTransactions]);
    

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. melvin-bot commented on Nov 15, 2025

    @melvin-bot

    @JmillsExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 18, 2025
  6. changed the title [-]Reports - Selected state remains after the expense disappears from the page[/-] [+][$250] Reports - Selected state remains after the expense disappears from the page[/+] on Nov 18, 2025
  7. melvin-bot commented on Nov 18, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 18, 2025
  9. melvin-bot commented on Nov 18, 2025

    @melvin-bot

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

  10. JmillsExpensify commented on Nov 18, 2025

    @JmillsExpensify
    Contributor

    Opening up for proposals.

  11. 27 remaining items

  12. melvin-bot commented on Dec 9, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.73-5 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 2025-12-16. 🎊

    For reference, here are some details about the assignees on this issue:

    • @bernhardoj requires payment through NewDot Manual Requests
    • @paulnjs requires payment (Needs manual offer from BZ)
  13. melvin-bot commented on Dec 9, 2025

    @melvin-bot

    @bernhardoj @JmillsExpensify 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]

  14. bernhardoj commented on Dec 10, 2025

    @bernhardoj
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/65421/files#r2605656942

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Have a workspace

    Test:

    Web only

    1. Open a workspace chat, create an expense (ensure it has no violations so that the Submit button appears in Reports)
    2. Navigate to Reports > Submit
    3. Select the expense that's created in step 1
    4. Press the Submit button from the right side of the report (not from the dropdown menu)

    Do we agree 👍 or 👎

  15. melvin-bot commented on Dec 16, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@JmillsExpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1990924724170294870/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  16. JmillsExpensify commented on Dec 17, 2025

    @JmillsExpensify
    Contributor

    Payment:

  17. JmillsExpensify commented on Dec 17, 2025

    @JmillsExpensify
    Contributor

    @paulnjs Did you want to apply for the Upwork job?

  18. paulnjs commented on Dec 17, 2025

    @paulnjs
    Contributor

    @JmillsExpensify I applied to the job

  19. JmillsExpensify commented on Dec 17, 2025

    @JmillsExpensify
    Contributor

    Offer sent

  20. bernhardoj commented on Dec 17, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  21. JmillsExpensify commented on Dec 17, 2025

    @JmillsExpensify
    Contributor

    All set

  22. garrettmknight commented on Dec 29, 2025

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions