yquaziii opened a new issue, #73079:
URL: https://github.com/apache/airflow/issues/73079

   ### 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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to