[UX Improvement] Provide a way to reset sticky session filters (lastrun/tags) via Airflow Logo navigation
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
### 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?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Start at the Airflow.index /home route and the top-navigation Logo and DAGs links, tracing how last_run_filter, tags_filter, and dag_status_filter are read from the Flask session. Done means Logo navigation clears the session filters and opens the unfiltered home page, while the DAGs link preserves them; verify the Running-filter reproduction scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100