Skip to content

Subscription - The search bar display nothing after clicking "view payment history" #78539

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.88-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #78043
Email or phone of affected tester (no customers): poipio514+employee1@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 / Chrome
App Component: User Settings

Action Performed:

Precondition:

  1. Log in with an account that has an active Expensify subscription (I run the snippet in the steps execution)
  2. Navigate to account

steps:

  1. Open the Subscription page
  2. run the following in the JS console: Onyx.merge('account', {hasPurchases: true});
  3. Click View payment history

Expected Result:

the search bar should contains the query: type:expense merchant:Expensify

Actual Result:

The search bar display nothing after clicking "view payment history"

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 29, 2025
  2. samranahm commented on Dec 29, 2025

    @samranahm
    Contributor

    @jponikarchuk This is expected behaviour now since we apply the filter dynamically and not show the type:expense merchant:Expensify in search bar anymore, I forgot to update the test section on linked PR. We are good to close this one.

  3. daledah commented on Dec 29, 2025

    @daledah
    Contributor

    Proposal

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

    The search bar display nothing after clicking "view payment history"

    What is the root cause of that problem?

    The viewPurchases function navigated to the search page with a query but didn't set the search context flag that controls whether the search bar displays the query

    const viewPurchases = useCallback(() => {
    const query = buildQueryStringFromFilterFormValues({
    type: CONST.SEARCH.DATA_TYPES.EXPENSE,
    status: CONST.SEARCH.STATUS.EXPENSE.ALL,
    merchant: CONST.EXPENSIFY_MERCHANT,
    });
    // rawQuery is needed to populate rawFilterList, which prevents useSuggestedSearchDefaultNavigation from auto-redirecting to actionable searches.
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query, rawQuery: query}));
    }, []);

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

    Added setSearchContext(true) in viewPurchases before navigation so the search bar displays the query (type:expense merchant:Expensify).

        const viewPurchases = useCallback(() => {
            const query = buildQueryStringFromFilterFormValues({
                type: CONST.SEARCH.DATA_TYPES.EXPENSE,
                status: CONST.SEARCH.STATUS.EXPENSE.ALL,
                merchant: CONST.EXPENSIFY_MERCHANT,
            });
    
            // Set search context to show the query in the search bar
            setSearchContext(true);
    
            // rawQuery is needed to populate rawFilterList, which prevents useSuggestedSearchDefaultNavigation from auto-redirecting to actionable searches.
            Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query, rawQuery: query}));
        }, []);
    

    const viewPurchases = useCallback(() => {
    const query = buildQueryStringFromFilterFormValues({
    type: CONST.SEARCH.DATA_TYPES.EXPENSE,
    status: CONST.SEARCH.STATUS.EXPENSE.ALL,
    merchant: CONST.EXPENSIFY_MERCHANT,
    });
    // rawQuery is needed to populate rawFilterList, which prevents useSuggestedSearchDefaultNavigation from auto-redirecting to actionable searches.
    Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query, rawQuery: query}));
    }, []);

    What alternative solutions did you explore? (Optional)

    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. mountiny commented on Dec 30, 2025

    @mountiny
    Contributor

    @samranahm @nkuoch @trjExpensify Isnt it a bit confusing if we do not show anything in the search bar? How will the user know what its showing to them

  5. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 30, 2025
  6. melvin-bot commented on Dec 30, 2025

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (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.

  7. samranahm commented on Dec 30, 2025

    @samranahm
    Contributor

    Agree with @mountiny, this was actually the existing behavior before #78043, so we keep it as-is to maintains consistency. If needed, I can raise a PR shortly to handle this.
    cc: @eVoloshchak what you think.

  8. melvin-bot commented on Jan 3, 2026

    @melvin-bot

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

  9. laurenreidexpensify commented on Jan 5, 2026

    @laurenreidexpensify
    Contributor

    @trjExpensify @JmillsExpensify do you have any feedback on this whether it's expected and therefore we should keep it this way, or it's an opportunity to optimise?

  10. trjExpensify commented on Jan 6, 2026

    @trjExpensify
    Contributor

    The PR for #77537 was fundamentally a bug with the search result changing to something different on navigating.

    More broadly, the update to not having query language in the search bar by default anymore did this I assume. I don't think we need to do anything here though. I can see the screenshot has Filters (1) and so within the filters sidebar, the Merchant field will be populated with "Expensify".

    Happy to defer to @JmillsExpensify though!

  11. JmillsExpensify commented on Jan 6, 2026

    @JmillsExpensify
    Contributor

    Agree with Tom!

  12. trjExpensify commented on Jan 6, 2026

    @trjExpensify
    Contributor

    Let's close it then!

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions