Skip to content

[Due for payment 2025-04-02] [$250] mWeb - Reports - User has to use device´s back button to access the results of a search. #58162

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.1.11-1
Reproducible in staging?: Yes
Reproducible in production?: Yes

Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome
App Component: Search

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Tap on "Reports" on the bottom of the screen.
  3. Tap on "Search for something"
  4. Input any search that will trigger a result.
  5. When all the expenses are displayed again, use device´s back button.
  6. Check the results displayed after this action.

Expected Result:

Results of a search should be displayed automatically after triggering the search.

Actual Result:

User has to use device´s back button after triggering a search in "Reports" to see the results.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

View all open jobs on GitHub

Bug6766853_1741656257062.Results.mp4
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021900530783250150549
  • Upwork Job ID: 1900530783250150549
  • Last Price Increase: 2025-03-14
Issue OwnerCurrent Issue Owner: @abekkala

Activity

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

    @melvin-bot

    Triggered auto assignment to @abekkala (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 Mar 11, 2025

    @bernhardoj
    Contributor

    Proposal

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

    After entering a search, we need to go back to see the filtered search results.

    What is the root cause of that problem?

    When we submit the search input, submitSearch which navigates to search page is called twice.

    const submitSearch = useCallback(
    (queryString: SearchQueryString) => {
    const queryWithSubstitutions = getQueryWithSubstitutions(queryString, autocompleteSubstitutions);
    const updatedQuery = getQueryWithUpdatedValues(queryWithSubstitutions, queryJSON.policyID);
    if (!updatedQuery) {
    return;
    }
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: updatedQuery}));
    hideSearchRouterList?.();
    setIsAutocompleteListVisible(false);
    if (updatedQuery !== originalInputQuery) {
    clearAllFilters();
    setTextInputValue('');
    setAutocompleteQueryValue('');

    First when the text input onSubmit is triggered, and the 2nd one is when the focused item on the list is pressed (by ENTER key).

    } else if (item.searchItemType === CONST.SEARCH.SEARCH_ROUTER_ITEM_TYPE.SEARCH) {
    submitSearch(item.searchQuery);
    }

    onSubmit={() => {
    submitSearch(textInputValue);
    }}

    The 2nd call has an empty query because we already clear it in submitSearch.

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

    For non-native platforms, we will ignore the onSubmit callback, so it will only rely on the focused item press.

    onSubmit={() => {
    submitSearch(textInputValue);
    }}

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

    N/A

  4. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    @abekkala 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 Mar 14, 2025
  6. changed the title [-]mWeb - Reports - User has to use device´s back button to access the results of a search.[/-] [+][$250] mWeb - Reports - User has to use device´s back button to access the results of a search.[/+] on Mar 14, 2025
  7. melvin-bot commented on Mar 14, 2025

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

    @melvin-bot

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

  10. melvin-bot commented on Mar 18, 2025

    @melvin-bot

    @mananjadhav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  11. 16 remaining items

  12. melvin-bot commented on Mar 26, 2025

    @melvin-bot

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

  13. melvin-bot commented on Mar 26, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.18-4 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-04-02. 🎊

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

    • @mananjadhav requires payment through NewDot Manual Requests
    • @bernhardoj requires payment through NewDot Manual Requests
  14. melvin-bot commented on Mar 26, 2025

    @melvin-bot

    @mananjadhav @abekkala @mananjadhav 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]

  15. abekkala commented on Mar 26, 2025

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR APRIL 02

    • Fix: @bernhardoj [$250, if no regressions] - payment via NewDot
    • PR Review: @mananjadhav [$250, if no regressions]- payment via NewDot
      Please complete checklist
  16. abekkala commented on Apr 1, 2025

    @abekkala
    Contributor

    @mananjadhav can you please complete the checklist by tomorrow?

  17. mananjadhav commented on Apr 1, 2025

    @mananjadhav
    Collaborator

    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 (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. 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: fix navigate to detail page on enter for highlighted item #54807 (comment)

    • [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: NA

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

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

      Link to issue: https://github.com/Expensify/Expensify/issues/487118

    Regression Test Proposal

    Test:

    1. Open Reports from the bottom tab
    2. Press on the search input
    3. Type anything
    4. Press Enter or submit the search
    5. Verify it shows the search with the correct keyword

    Do we agree 👍 or 👎

    @abekkala I think the test should exist already for the same, but if it doesn't then here's the proposal to add one ^.

  18. melvin-bot commented on Apr 2, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@abekkala)

    • 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/1900530783250150549/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  19. abekkala commented on Apr 2, 2025

    @abekkala
    Contributor

    PAYMENT SUMMARY FOR APRIL 02

    THANK YOU! 🎉

  20. bernhardoj commented on Apr 3, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  21. JmillsExpensify commented on Apr 9, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  22. garrettmknight commented on Apr 10, 2025

    @garrettmknight
    Contributor

    $250 approved for @mananjadhav

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions