Skip to content

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

Closed

Description

@zachliu

Apache Airflow version

3.1.6

If "Other Airflow 3 version" selected, which one?

No response

What happened?

In Airflow 3.1.6, the Filter by tag selection on the DAGs list page does not persist:

  • Navigating away from the DAGs list and back
  • Closing and reopening the browser tab

The selected tag filter is cleared each time, requiring the user to re-select the tag(s).

Observed behavior:

  • Tag selection only lives in in-memory UI state
  • No persistence via URL query params, browser storage, or server session

Regression context

  • In Airflow 2.10.5, tag filtering does persist across navigation and browser restarts.
  • In Airflow 2.x this behavior is implemented server-side via Flask session storage (flask.session["tags_filter"]) in airflow/www/views.py.

What you think should happen instead?

The DAG tag filter should persist across:

  • Page navigation
  • Browser restarts

This is important for usability when working with large DAG inventories or tag-based workflows.

What likely went wrong

During the Airflow 3.x UI migration from server-rendered Flask views to a React-based UI:

  • The legacy persistence mechanism (Flask session + redirect logic) was removed
  • No equivalent client-side persistence was introduced

As a result, the DAG tag filter state is not stored in:

  • URL query parameters
  • localStorage / sessionStorage
  • Any server-side user preference store

How to reproduce

Screencast.2026-01-15.09.59.21.mp4

Operating System

LM 21.3 with docker python:3.12-slim-bookworm

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jan 15, 2026
  2. added
    area:UI
    on Jan 15, 2026
  3. rachanadutta commented on Jan 17, 2026

    @rachanadutta
    Contributor

    Thanks for the detailed report. I’ve reproduced this on Airflow 3.1.x and am exploring a possible fix for the UI persistence. I’ll share findings or a PR once I have a clear approach.

    Any guidance from maintainers is highly appreciated.

  4. zachliu commented on Mar 2, 2026

    @zachliu
    ContributorAuthor

    correct me if i'm wrong, the problem seems to be that the Filter by tag selections on the Dags page were stored only in url search params (?tags=tag1&tags=tag2&tags_match_mode=all). when the user navigated to another page (Home, Assets, etc.), the url changed and those params were lost. returning to the Dags page showed all dags unfiltered.

    my guess is the solution should be persisting the tag filter selections to localStorage using the same useLocalStorage hook from usehooks-ts that's already used throughout the UI (for display mode, sort order, etc.). i'll try this and report back

  5. zachliu commented on Mar 2, 2026

    @zachliu
    ContributorAuthor

    @bbovenzi shall i mimic airflow-core/src/airflow/ui/src/components/DataTable/useTableUrlState.ts to set up a common hook that is going to be used by both DagsFilters.tsx and DagsList.tsx or can i simply add a useEffect inside airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx? any other pointers are also appreciated 🙏

  6. removed
    needs-triage
    on Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:UIkind:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions