Repository navigation
Make Regex, Fuzzy and prefixed Glob column filters work - #354
Merged
Merged
Conversation
Every column filter wrapped the typed text in *...* and uppercased both sides, whatever filter type the column was set to. Only a plain Glob word survived that: a Regex such as *MAIN* failed to parse and matched everything, uppercasing turned \d into \D, a Fuzzy filter had to find the literal asterisks and matched nothing, and a Glob token like -main lost its prefix to the leading *. All five columns and ShouldShowEmptyRepository now go through ColumnFilter.IsMatch. It wraps only unprefixed Glob words, passes Regex and Fuzzy patterns through unchanged, and matches case-insensitively through TextFilterCaseSensitivity instead of uppercasing. Fixes #319 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118yDY82foMMXSZ6XaQmc4c
The quality gate failed on coverage of new code: the seven call sites in ShouldShowBuildBranch and ShouldShowEmptyRepository were never executed by a test. Both are now internal, and the new tests set each column's filter on AppData, with the default ByWordAny match options a new install starts with, and check which rows are shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0118yDY82foMMXSZ6XaQmc4c
|
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.



Fixes #319
Before: every column filter (Owner, Repository, Build, Branch, Status, and
ShouldShowEmptyRepository) built its pattern as"*" + filter.ToUpperInvariant() + "*", whatever filter type the column used. Only a single plain Glob word worked:*MAIN*doesn't parse, so it matched every row. Uppercasing also turned\dinto\D.*, so no row matched.-mainstarted with*, so the exclusion was ignored.After: all seven call sites go through one helper,
ColumnFilter.IsMatch:*…*, so typingmaistill findsmain. Words starting with-,!,^or+are left as typed.TextFilterCaseSensitivity.CaseInsensitive, not by uppercasing the pattern.ShouldShowBuildBranchandShouldShowEmptyRepositoryare nowinternalinstead ofprivate, so tests can drive them.Context: the triage comment suggests fixing #318 first, because a Fuzzy filter that matches nothing also stopped polling. That is a separate fix. This PR makes the filter types themselves behave.
Tests
ColumnFilterTeststest the helper directly:^main$matches onlymain.^\d+$matches1234but notmain.mnmatchesmain.-mainhidesmainand showsdevelop.MakeGlobMatchAnywherewraps only words without a prefix.ColumnFilterRowTestsgo through the table's own row checks, with filters set onAppDataand the defaultByWordAnymatch options a new install starts with:^main$shows onlymain, Fuzzymnmatchesmain, and Glob-mainhidesmain.Each fix was checked by reverting it:
ColumnFilter.IsMatchreverted to the old wrap-and-uppercase pattern, the four acceptance-criteria tests inColumnFilterTestsfail.ColumnFilterRowTestsfail.Full suite: 103/103 passing locally on Linux.
🤖 Generated with Claude Code
https://claude.ai/code/session_0118yDY82foMMXSZ6XaQmc4c