Skip to content

[$250] Reports - Filters become unresponsive after deleting an expense on "Chats" section. #72383

Closed

Description

@jponikarchuk

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.29-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-1238/folder/13176922/41237507/945417882
Email or phone of affected tester (no customers): ibellicotest+1908@gmail.com
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 / Android 12 / Chrome ( mWeb / Hybrid app) - Windows 11 / Chrome
App Component: Search

Action Performed:

Prerequisite: Account has at least one workspace.

  1. Open the Expensify app.
  2. Open any workspace chat.
  3. Create a manual expense.
  4. Navigate to "Reports" > "Chats"
  5. Open the just created expense.
  6. Tap on "More" and delete it.
  7. Tap on any of the exposed filters on "Chats"
  8. Note that no action is triggered when tapping on the exposed filters.
  9. Navigate to another section and return to "Chats" again.
  10. Tap on any of the exposed filters.
  11. Note that filters become responsive again.

Expected Result:

User should still be able to apply any filter on "Chats" section on "Reports" after deleting an expense.

Actual Result:

Filters on "Chats" section on "Reports" become unresponsive after deleting an expense. User has to navigate to another section and return, to make filters responsive again.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021977984683964066103
  • Upwork Job ID: 1977984683964066103
  • Last Price Increase: 2025-12-09
Issue OwnerCurrent Issue Owner: @shubham1206agra

Activity

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

    @melvin-bot

    Triggered auto assignment to @RachCHopkins (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. abzokhattab commented on Oct 11, 2025

    @abzokhattab
    Contributor

    Proposal

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

    Filters become unresponsive after deleting an expense in the "Chats" section under "Reports".

    What is the root cause of that problem?

    • In navigateBackOnDeleteTransaction function , when the user is in the Search/Reports tab (SEARCH_FULLSCREEN_NAVIGATOR), the function detects this and dismisses the modal
    • However, it immediately returns early without completing the navigation flow
    • This leaves the Search page in an incomplete state where the UI doesn't properly re-render and filters become unresponsive
    • The user must navigate away and return to restore functionality

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

    inside the condition where we check for SEARCH_FULLSCREEN_NAVIGATORhere - we should remove the early return that skips the Navigation.goBack(backRoute) call

    • Ensure both Navigation.dismissModal() and Navigation.goBack() execute to properly clean up the navigation stack:
        if (lastFullScreenRoute?.name === NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR) {
            // When deleting from Search, we need to dismiss the modal AND navigate back properly
            // to avoid leaving the search page in an unresponsive state
            Navigation.dismissModal();
            Navigation.isNavigationReady().then(() => {
                Navigation.goBack(backRoute);
            });
            return;
        }

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

    NA

    What alternative solutions did you explore? (Optional)

    NA

  4. daledah commented on Oct 13, 2025

    @daledah
    Contributor

    Proposal

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

    Filters on "Chats" section on "Reports" become unresponsive after deleting an expense. User has to navigate to another section and return, to make filters responsive again.

    What is the root cause of that problem?

    After confirm delete, we navigate back when modal is not yet closed:

    setIsDeleteModalVisible(false);

    onBackButtonPress();

    So the confirm modal is forcefully removed from the component stack, lead to the cleanup logic here is not called properly:

    onModalWillHide={() => {
    // Reset willAlertModalBecomeVisible when modal is about to hide
    // This ensures it's cleared before any other components check its value
    if (areAllModalsHidden()) {
    willAlertModalBecomeVisible(false);
    }
    onModalWillHide?.();
    }}

    So willAlertModalBecomeVisible remains true, which prevents us from opening the dropdown button here:

    if (!previousValue && willAlertModalBecomeVisible) {
    return false;
    }

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

    We should navigate only after modal is closed.

    Remove this line

    onBackButtonPress();

    And use onModalHide prop instead:

    onModalHide={onBackButtonPress}

    Additional fix to prevent similar issues appear in the future:

    This logic

    if (!previousValue && willAlertModalBecomeVisible) {
    return false;
    }

    was added in #63996 to fix the issue where we can open 2 dropdown buttons at the same time. But it accidentally also affects behaviour if there's other modals. So we can limit the logic to only apply when DropdownButton is already rendered on screen.

    Add a previous value for willAlertModalBecomeVisible in DropdownButton:

    const prevWillAlertModalBecomeVisible = usePrevious(willAlertModalBecomeVisible);

    Then update here

    if (!previousValue && willAlertModalBecomeVisible) {
    return false;
    }

    if (!previousValue && willAlertModalBecomeVisible && prevWillAlertModalBecomeVisible === false) {

    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)

    NA

    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.

  5. RachCHopkins commented on Oct 14, 2025

    @RachCHopkins
    Contributor

    Took a while to repro but I got there!

  6. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 14, 2025
  7. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    Current assignee @RachCHopkins is eligible for the Bug assigner, not assigning anyone new.

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 14, 2025
  9. 35 remaining items

  10. melvin-bot commented on Nov 18, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  11. huult commented on Nov 21, 2025

    @huult
    Contributor

    I think this issue can’t be reproduced anymore because #75640
    has been merged, which uses the same solution I proposed: willAlertModalBecomeVisible(false); // add this back

  12. shubham1206agra commented on Nov 21, 2025

    @shubham1206agra
    Contributor

    @RachCHopkins Can you please close this issue?

  13. melvin-bot commented on Nov 25, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  14. mvtglobally commented on Nov 30, 2025

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  15. shubham1206agra commented on Dec 1, 2025

    @shubham1206agra
    Contributor

    @RachCHopkins Please close this issue.

  16. melvin-bot commented on Dec 2, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  17. melvin-bot commented on Dec 9, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

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.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions