Trim whitespace on string filter values#47
Open
guiziwebbot[bot] wants to merge 2 commits into
Open
Conversation
Leading/trailing spaces in an LLM-provided string filter value are kept as-is, so a `contains`/`equal` filter can miss matches. Trim the value before building the FilterFormatResult, and treat a whitespace-only value as empty like the existing empty-value handling. Closes #45
Plain trim() doesn't strip U+00A0. Normalize it to a regular space before trimming so values like " john " match consistently.
Contributor
Author
|
Suite à la demande sur l'issue #45 (« ajoute un cas de test avec des espaces insécables ») :
Gate statique (réellement exécuté) :
Pas de changement d'UI admin, donc pas de vérification Playwright nécessaire. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StringFilterValueFormatternow trims leading/trailing whitespace from the LLM-provided string value before building theFilterFormatResult.contains/equalfilters no longer miss matches due to stray spaces.Test plan
vendor/bin/ecs check src— no errorsvendor/bin/phpstan analyse -c phpstan.neon— no errorsvendor/bin/phpunit --testsuite unit— 147 tests, 210 assertions, all passing (added 3 new tests: trims whitespace, whitespace-only value returns null,emptyoperator trims value)No admin UI impact (backend filter-value formatting only), so no Playwright verification was performed.
Closes #45