Repository navigation
feat(ui): Persist DAGs list match anywhere search toggle in URL - #74014
Closed
jhaabhijeet864 wants to merge 2 commits into
Closed
jhaabhijeet864 wants to merge 2 commits into
jhaabhijeet864 wants to merge 2 commits into
Conversation
jhaabhijeet864
requested review from
bbovenzi,
choo121600,
guan404ming,
pierrejeambrun,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 1, 2026 08:16
2 tasks done
Member
There was a problem hiding this comment.
Thanks for the PR
Closing in favor of #74019 which is closer to being merged :
- More tests
- Cover all pages of the application, not just dag
- Handle the case where multiple text filter are enabled within the same page.
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.
Why this is needed
By default, the DAGs search in the Airflow UI uses a fast prefix search. Users can toggle the "match anywhere" (substring search) button to refine their queries. However, this toggle state was previously only stored in
localStorage.This created a major usability gap: if a user filtered the DAGs list using "match anywhere" and shared that URL with a colleague, the recipient wouldn't see the same results unless they coincidentally had the "match anywhere" toggle enabled in their own browser's local storage.
How this solves the problem
This PR introduces the
match_anywhereURL parameter to properly persist the toggle state, ensuring reproducible and shareable deep links.useAdvancedSearchReact hook to optionally accept a URL parameter key. This allows the DAGs list search to sync with the URL without polluting the URL state for all other search bars across the UI.match_anywherequery parameter (falling back to local storage if absent). When toggled, it dynamically adds or removes?match_anywhere=truefrom the URL.What is unique about this implementation
Rather than globally coupling the
useAdvancedSearchhook to the URL—which would have forced all search inputs across the application (like XComs, Task Instances, Events, etc.) to inject "match anywhere" states into the URL—we implemented a highly targeted approach.The hook now accepts an optional
searchParamKeyargument. By creating a new strongly-typedMATCH_ANYWHEREproperty in theSearchParamsKeysenum and passing it strictly to the DAGs list component, we preserve the default clean URL behavior for the rest of the application while explicitly solving the deep-linking requirement for the DAGs list.closes: #73772