Skip to content

Persist DAG list filters across navigation - #67442

Closed
bobu-putheeckal wants to merge 1 commit into
apache:mainfrom
bobu-putheeckal:codex-airflow-66933-dag-list-filter-persistence
Closed

bobu-putheeckal wants to merge 1 commit into
apache:mainfrom
bobu-putheeckal:codex-airflow-66933-dag-list-filter-persistence

Conversation

@bobu-putheeckal

@bobu-putheeckal bobu-putheeckal commented May 24, 2026 •

Copy link
Copy Markdown

Fixes: #66933

This PR persists selected DAG list filters when navigating away from and back to the DAG list in the Airflow UI.

Problem

In Airflow 3.x, DAG list filters such as status, last run state, favorites, and required actions can be lost during in-app navigation when the user returns to /dags without the original query parameters. That makes the list feel inconsistent and forces users to reapply filters.

What changed

  • Added page-scoped localStorage keys for DAG list filters.
  • useDagsFilterParams now falls back to the saved page-scoped values when the URL does not include those filter params.
  • URL params still take precedence when present.
  • Changing filters keeps the existing URL behavior and also saves the selection for later navigation back to /dags.
  • Added unit coverage for the hook and filter components.

Validation

I ran these checks locally from the UI package:

NODE_OPTIONS=--no-experimental-webstorage npx --yes pnpm@10 test src/pages/DagsList/useDagsFilterParams.test.tsx src/pages/DagsList/DagsList.test.tsx src/pages/DagsList/DagsFilters/DagsFilters.test.tsx
# 8 tests passed

npx --yes pnpm@10 exec tsc --p tsconfig.app.json --noEmit
# passed

npx --yes pnpm@10 exec eslint src/constants/localStorage.ts src/pages/DagsList/useDagsFilterParams.ts src/pages/DagsList/useDagsFilterParams.test.tsx src/pages/DagsList/DagsList.tsx src/pages/DagsList/DagsList.test.tsx src/pages/DagsList/DagsFilters/DagsFilters.tsx src/pages/DagsList/DagsFilters/DagsFilters.test.tsx
# passed

The focused Vitest run prints existing MSW bypass ECONNREFUSED noise for localhost:3000, but exits green. On Node 25 I had to set NODE_OPTIONS=--no-experimental-webstorage; existing localStorage-related UI tests require the same flag in this environment.

Screenshots

A maintainer requested screenshots. I am moving this PR to draft until I can add before/after screenshots or a short GIF that shows filters persisting across navigation.


Was generative AI tooling used to co-author this PR?
  • Yes: OpenAI Codex. I reviewed the generated changes and ran the focused checks listed above.

Generated-by: OpenAI Codex following https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 24, 2026
@kaxil

kaxil commented May 24, 2026

Copy link
Copy Markdown
Member

Screenshots please!

@bobu-putheeckal

Copy link
Copy Markdown
Author

Thanks, agreed. I rewrote the PR description with the concrete problem/fix/tests and am moving this to draft until I can add before/after screenshots or a short GIF showing DAG list filters persisting across navigation.

@bobu-putheeckal
bobu-putheeckal marked this pull request as draft May 25, 2026 00:58
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because the author has not responded to a request for more information. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jun 2, 2026
@bbovenzi

bbovenzi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@bobu-putheeckal any progress? Would love to try to get this in for 3.3 if possible. Otherwise I think @pierrejeambrun was thinking about taking this feature on

@github-actions github-actions Bot removed stale Stale PRs per the .github/workflows/stale.yml policy file pending-response labels Jun 10, 2026
@pierrejeambrun

Copy link
Copy Markdown
Member

Yes I think we can close this one as it seems stale. I plan on implementing something similar, to persist 'named' views.

@pedro-cf

Copy link
Copy Markdown

Yes I think we can close this one as it seems stale. I plan on implementing something similar, to persist 'named' views.

If possible relate to this issue #66933 thank you

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

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAG list filters (status, run state, favorites) not persisted across navigation in Airflow 3.x

5 participants