Skip to content

Persisting filter by tag - #63273

Merged
pierrejeambrun merged 11 commits into
apache:mainfrom
zachliu:persisting-filter-by-tag
Mar 23, 2026
Merged

Persisting filter by tag#63273
pierrejeambrun merged 11 commits into
apache:mainfrom
zachliu:persisting-filter-by-tag

Conversation

@zachliu

Copy link
Copy Markdown
Contributor

I followed the existing pattern established by src/components/DataTable/useTableUrlState.ts, which persists table sort preferences to localStorage using the same approach.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborgboring-cyborgBot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 10, 2026
@zachliu
zachliuforce-pushed the persisting-filter-by-tag branch 2 times, most recently from 8eda13b to b34a375CompareMarch 10, 2026 17:46

@bbovenzibbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just two comments.

@zachliu
zachliuforce-pushed the persisting-filter-by-tag branch from b0c94e7 to a597cb8CompareMarch 12, 2026 03:27
@zachliu
zachliu requested a review from bbovenziMarch 12, 2026 13:50

@pierrejeambrunpierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

LGTM just a few nits / suggestions.

Comment threadairflow-core/src/airflow/ui/src/pages/DagsList/useTagFilter.test.tsx Outdated
@zachliu
zachliuforce-pushed the persisting-filter-by-tag branch from 44943e0 to dd0555eCompareMarch 18, 2026 21:16

@pierrejeambrunpierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pierrejeambrun
pierrejeambrunforce-pushed the persisting-filter-by-tag branch from dd0555e to d5e2556CompareMarch 23, 2026 14:36
@pierrejeambrun

Copy link
Copy Markdown
Member

Rebased the branch to try to fix the transient CI errors 🤞

@zachliu

Copy link
Copy Markdown
ContributorAuthor

Rebased the branch to try to fix the transient CI errors 🤞

🫡

@pierrejeambrunpierrejeambrun added this to the Airflow 3.2.0 milestone Mar 23, 2026
@pierrejeambrun
pierrejeambrun merged commit 3651eea into apache:mainMar 23, 2026
221 of 224 checks passed
@zachliu
zachliu deleted the persisting-filter-by-tag branch March 23, 2026 19:56
aaron-y-chen pushed a commit to aaron-y-chen/airflow that referenced this pull request Mar 30, 2026
* define constants for dags tag filter
* make tags persistent
* add deps list
* optimizing, need no extra constants
* Add useTagFilter hook for DagsList tag filtering
* Add TagMatchMode type to useTagFilter hook
* Extract tag filter logic into reusable useTagFilter hook
* Add tests for useTagFilter hook
* Reset offset when tag filter mode changes
* Fix tag filter mode persistence for single tag selections
* Stop resetting tag match mode when tag count drops below 2
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 2026
* define constants for dags tag filter
* make tags persistent
* add deps list
* optimizing, need no extra constants
* Add useTagFilter hook for DagsList tag filtering
* Add TagMatchMode type to useTagFilter hook
* Extract tag filter logic into reusable useTagFilter hook
* Add tests for useTagFilter hook
* Reset offset when tag filter mode changes
* Fix tag filter mode persistence for single tag selections
* Stop resetting tag match mode when tag count drops below 2
abhijeets25012-tech pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Apr 9, 2026
* define constants for dags tag filter
* make tags persistent
* add deps list
* optimizing, need no extra constants
* Add useTagFilter hook for DagsList tag filtering
* Add TagMatchMode type to useTagFilter hook
* Extract tag filter logic into reusable useTagFilter hook
* Add tests for useTagFilter hook
* Reset offset when tag filter mode changes
* Fix tag filter mode persistence for single tag selections
* Stop resetting tag match mode when tag count drops below 2
pierrejeambrun added a commit to astronomer/airflow that referenced this pull request Aug 10, 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
bbovenzi pushed a commit that referenced this pull request Aug 11, 2026
PR #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 #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: #66933
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UIRelated to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAG list Filter by tag state not persisted in Airflow 3.x

3 participants

@zachliu@pierrejeambrun@bbovenzi