Skip to content

[Ready for payment][$250] Selection mode remains active after moving/removing the selected expense #69017

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.1.97-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @nyomanjyotisa
Slack conversation (hyperlinked to channel name): #Open source

Action Performed:

  1. Create a workspace with at least one report
  2. Create 3 expenses in the report
  3. Enable selection mode by using bulk actions on one expense
  4. Verify the expense is selected (shows selection count in header)
  5. Click on the selected expense to open its details
  6. Move/remove the expense from the report

Expected Result:

Selection mode should be automatically disabled since no selected expenses remain in the current report

Actual Result:

Selection mode remains active with incorrect count, showing the moved expense is still considered selected

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
New-Expensify.mp4
Recording.1546.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @dominictb
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021970540860514251690
  • Upwork Job ID: 1970540860514251690
  • Last Price Increase: 2025-09-23

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    on Aug 22, 2025
  2. melvin-bot commented on Aug 22, 2025

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (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. github-actions commented on Aug 22, 2025

    @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.
  4. melvin-bot commented on Aug 22, 2025

    @melvin-bot

    Triggered auto assignment to @luacmartins (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. melvin-bot commented on Aug 22, 2025

    @melvin-bot

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

  6. m-natarajan commented on Aug 22, 2025

    @m-natarajan
    Author

    Proposal by @nyomanjyotisa

    Proposal

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

    Selection mode remains active after moving/removing the selected expense

    What is the root cause of that problem?

    Currently we don't have any call to remove the transaction from the selected transactions list when moving transaction between reports

    changeTransactionsReport([transaction.transactionID], item.value, allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`]);

    changeTransactionsReport([transaction.transactionID], CONST.REPORT.UNREPORTED_REPORT_ID);

    Meanwhile in bulk operations, we call clearSelectedTransactions after moving transaction

    changeTransactionsReport(selectedTransactionsKeys, CONST.REPORT.UNREPORTED_REPORT_ID);
    clearSelectedTransactions();

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

    We can call removeTransaction for the moved transaction in both the handleRegularReportSelection and removeFromReport

        const {removeTransaction} = useSearchContext();
        ...
                if (isEditing) {
                    changeTransactionsReport([transaction.transactionID], item.value, allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`]);
                    removeTransaction(transaction.transactionID);
                }
        ...
    

    if (isEditing) {
    changeTransactionsReport([transaction.transactionID], item.value, allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`]);
    }

            InteractionManager.runAfterInteractions(() => {
                changeTransactionsReport([transaction.transactionID], CONST.REPORT.UNREPORTED_REPORT_ID);
                removeTransaction(transaction.transactionID);
            });
    

    InteractionManager.runAfterInteractions(() => {
    changeTransactionsReport([transaction.transactionID], CONST.REPORT.UNREPORTED_REPORT_ID);
    });

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    We can call clearSelectedTransactions(true) to clear all selected transaction

  7. 32 remaining items

  8. melvin-bot commented on Sep 23, 2025

    @melvin-bot

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

  9. added
    Daily
    and removed on Sep 23, 2025
  10. dominictb commented on Sep 23, 2025

    @dominictb
    Contributor

    Oops I was mistakenly assigned here. Unsubscribing from this thread.

  11. Julesssss commented on Sep 23, 2025

    @Julesssss
    Contributor

    PR was deployed a few weeks ago. @greg-schroeder could you please pay out @nyomanjyotisa when you have a moment

  12. changed the title [-][$250] Selection mode remains active after moving/removing the selected expense[/-] [+][Ready for payment][$250] Selection mode remains active after moving/removing the selected expense[/+] on Sep 23, 2025
  13. added
    Awaiting Payment
    and removed
    Help Wanted
    Reviewing
    on Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions