You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Describe search - Oops... Something went wrong shown when searching on Reports #102192
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: - 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:
Go to staging.new.expensify.com
Go to Spend > Reports.
Open Filters > Describe your search.
Type report more than RM11.00 > click Apply.
Expected Result:
Search will be performed without issue.
Actual Result:
Oops... Something went wrong shown when searching on Reports.
👋 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:
Identify the pull request that introduced this issue and revert it.
The "Describe your search" entry point is brand new in 9.4.93-0 and has already produced six separate deploy blockers on this checklist; reverting the entry point is a clean, additive-only rollback that unblocks the deploy while the natural-language parsing is hardened.
Assigned: @marcaaron (PR author), @carlosmiceli (approving reviewer), @truph01 (approving reviewer) from highest-confidence causing PR only Labels: No changes. DeployBlockerCash is kept (an App PR introduced the feature and the fix/revert lands in Expensify/App). DeployBlocker was not present, so nothing was removed.
📋 Detailed Analysis
Evidence
The bug is staging-only and the reporter marked it N/A - new feature, doesn't exist in prod. The "Describe your search" feature was introduced by #94217, which is item 66 (the last App PR) in the 9.4.93-0 checklist and merged at 2026-09-24T12:08:32Z — about two hours before this issue was filed at 14:12Z.
Five sibling deploy blockers filed by the same tester in the same window all exercise the identical Filters > Describe your search entry point, and #102193 / #102190 explicitly name #94217 in the "caught during regression testing" field. #102193 is the same RM-prefixed amount scenario on the Expenses tab, where the amount filter is silently dropped instead of erroring.
No other PR in the checklist touches the natural-language search path. #101575 (Search query resolution) and #101759 (Enter-to-submit) touch Search, but neither introduces the describe/parse flow — #101759 merged at 13:57Z, after the staging build was cut.
git log confirms SearchNLFilterContent.tsx and SearchNLFilterPage.tsx were both created on the marcaaron-nl-filters-ui branch and first reached main in merge commit 031e94e for #94217. The exact string in the report matches common.genericErrorMessage ("Oops... something went wrong and your request could not be completed. Please try again later."), and the only place that string is rendered anywhere in the Search UI is SearchNLFilterContent.tsx#L78 — so the failure is inside this PR's submit handler, not a generic Search page error.
Root Cause
The natural-language → structured-query translation itself is done server-side by the ParseExpenseFilters API command; the App only posts the raw text and consumes whatever URL comes back. The App-side handling of that response is what turns a bad/unsupported parse into a hard "Oops" instead of a usable result:
No data-type context is sent.handleSubmit only forwards nlQuery and a policyID; the payload type has no field for the current data type or groupBy (ParseExpenseFiltersParams.ts). So a report-level phrase typed on the Reports tab ("report more than RM11.00") is parsed with no knowledge that the user is on a report-grouped search, which is why this reproduces on Reports while the equivalent expense-level phrasing on the Expenses tab merely drops the amount (#102193).
The returned URL is parsed unguarded.Line 70 does new URL(result.searchURL).searchParams.get('q'). new URL() throws TypeError: Invalid URL for any non-absolute or malformed value, and the response is never validated before this call.
Every in-handler throw collapses into the generic error.parseExpenseFilters already swallows its own rejections (.catch(() => ({success: false, message: ''}))), so the component's .catch at lines 76-79 can only ever fire for an exception thrown inside the .then body — i.e. the new URL(...) call. That is the "Oops... Something went wrong" the tester sees. The mirror-image gap is on line 73: setErrorMessage(result.message) with no fallback, so an empty server message renders no feedback at all.
Because the parsing quality itself lives behind the API, a targeted App-side fix (validating result.searchURL, sending the active data type / groupBy, and falling back to a real message) would only convert the crash into a graceful "I couldn't understand that" — it would not make report more than RM11.00 actually work. Combined with the five sibling blockers from the same feature, reverting #94217 is the lower-risk path: it is purely additive (a new route, screen, component, API wrapper and copy), so the revert is clean, and the feature can re-land once the parsing handles non-USD currency prefixes and report-level queries.
Correction: this supersedes my earlier comment. The revert recommendation stands, but the root cause there (an unguarded new URL() throw) was wrong. Live reproduction shows the URL parses fine — the error comes from the Search API rejecting the generated query.
Root cause: the "Describe your search" parser generates an amount> filter for a Reports search, but amount is not a valid filter for type:expense-report — reports use total. The backend Search command rejects the query and the results page renders "Oops... Something went wrong".
The RM currency prefix is a red herring. I reproduced live: report more than RM11.00 and the control report more than 11.00 produce the identical query and the identical failure. Any amount phrase on the Reports tab breaks.
Recommendation: revert #94217. It is purely additive (route, page, component, API wrapper, copy) so it reverts cleanly, and it is behind six open blockers on this checklist — 102174, 102186, 102187, 102190, this one, and 102193. The parse quality itself lives in the backend ParseExpenseFilters command, so App alone cannot make these queries correct before the deploy.
Investigation details
Why amount is invalid on Reports. The per-type filter allowlist gives type:expense-report the TOTAL, AMOUNT_DEBITED, and AMOUNT_REIMBURSED keys — never AMOUNT, which belongs to expense and invoice: src/hooks/useAdvancedSearchFilters.ts:76-104. So the NL flow emits a filter the normal Reports UI can never produce.
Why the parser doesn't know it is on Reports. The request payload carries only the raw text, the policy, and today's date — no data type, no searchKey, no groupBy:
With no type context the backend always parses at expense level, so more than 11.00 becomes amount>1100 even though the user is on the Reports tab.
Why it surfaces as a full error page.SearchNLFilterContent.tsx:63-74 navigates straight to whatever q the server returns, with no check that the filters are legal for the active data type. The invalid query only fails later, at POST /api/Search, where nothing can recover it.
Alternative explanations ruled out.
Currency-symbol parsing bug — ruled out by the control query, which omits RM and fails identically.
Unguarded new URL() throw — ruled out: the app successfully navigated to /search?q=…, so result.searchURL was a valid absolute URL and no throw occurred.
Empty account / no reports — ruled out: the same search with the amount filter removed returns 200 and the normal empty state.
Reproduction environment. Verified on NewDot web with a fresh account. The generated query, the 402, and the error screen match the Applause report on staging exactly.
Minimum viable fix, if reverting is rejected. Pass the active data type (or searchKey) in the ParseExpenseFilters payload so the backend can emit total> for report searches, and validate the returned query's filter keys against the active type's allowlist before navigating — falling back to an inline "couldn't understand that" message instead of a hard error page. The backend change is required for the query to actually work, so this cannot be fixed in App alone.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/102192) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
@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!
Activity
applause-bot commentedon Sep 24, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/854d1ae42f7bf7a15fcca1deb53a8f95a5fe2610cfd132fee61c565d9abe4d09
github-actions commentedon Sep 24, 2026
👋 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:
melvin-bot commentedon Sep 24, 2026
Triggered auto assignment to @luacmartins (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Sep 24, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Sep 24, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: [Payment due @truph01] Add natural language filter entry point to Spend page - by @marcaaron (High confidence)
Related Issues: Spend - Enter key activates Apply button and also creates a new line, Android & iOS - Spend - Unable to scroll down Describe your search page in landscape, Spend- Unable to search for deleted expense, wrong filter when searching for approved expense, Describe search - category: filter is applied when searching for expense with no category, Describe search - Amount filter is not applied when searching for expenses with price range
Recommendation: REVERT
The "Describe your search" entry point is brand new in 9.4.93-0 and has already produced six separate deploy blockers on this checklist; reverting the entry point is a clean, additive-only rollback that unblocks the deploy while the natural-language parsing is hardened.
Assigned: @marcaaron (PR author), @carlosmiceli (approving reviewer), @truph01 (approving reviewer) from highest-confidence causing PR only
Labels: No changes.
DeployBlockerCashis kept (an App PR introduced the feature and the fix/revert lands inExpensify/App).DeployBlockerwas not present, so nothing was removed.📋 Detailed Analysis
Evidence
N/A - new feature, doesn't exist in prod. The "Describe your search" feature was introduced by #94217, which is item 66 (the last App PR) in the 9.4.93-0 checklist and merged at2026-09-24T12:08:32Z— about two hours before this issue was filed at14:12Z.Filters > Describe your searchentry point, and #102193 / #102190 explicitly name #94217 in the "caught during regression testing" field. #102193 is the sameRM-prefixed amount scenario on the Expenses tab, where the amount filter is silently dropped instead of erroring.13:57Z, after the staging build was cut.Verification
Affected files, all added or modified by #94217:
src/components/Search/FilterComponents/AdvancedFilters/SearchNLFilterContent.tsx— the "Describe your search" panel and its submit handler (added by the PR).src/libs/actions/Search.ts#L1063-L1074—parseExpenseFilters, theParseExpenseFiltersAPI wrapper (added by the PR).src/libs/API/parameters/ParseExpenseFiltersParams.ts— the request payload (added by the PR).git logconfirmsSearchNLFilterContent.tsxandSearchNLFilterPage.tsxwere both created on themarcaaron-nl-filters-uibranch and first reachedmainin merge commit031e94efor #94217. The exact string in the report matchescommon.genericErrorMessage("Oops... something went wrong and your request could not be completed. Please try again later."), and the only place that string is rendered anywhere in the Search UI isSearchNLFilterContent.tsx#L78— so the failure is inside this PR's submit handler, not a generic Search page error.Root Cause
The natural-language → structured-query translation itself is done server-side by the
ParseExpenseFiltersAPI command; the App only posts the raw text and consumes whatever URL comes back. The App-side handling of that response is what turns a bad/unsupported parse into a hard "Oops" instead of a usable result:No data-type context is sent.
handleSubmitonly forwardsnlQueryand apolicyID; the payload type has no field for the current data type orgroupBy(ParseExpenseFiltersParams.ts). So a report-level phrase typed on the Reports tab ("report more than RM11.00") is parsed with no knowledge that the user is on a report-grouped search, which is why this reproduces on Reports while the equivalent expense-level phrasing on the Expenses tab merely drops the amount (#102193).The returned URL is parsed unguarded. Line 70 does
new URL(result.searchURL).searchParams.get('q').new URL()throwsTypeError: Invalid URLfor any non-absolute or malformed value, and the response is never validated before this call.Every in-handler throw collapses into the generic error.
parseExpenseFiltersalready swallows its own rejections (.catch(() => ({success: false, message: ''}))), so the component's.catchat lines 76-79 can only ever fire for an exception thrown inside the.thenbody — i.e. thenew URL(...)call. That is the "Oops... Something went wrong" the tester sees. The mirror-image gap is on line 73:setErrorMessage(result.message)with no fallback, so an empty server message renders no feedback at all.Because the parsing quality itself lives behind the API, a targeted App-side fix (validating
result.searchURL, sending the active data type /groupBy, and falling back to a real message) would only convert the crash into a graceful "I couldn't understand that" — it would not makereport more than RM11.00actually work. Combined with the five sibling blockers from the same feature, reverting #94217 is the lower-risk path: it is purely additive (a new route, screen, component, API wrapper and copy), so the revert is clean, and the feature can re-land once the parsing handles non-USD currency prefixes and report-level queries.MelvinBot commentedon Sep 24, 2026
Deploy blocker analysis
Root cause: the "Describe your search" parser generates an
amount>filter for a Reports search, butamountis not a valid filter fortype:expense-report— reports usetotal. The backendSearchcommand rejects the query and the results page renders "Oops... Something went wrong".Causing PR: [Payment due @truph01] Add natural language filter entry point to Spend page by
marcaaron, merged 2026-09-24 12:08 UTC — the last App PR in the 9.4.93-0 checklist, and the only one touching this path.The
RMcurrency prefix is a red herring. I reproduced live:report more than RM11.00and the controlreport more than 11.00produce the identical query and the identical failure. Any amount phrase on the Reports tab breaks.qSearchresultreport more than RM11.00type:expense-report sortBy:date sortOrder:desc amount>1100report more than 11.00(control)type:expense-report sortBy:date sortOrder:desc amount>1100type:expense-report sortBy:date sortOrder:descRecommendation: revert #94217. It is purely additive (route, page, component, API wrapper, copy) so it reverts cleanly, and it is behind six open blockers on this checklist — 102174, 102186, 102187, 102190, this one, and 102193. The parse quality itself lives in the backend
ParseExpenseFilterscommand, so App alone cannot make these queries correct before the deploy.Investigation details
Why
amountis invalid on Reports. The per-type filter allowlist givestype:expense-reporttheTOTAL,AMOUNT_DEBITED, andAMOUNT_REIMBURSEDkeys — neverAMOUNT, which belongs toexpenseandinvoice:src/hooks/useAdvancedSearchFilters.ts:76-104. So the NL flow emits a filter the normal Reports UI can never produce.Why the parser doesn't know it is on Reports. The request payload carries only the raw text, the policy, and today's date — no data type, no
searchKey, nogroupBy:src/libs/API/parameters/ParseExpenseFiltersParams.ts:1-5src/libs/actions/Search.ts:1059With no type context the backend always parses at expense level, so
more than 11.00becomesamount>1100even though the user is on the Reports tab.Why it surfaces as a full error page.
SearchNLFilterContent.tsx:63-74navigates straight to whateverqthe server returns, with no check that the filters are legal for the active data type. The invalid query only fails later, atPOST /api/Search, where nothing can recover it.Alternative explanations ruled out.
RMand fails identically.new URL()throw — ruled out: the app successfully navigated to/search?q=…, soresult.searchURLwas a valid absolute URL and no throw occurred.Reproduction environment. Verified on NewDot web with a fresh account. The generated query, the 402, and the error screen match the Applause report on staging exactly.
Minimum viable fix, if reverting is rejected. Pass the active data type (or
searchKey) in theParseExpenseFilterspayload so the backend can emittotal>for report searches, and validate the returned query's filter keys against the active type's allowlist before navigating — falling back to an inline "couldn't understand that" message instead of a hard error page. The backend change is required for the query to actually work, so this cannot be fixed in App alone.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/102192)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run · no recording available
14 remaining items
melvin-bot commentedon Sep 28, 2026
@marcaaron Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 30, 2026
@marcaaron Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Oct 2, 2026
@marcaaron Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Oct 3, 2026
@marcaaron Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Oct 6, 2026
@marcaaron 10 days overdue. Is anyone even seeing these? Hello?
melvin-bot commentedon Oct 8, 2026
@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!
melvin-bot commentedon Oct 8, 2026
@marcaaron 12 days overdue. Walking. Toward. The. Light...
melvin-bot commentedon Oct 12, 2026
This issue has not been updated in over 14 days. @marcaaron eroding to Weekly issue.