Add preset filters to the Dags list page - #71368
Merged
Merged
Conversation
pierrejeambrun
marked this pull request as ready for review
August 10, 2026 14:23
pierrejeambrun
requested review from
bbovenzi,
choo121600,
guan404ming,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
August 10, 2026 14:23
Member
Author
pierrejeambrun
force-pushed
the
add-dags-list-preset-filters
branch
from
August 10, 2026 14:49
adc0f13 to
869695a
Compare
PR apache#68484 shipped save/restore/set-default views on every table that goes through the shared FilterBar, but the Dags list hand-rolls its own filter row (DagsFilters) and was left out. Users complained that their status, run-state, favorites, and needs-review filters reset on navigation. PresetFiltersMenu is already self-contained — it reads and writes useSearchParams and persists per pathname to localStorage — so it drops into DagsFilters unchanged. All Dags-page filters (paused, favorite, last/any run state, needs_review, tags, tags_match_mode, teams, timetable_type, name_pattern) are already URL params, so a saved preset restores them faithfully. For that to actually hold, the tag filter had to stop persisting its selection to localStorage (added in apache#63273): that fallback shadowed the URL, so applying a preset that omitted tags kept the previous selection instead of clearing it. Tags are now URL-only like every other filter, and the stale tags / tags_match_mode keys are pruned on load. closes: apache#66933
pierrejeambrun
force-pushed
the
add-dags-list-preset-filters
branch
from
August 10, 2026 15:28
869695a to
83528d2
Compare
bbovenzi
approved these changes
Aug 11, 2026
Contributor
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 12e3f08 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Aug 14, 2026
PR apache#68484 shipped save/restore/set-default views on every table that goes through the shared FilterBar, but the Dags list hand-rolls its own filter row (DagsFilters) and was left out. Users complained that their status, run-state, favorites, and needs-review filters reset on navigation. PresetFiltersMenu is already self-contained — it reads and writes useSearchParams and persists per pathname to localStorage — so it drops into DagsFilters unchanged. All Dags-page filters (paused, favorite, last/any run state, needs_review, tags, tags_match_mode, teams, timetable_type, name_pattern) are already URL params, so a saved preset restores them faithfully. For that to actually hold, the tag filter had to stop persisting its selection to localStorage (added in apache#63273): that fallback shadowed the URL, so applying a preset that omitted tags kept the previous selection instead of clearing it. Tags are now URL-only like every other filter, and the stale tags / tags_match_mode keys are pruned on load. closes: apache#66933
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.

The Dags list page hand-rolls its own filter row (
DagsFilters) rather than going through the sharedFilterBar, so the save/restore/pin-default views added in #68484 never reached it. Users reported that filters like status / run state / favorites / needs-review reset on every navigation away from/dags(issue #66933).PresetFiltersMenualready reads and writesuseSearchParamsand persists perpathnametolocalStorage— no FilterBar-specific plumbing. It drops intoDagsFiltersunchanged. Every Dags-page filter (paused,favorite,last_dag_run_state,dag_run_state,needs_review,tags,tags_match_mode,teams,timetable_type,name_pattern) is already a URL param, so a saved preset restores them faithfully; the table sort is captured by the sametableSortKey(pathname)side-channelPresetFiltersMenualready uses on other pages.For that faithful restore to actually hold, the
tagsfilter needed one fix: it also persisted its selection tolocalStorage(added in #63273) which isn't consistent with how other filters behave, which shadowed the URL — applying a preset that omitted tags kept the previously selected tags instead of clearing them. Preset filters now own cross-navigation persistence for every filter, so this PR drops the tag-specificlocalStoragepersistence (tags/tags_match_modeare purely URL-driven like the rest) and prunes the now-stale keys from users' browsers on load (pruneLegacyTagFilterKeys, mirroring the existingpruneLegacyDependencyKeys).The bookmark button sits at the far-right end of the
DagsFiltersrow, grouped with the Favorite filter so the two stay on the same line, mirroring where it sits onFilterBar-based pages.closes: #66933
Screen.Recording.2026-08-10.at.16.50.20.mov
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines