Skip to content

[Due for Payment - Dec 1st] [$250] Reports - App not respond when tap on filter option after delete the saved search #75274

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: v9.2.59-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-1996/folder/13176922/41237510/1016711299
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: iphone 16 pro/18.7.1
App Component: Search

Action Performed:

  1. Open app login with account have some reports
  2. Tap on Reports tab
  3. Tap on "Filters" button
  4. Select any option (can select option with no result)
  5. Tap Save
  6. Tap Save search
  7. Tap on the menu next to search box
  8. Scroll down to Saved section
  9. Tap on three dot of the saved search and delete
  10. Tap on arrow of Type: Expense, Status, Date, From

Expected Result:

App should respond when tap on Type: Expense, Status, Date, From

Actual Result:

App doesn't respond when tap on Type: Expense, Status, Date, From

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/~021990590934016391139
  • Upwork Job ID: 1990590934016391139
  • Last Price Increase: 2025-11-18
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

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

    @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.

  3. bernhardoj commented on Nov 17, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Filter popover doesn't show after deleting saved search.

    What is the root cause of that problem?

    This happens after #71048 which removes the code willAlertModalBecomeVisible(false) from hideModal and moves it to onModalWillHide.

    const hideModal = useCallback(
    (callHideCallback = true) => {
    shouldCallHideModalOnUnmount.current = false;
    if (areAllModalsHidden()) {
    if (shouldSetModalVisibility && !Navigation.isTopmostRouteModalScreen()) {
    setModalVisibility(false);
    }
    }

    When we delete the selected saved search, the delete confirm modal is immediately unmounted, leaving no time for the onModalWillHide to be called.

    setIsDeleteModalVisible(false);
    if (hashToDelete === currentSearchHash) {
    clearAdvancedFilters();
    Navigation.navigate(
    ROUTES.SEARCH_ROOT.getRoute({
    query: buildCannedSearchQuery(),
    }),
    );
    }

    We already have a logic to call hideModal when the modal is unmounted before calling the onModalHide, but since we don't call willAlertModalBecomeVisible(false) inside hideModal anymore, willAlertModalBecomeVisible value stays true.

    useEffect(
    () => () => {
    if (!shouldCallHideModalOnUnmount.current) {
    return;
    }
    hideModalCallbackRef.current?.(true);
    },

    const [willAlertModalBecomeVisible] = useOnyx(ONYXKEYS.MODAL, {selector: willAlertModalBecomeVisibleSelector, canBeMissing: true});
    /**
    * Toggle the overlay between open & closed
    */
    const toggleOverlay = useCallback(() => {
    setIsOverlayVisible((previousValue) => {
    if (!previousValue && willAlertModalBecomeVisible) {
    return false;
    }

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

    I can't really understand the root cause from the selected proposal of #70209 (comment), but we can add willAlertModalBecomeVisible(false) back to hideModal.

  4. trjExpensify commented on Nov 18, 2025

    @trjExpensify
    Contributor

    I can repro this. 👍

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 18, 2025
  6. changed the title [-]Reports - App not respond when tap on filter option after delete the saved search[/-] [+][$250] Reports - App not respond when tap on filter option after delete the saved search[/+] 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 - @dukenv0307 (External)

  10. dukenv0307 commented on Nov 18, 2025

    @dukenv0307
    Contributor

    @bernhardoj Did you test this issue, after bringing back willAlertModalBecomeVisible?

  11. 16 remaining items

  12. added and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 9, 2025
  13. trjExpensify commented on Dec 9, 2025

    @trjExpensify
    Contributor

    Automation failed. @dukenv0307 checklist time here!

  14. dukenv0307 commented on Dec 11, 2025

    @dukenv0307
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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/71048/files#r2609077358

    • [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. Yes

    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

    Test:

    1. Press on the Reports tab
    2. Press the "Filters" button
    3. Apply any filter and press Save search
    4. Press on the hamburger menu next to the search box
    5. Scroll down to the Saved section
    6. Delete the selected saved search
    7. Press on any filter button
    8. Verify the filter modal is shown

    Do we agree 👍 or 👎

  15. dukenv0307 commented on Dec 11, 2025

    @dukenv0307
    Contributor

    @trjExpensify I completed the checklist. Thanks

  16. trjExpensify commented on Dec 11, 2025

    @trjExpensify
    Contributor

    Thanks! Applause caught this in an existing regression test, so I'll forgo a new one.

    Payment summary as follows:

    Go ahead and request!

  17. moved this from MEDIUM or LOW to Done in [#whatsnext] #migrateon Dec 11, 2025
  18. bernhardoj commented on Dec 12, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  19. garrettmknight commented on Dec 18, 2025

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

  20. quinthar commented on Dec 19, 2025

    @quinthar
    Contributor

    Approved $250 to @dukenv0307

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 productionDailyKSv2ExternalAdded 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