krisztiansala opened a new pull request, #73616:
URL: https://github.com/apache/airflow/pull/73616

   Follow-up to #66015.
   
   ## Why
   
   Since #64963 switched the UI to index-friendly `*_prefix_pattern` searches, 
the **Tags** filter on the Dags list only matches tag names from the start — 
typing a middle substring yields nothing. #66015 restored substring matching 
for searchbars and text filter pills via the `.*` "match anywhere" toggle, but 
the Tags pill is a `MultiSelectPill` backed by a paginated `/dagTags` query, so 
it never got the toggle.
   
   ## What
   
   - `useDagTagsInfinite` gains an `advancedSearch` flag and spreads the input 
onto `tagNamePattern` (substring `ILIKE '%term%'`) or `tagNamePrefixPattern` 
(`LIKE 'term%'`) — same pattern as `useDags`.
   - `TagsFilter` reads `useAdvancedSearch(filter.config.key)` so the pill's 
toggle state and the tag query share the `advanced_search-tags` localStorage 
key.
   - `MultiSelectPill` renders `AdvancedSearchToggle` (variant `addon`) right 
after the select when `config.supportsAdvancedSearch` is set, and shows the 
same `LuRegex` indicator on the collapsed pill that `TextSearchFilter` uses. 
Other multiselect filters (teams, owners, timetable) filter static option lists 
client-side, so they don't set the flag and are unchanged.
   - `supportsAdvancedSearch: true` set on the `TAGS` filter config; the flag's 
doc comment no longer says "text filters" only.
   
   Behavior is unchanged by default: prefix matching stays the default; opting 
into substring is per-browser per-filter, exactly like the existing toggles.
   
   ## Test plan
   
   - [x] `pnpm vitest run src/components/FilterBar/filters/TagsFilter.test.tsx` 
— new test file: prefix is the default `tag_name_prefix_pattern` arg, toggling 
flips subsequent calls to `tag_name_pattern`, the collapsed pill shows the 
regex indicator when enabled, and the toggle is absent without 
`supportsAdvancedSearch`
   - [x] `pnpm vitest run` for `FilterBar.test.tsx` and `SearchBar.test.tsx` — 
28 tests pass
   - [x] `pnpm lint` (eslint + tsc) clean
   - [ ] Manual: Dags list → add Tags filter → `.*` toggle → tag search matches 
substrings


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to