Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[UX Improvement] Provide a way to reset sticky session filters (lastrun/tags) via Airflow Logo navigation #73079

Description

@yquaziii

Description

In Apache Airflow Webserver (Airflow.index / /home), active view filters such as lastrun (running/failed), tags, or status are saved in Flask session cookies (last_run_filter, tags_filter, dag_status_filter).

Current Design Rationale ("Sticky Filters")
This session-based persistence is working as intended to preserve user context during DAG inspection:

  • A user filters the view to show only "Running" DAGs.
  • They click into a specific DAG to inspect its Grid view, Gantt chart, or task logs.
  • When they click "DAGs" in the top navigation bar (which requests /home without parameters), the server reads the session cookie and - redirects to /home?lastrun=running.
  • This ensures the user does not lose their active filter context when navigating back and forth.

Use case/motivation

While "Sticky Filters" work well during active workflows, they create a UX trap when 0 DAGs match the filter (e.g., when all running DAGs complete and 0 DAGs are active).

  1. User filters by lastrun=running.
  2. When the running DAG finishes, the list shows 0 DAGs and all primary tab badges (All, Active, Paused) show 0.
  3. The user tries to return to a clean home view by:
    • Refreshing the browser page.
    • Manually editing the browser URL to remove ?lastrun=running.
    • Clicking the Airflow Logo or "DAGs" navbar link.
  4. In all of these cases, the server reads last_run_filter = "running" from the session cookie and continuously executes a 302 Redirect back to /home?lastrun=running.
  5. The user appears "stuck" on a blank page with 0 DAGs. The only way to clear it is to realize the "Running" filter button is active and click it again to send ?lastrun=reset_filter.

Steps to Reproduce :

  • Navigate to /home.
  • Click the "Running" filter button.
  • Wait for or ensure no DAGs are currently running (0 running DAGs).
  • Notice that the page displays 0 DAGs and the URL is /home?lastrun=running.
  • Click the Airflow Logo in the top navigation bar.
  • Observed: Page redirects back to /home?lastrun=running showing 0 DAGs.
  • Expected: Clicking the Logo clears the session filters and displays the default unfiltered list of all DAGs.

Proposed UX Solution :
To preserve the benefits of sticky filters without trapping users in a 0-result state, we propose differentiating between Logo navigation and Navbar menu navigation:

  • Navbar "DAGs" Link: Preserves the sticky session filter (maintaining current context when navigating DAGs).
  • Airflow Logo Link: Acts as a "Home / Clear Filters" button that explicitly resets session filter cookies and returns to the default, unfiltered home page.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.area:corekind:featureFeature Requests

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions