Skip to content

Describe search - category: filter is applied when searching for expense with no category #102190

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.93-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #94217
Email or phone of affected tester (no customers): jsdoijnodsdisojo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Spend > Expenses.
  3. Open Filters > Describe your search.
  4. Type look for expense with no category.

Expected Result:

category:none filter will be applied.

Actual Result:

category: keyword filter is applied when searching for expense with no category.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7268230_1790255583123.6.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7268230

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 24, 2026
  2. applause-bot commented on Sep 24, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/205eaf687d5b71907e5d04614b8b4c60e29f07544e9133aa2f0bbe263a99e8f8

  3. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #94217

  4. github-actions commented on Sep 24, 2026

    @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.
  5. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    @carlosmiceli @truph01 you have been assigned to this deploy blocker because you reviewed the offending PR: #94217

  6. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    @marcaaron you have been assigned to this deploy blocker because you authored the offending PR: #94217

  7. melvin-bot commented on Sep 24, 2026

    @melvin-bot

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

  8. MelvinBot commented on Sep 24, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (App PR shipped the feature) — but the defective logic itself is not in App code; it lives in the backend natural-language parsing service
    Causing PR: [Payment due @truph01] Add natural language filter entry point to Spend page - by @marcaaron (High confidence that this PR exposed the feature; High confidence that the wrong query text is produced server-side)
    Related Issues: None found

    Recommendation: ROLL FORWARD

    The App never builds the search query — it sends the typed sentence to the backend and navigates to whatever query string the backend hands back, so category:none vs. a bare category:/keyword filter is decided entirely server-side. A small server-side parsing/prompt fix is much cheaper than reverting the whole feature PR, and it needs no App deploy; revert #94217 only if that server-side fix can't land before the deploy.

    Assigned: @marcaaron (PR author), @carlosmiceli and @truph01 (approving reviewers) from the causing PR — already assigned by Melvin
    Labels: No changes. DeployBlockerCash is kept (an App PR shipped the affected feature and the issue is not reproducible on production). DeployBlocker was never applied, so nothing to remove.

    📋 Detailed Analysis

    Evidence

    • The "Describe your search" entry point, the ParseExpenseFilters API call, and the screen at /search/filters/describe were all added by #94217 (merged 2026-09-24 12:08 UTC, part of the 9.4.93-0 staging checklist). It is the only PR in this release that touches this code path.
    • Reproducible on staging only; the reporter notes the feature does not exist in production — consistent with a brand-new feature PR in this deploy.
    • The App side of the feature contains no query-building logic at all. In SearchNLFilterContent.tsx#L63-L71 the App calls parseExpenseFilters(...), pulls the q parameter straight out of the URL the backend returns, and navigates to it verbatim:
      const searchQuery = new URL(result.searchURL).searchParams.get('q') ?? '';
      onSuccess(ROUTES.SEARCH_ROOT.getRoute({query: searchQuery}));
    • The only data the App sends is the raw sentence, the policy ID, and today's date — see ParseExpenseFiltersParams.ts and Search.ts#L1056-L1067. There is no client-side mapping of phrases like "no category" to a filter value.

    Verification

    • Files owned by the feature on the App side: src/components/Search/FilterComponents/AdvancedFilters/SearchNLFilterContent.tsx, src/pages/Search/SearchNLFilterPage.tsx, src/components/Search/FilterDropdowns/SearchAdvancedFiltersPopup/index.tsx, src/libs/actions/Search.ts (parseExpenseFilters), src/libs/API/parameters/ParseExpenseFiltersParams.ts. All of these are created or modified by #94217 — confirmed via the PR file list and via the commit history of SearchNLFilterContent.tsx, whose only commits come from that PR's branch.
    • The App does correctly support the expected output. category:none is a first-class value: CONST.SEARCH.CATEGORY_EMPTY_VALUE = 'none', it survives query→filter-form conversion in SearchQueryUtils.ts#L1752-L1765 (the value is explicitly re-appended even though it is not a real policy category), it is accepted by autocomplete validation in SearchAutocompleteUtils.ts#L235, and it renders as "No category" in SearchUIUtils.ts#L5825. So if the backend returned category:none, the App would apply and display it correctly.

    Root Cause

    The natural-language sentence → structured query translation is performed by the backend service behind the ParseExpenseFilters command, not by App code. For "look for expense with no category" it fails to emit the sentinel value category:none and instead emits a bare/keyword category: filter — most likely because the "unknown category → keyword fallback" behaviour (the same behaviour that correctly turns coffee over $20 into keyword:coffee) also swallows the literal none, since none is not a real category on the policy. The App faithfully applies whatever query comes back, so the symptom surfaces in the UI while the defect is server-side. A separate internal investigation/fix is needed on the backend; no App code change is required.

  9. 14 remaining items

  10. melvin-bot commented on Sep 28, 2026

    @melvin-bot

    @marcaaron Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. melvin-bot commented on Sep 30, 2026

    @melvin-bot

    @marcaaron Eep! 4 days overdue now. Issues have feelings too...

  12. melvin-bot commented on Oct 2, 2026

    @melvin-bot

    @marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  13. melvin-bot commented on Oct 3, 2026

    @melvin-bot

    @marcaaron Still overdue 6 days?! Let's take care of this!

  14. melvin-bot commented on Oct 6, 2026

    @melvin-bot

    @marcaaron 10 days overdue. I'm getting more depressed than Marvin.

  15. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @marcaaron this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  16. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @marcaaron 12 days overdue now... This issue's end is nigh!

  17. melvin-bot commented on Oct 12, 2026

    @melvin-bot

    This issue has not been updated in over 14 days. @marcaaron eroding to Weekly issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions