Skip to content

Add preset filters to the Dags list page - #71368

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:add-dags-list-preset-filters
Aug 11, 2026
Merged

Add preset filters to the Dags list page#71368
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:add-dags-list-preset-filters

Conversation

@pierrejeambrun

@pierrejeambrun pierrejeambrun commented Aug 10, 2026

Copy link
Copy Markdown
Member

The Dags list page hand-rolls its own filter row (DagsFilters) rather than going through the shared FilterBar, 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).

PresetFiltersMenu already reads and writes useSearchParams and persists per pathname to localStorage — no FilterBar-specific plumbing. It drops into DagsFilters unchanged. 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 same tableSortKey(pathname) side-channel PresetFiltersMenu already uses on other pages.

For that faithful restore to actually hold, the tags filter needed one fix: it also persisted its selection to localStorage (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-specific localStorage persistence (tags / tags_match_mode are purely URL-driven like the rest) and prunes the now-stale keys from users' browsers on load (pruneLegacyTagFilterKeys, mirroring the existing pruneLegacyDependencyKeys).

The bookmark button sits at the far-right end of the DagsFilters row, grouped with the Favorite filter so the two stay on the same line, mirroring where it sits on FilterBar-based pages.

closes: #66933

Screen.Recording.2026-08-10.at.16.50.20.mov
Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 10, 2026
@pierrejeambrun
pierrejeambrun marked this pull request as ready for review August 10, 2026 14:23
@pierrejeambrun pierrejeambrun added this to the Airflow 3.3.2 milestone Aug 10, 2026
@pierrejeambrun pierrejeambrun added the backport-to-v3-3-test Backport to v3-3-test label Aug 10, 2026
@pierrejeambrun

Copy link
Copy Markdown
Member Author

On smaller screens
Screenshot 2026-08-10 at 16 39 19

@pierrejeambrun
pierrejeambrun force-pushed the add-dags-list-preset-filters branch from adc0f13 to 869695a Compare August 10, 2026 14:49
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
pierrejeambrun force-pushed the add-dags-list-preset-filters branch from 869695a to 83528d2 Compare August 10, 2026 15:28
@bbovenzi
bbovenzi merged commit 12e3f08 into apache:main Aug 11, 2026
88 checks passed
@bbovenzi
bbovenzi deleted the add-dags-list-preset-filters branch August 11, 2026 16:45
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 12e3f08 v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAG list filters (status, run state, favorites) not persisted across navigation in Airflow 3.x

2 participants