Skip to content

[Due for payment 2026-02-04] [$250] [Insights] [Release 1] Top Categories - Add a limit filter to search #80035

Description

@neil-marcellini

Add a limit parameter to the search query language to limit results shown in the insights we display.

  1. Add limit to parser grammar - src/libs/SearchParser/baseRules.peggy - Add limit rule similar to sortBy/sortOrder
  2. Generate the JS code by running these scripts
  3. Add limit to parser default values - src/libs/SearchParser/searchParser.peggy, defaultKey rule - because it’s a root level parameter; it controls query execution, not data filtering.
  4. Add limit to constants - src/CONST/index.ts - Add LIMIT: 'limit' to CONST.SEARCH.SYNTAX_ROOT_KEYS
  5. Add limit to type definitions - src/components/Search/types.ts - Add limit?: number to SearchQueryAST type
  6. Update query building functions - src/libs/SearchQueryUtils.ts - Add limit?: number to BuildQueryStringOptions type and include limit in query string building logic
  7. Update the autocomplete parser and filterOutRangesWithCorrectValue so that it properly highlights the limit in the user input
Issue OwnerCurrent Issue Owner: @trjExpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.WeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions