Skip to content

[Payment due @truph01] Add natural language filter entry point to Spend page (re-PR with deploy blocker fixes) - #102237

Merged
marcaaron merged 24 commits into
mainfrom
marcaaron-nl-filters-ui
Oct 21, 2026
Merged

marcaaron merged 24 commits into
mainfrom
marcaaron-nl-filters-ui

Conversation

@marcaaron

@marcaaron marcaaron commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Re-PR of the NL filters feature that was reverted from staging after QA found 9 deploy blockers. This addresses the 4 App-side blockers; 5 backend parsing fixes land in a companion Web-Expensify PR (https://github.com/Expensify/Web-Expensify/pull/56459).

Changes from the original reverted version:

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/647828
$ #102200
$ https://github.com//Expensify/App/issues/102174

Tests

  1. Sign in with an account on the nlFilters beta.
  2. Navigate to the Spend page and open Advanced Filters.
  3. Verify "Describe your search" appears at the top of the filter list.
  4. Click "Describe your search" and verify the Apply button is disabled while the input is empty.
  5. Type any text and verify Apply becomes enabled.
  6. On web, press Enter and verify the filter submits with no newline added to the input.
  7. On mobile, rotate to landscape and verify the input area scrolls and Apply is reachable.
  8. Sign in with an account NOT on the nlFilters beta.
  9. Open Advanced Filters and verify "Describe your search" does not appear.
  • Verify that no errors appear in the JS console

Offline tests

No offline behavior to test -- the NL filter requires a network call to parse the query; that already shows a loading state and the button is disabled while loading.

QA Steps

Scenario 1: Feature hidden for non-beta users

  1. Sign in with an account that does not have the nlFilters beta enabled.
  2. Navigate to Spend.
  3. Open Advanced Filters.
  4. Verify "Describe your search" does not appear.

Scenario 2: Apply button disabled when input is empty

  1. Sign in with an account on the nlFilters beta.
  2. Open "Describe your search".
  3. Verify the Apply button is disabled.
  4. Type text.
  5. Verify Apply is enabled.
  6. Clear all text.
  7. Verify Apply is disabled again.

Scenario 3: Enter key submits on web

  1. Open "Describe your search" in a web browser.
  2. Type "card spend last month".
  3. Press Enter.
  4. Verify results appear with no newline added to the input.

Scenario 4: Landscape scroll on mobile

  1. Rotate device to landscape.
  2. Open "Describe your search".
  3. Verify the input and description text are scrollable and the Apply button is visible and tappable.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Scenario 1 — non-beta: no Describe your search

Scenario 1 — beta enabled: Describe your search visible

Scenario 2a — Apply disabled when input empty

Scenario 2b — Apply enabled after typing

Scenario 3 — Enter submits, card+date filters applied

Scenario 4 — Landscape: input and Apply visible and accessible

- Add CONST.BETAS.NL_FILTERS and gate the "Describe your search" entry point
  in the popup and full-screen page so only opted-in users see the feature
- Disable the Apply button when the input is empty (#102200)
- Call e.preventDefault() on Enter to stop newline insertion on web (#102174)
- Wrap input section in ScrollView so the page scrolls in landscape (#102186)
Wrap new URL() in a try-catch so a malformed searchURL shows a proper
error message instead of propagating to the outer catch handler and
showing the generic "Something went wrong" toast.
# Conflicts:
#	src/components/Search/FilterComponents/AdvancedFilters/SearchNLFilterContent.tsx
#	src/components/Search/FilterDropdowns/SearchAdvancedFiltersPopup/index.tsx
#	src/pages/Search/SearchNLFilterPage.tsx
@marcaaron marcaaron self-assigned this Sep 25, 2026
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 95.90% <ø> (ø)
src/ROUTES.ts 33.63% <ø> (+0.96%) ⬆️
src/SCREENS.ts 100.00% <ø> (ø)
src/libs/API/types.ts 100.00% <ø> (ø)
...gation/AppNavigator/ModalStackNavigators/index.tsx 7.47% <ø> (-0.02%) ⬇️
src/libs/Navigation/linkingConfig/config.ts 62.50% <ø> (ø)
...h/SearchPageHeader/SearchAdvancedFiltersButton.tsx 68.00% <0.00%> (ø)
src/libs/actions/Search.ts 66.80% <0.00%> (-0.47%) ⬇️
...hAdvancedFiltersPage/SearchAdvancedFiltersBase.tsx 0.00% <0.00%> (ø)
...lterDropdowns/SearchAdvancedFiltersPopup/index.tsx 86.48% <68.96%> (-11.67%) ⬇️
... and 2 more
... and 454 files with indirect coverage changes

…d main

The merge with main (which had the NL filters revert) removed:
- parseExpenseFilters function and PARSE_EXPENSE_FILTERS command from API types
- ParseExpenseFiltersParams type
- search.filters.describeSearch translation keys
- Imports, hook calls, and helpers in SearchAdvancedFiltersPopup
- closeOverlay prop threading through SearchAdvancedFiltersButton

Re-adds all of the above so typecheck passes.
@OSBotify

This comment has been minimized.

Adds SEARCH_NL_FILTER route and NL_FILTER_RHP screen, registers the
page in the modal navigator, adds linking config, updates nav types,
and adds a beta-gated "Describe your search" button to the mobile
advanced filters page.
@marcaaron
marcaaron requested a review from truph01 September 25, 2026 07:19
@marcaaron
marcaaron marked this pull request as ready for review September 25, 2026 07:19
@marcaaron
marcaaron requested review from a team as code owners September 25, 2026 07:19
@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and marufsharifi and removed request for a team September 25, 2026 07:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T07:37:16.655387Z 0e79064 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@marcaaron marcaaron changed the title Add natural language filter entry point to Spend page (re-PR with deploy blocker fixes) [HOLD Web-Expensify/pull/56459] Add natural language filter entry point to Spend page (re-PR with deploy blocker fixes) Sep 25, 2026
@marcaaron
marcaaron removed the request for review from marufsharifi September 25, 2026 07:20
@Expensify Expensify deleted a comment from melvin-bot Bot Sep 25, 2026

@JmillsExpensify JmillsExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e790645b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/libs/actions/Search.ts Resolved
@melvin-bot

melvin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

@puneetlath Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@truph01

truph01 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@carlosmiceli Could you continue reviewing it?

@marcaaron

Copy link
Copy Markdown
Contributor Author

@carlosmiceli thanks, updated!

@puneetlath
puneetlath removed their request for review October 21, 2026 15:04
@marcaaron
marcaaron merged commit daf6ca5 into main Oct 21, 2026
43 of 44 checks passed
@marcaaron
marcaaron deleted the marcaaron-nl-filters-ui branch October 21, 2026 17:40
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 marcaaron has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/marcaaron in version: 9.5.16-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. Every user-facing change in this PR, including the "Describe your search" entry point and page, only appears for accounts on the nlFilters beta. Docs can be updated when that beta is removed.

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker #104631 was identified to be related to this PR.

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #104642 was identified to be related to this PR.

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker #104658 was identified to be related to this PR.

@unzig21

unzig21 commented Oct 22, 2026

Copy link
Copy Markdown

Deploy Blocker #104683 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/marcaaron in version: 9.5.18-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 cancelled 🔪

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed: the new "Describe your search" entry point in Advanced Filters only shows to accounts on the new nlFilters beta (isBetaEnabled(CONST.BETAS.NL_FILTERS)), so we should document it when that beta is removed.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.18-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #104877

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants