gang-zh opened a new issue, #74281:
URL: https://github.com/apache/airflow/issues/74281
### Under which category would you file this issue?
UI
### Apache Airflow version
3.3.2
### What happened and how to reproduce it?
Since 3.3.0, the "Number of Dag Runs" selection on the Dag details page is
lost almost immediately while browsing and is never remembered on the next
visit. Browsing a Dag with many active runs means re-selecting 50 every few
clicks.
Root cause: #65388 (3.3.0) moved the run limit from per-Dag `localStorage`
(`dag_runs_limit-<dagId>`) to the `?limit=` URL search param
(`DetailsLayout.tsx`). The links in `layouts/Details/NavTabs.tsx` navigate with
`to={{ pathname: value }}` and no `search`, so the param is dropped as soon as
you switch tabs. Nothing writes the old `localStorage` key anymore, yet
`pages/Dag/Overview/Overview.tsx` still reads it, so Overview and the grid now
disagree on how many runs to show.
Reproduce:
1. Open any Dag, click the grid settings (gear) and set "Number of Dag Runs"
to 50. The URL gains `?limit=50` and the grid widens.
2. Click another tab (Runs, Tasks, Events, Code ...). The `?limit=50`
disappears and the grid snaps back to 10 runs.
3. Navigate away and reopen the Dag. Still 10.
In 3.1.x / 3.2.x step 2 and 3 kept the chosen value (it was in
`localStorage`).
### What you think should happen instead?
The chosen number of runs should survive tab switches and be remembered per
Dag across visits, as it was before 3.3.0. Either carry the `limit` search
param in the tab links (and the other in-page links), or keep writing/reading
the `localStorage` key and use the URL param only as an override when present.
### Operating System
Debian GNU/Linux 12 (bookworm)
### Deployment
Astronomer
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
_No response_
### Official Helm Chart version
_No response_
### Kubernetes Version
_No response_
### Helm Chart configuration
_No response_
### Docker Image customizations
_No response_
### Anything else?
Related: the "resets on reload" bullet in #56250 was fixed in 3.1.x via
`localStorage`; #65388 reintroduced it in a different form. The 3.3 branch
(`v3-3-test`) and `main` currently have identical code for these files.
### Are you willing to submit 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]