-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: added fix for free text with quick filter issue #9768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| currentPair.key && | ||
| (isConjunctionToken(token.type) || | ||
| (token.type === FilterQueryLexer.KEY && isQueryPairComplete(currentPair))) | ||
| (isConjunctionToken(token.type) || token.type === FilterQueryLexer.KEY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incomplete pairs create malformed filters with empty operators
The removal of isQueryPairComplete(currentPair) allows incomplete query pairs (free text without operators) to be returned by extractQueryPairs. However, convertExpressionToFilters processes all pairs without checking isComplete, creating filters with empty operators and values. When these filters are later converted back to expressions via convertFiltersToExpression, it produces malformed expressions like "keyname ''" (double space with empty quoted value), which could cause parsing errors or unexpected query behavior downstream.
π Summary
β Changes
Screen.Recording.2025-12-03.at.6.03.26.PM.mov
Note
Improves query parsing to retain incomplete free-text keys and updates filter value conversion to unquote quoted strings; adds a unit test for the scenario.
frontend/src/utils/queryContextUtils.ts)KEYtokens (regardless of completeness) to support free-text preceding valid filters.frontend/src/components/QueryBuilderV2/utils.ts)formatSingleValueForFilternow returns unquoted strings when values are quoted (viaisQuoted/unquote).frontend/src/utils/__tests__/queryContextUtils.test.ts)NOT INlist parsing.Written by Cursor Bugbot for commit 73fdacf. This will update automatically on new commits. Configure here.