Skip to content

UI: Preserve Dag tab when switching Dags - #70699

Merged
bbovenzi merged 8 commits into
apache:mainfrom
shivaam:fix-57625-preserve-dag-tab
Aug 21, 2026
Merged

bbovenzi merged 8 commits into
apache:mainfrom
shivaam:fix-57625-preserve-dag-tab

Conversation

@shivaam

@shivaam shivaam commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #57625

What changed

When selecting another DAG from the DAG search dialog, preserve the current DAG-level tab when the destination supports it.

  • Preserve standard DAG tabs such as Code, Details, Runs, Tasks, Calendar, Audit Log, and Overview.
  • Preserve nested plugin-tab routes.
  • Reset task-, run-, and task-instance-specific routes because those entities may not exist in the destination DAG.
  • Reset Backfills when the destination DAG is not backfillable.
  • Drop query parameters and fragments that belong to the previous DAG.

Backfills need a separate guard because tab availability is DAG-specific. A backfillable source DAG can expose /backfills, while the selected destination DAG may report is_backfillable = false.

airflow-70699-cinematic-framed-demo.mp4

Testing

  • Added focused unit and component regression coverage.
  • 64 targeted UI tests pass.
  • Verified in Breeze with the real DAG picker across the standard tabs, nested routes, Backfills, query/hash cleanup, same-DAG selection, and browser Back/Forward navigation.

Screenshots

Before/after screenshots will be attached to this draft.


Was generative AI tooling used to co-author this PR?
  • Yes (Codex)

Generated-by: Codex following the guidelines


Keep users in the same Dag context while comparing Dags, without carrying entity-specific routes that may not exist on the destination Dag.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 29, 2026
@shivaam
shivaam marked this pull request as ready for review July 29, 2026 19:53
@choo121600

Copy link
Copy Markdown
Member

Could you add before/after screenshots? It would help reviewers better understand the changes.

@shivaam

shivaam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Could you add before/after screenshots? It would help reviewers better understand the changes.

The change is just in the URL. I am not sure if a screenshot will help here as it is navigation change. I can probable add a video or something

@shivaam

shivaam commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Added a screenshot.

Comment thread airflow-core/src/airflow/ui/src/utils/links.ts Outdated
Path parsing made unrelated and entity-specific pages difficult to distinguish reliably. Route-owned metadata keeps tab preservation aligned with the router's actual matches.
Comment thread airflow-core/src/airflow/ui/src/utils/links.ts
Comment thread airflow-core/src/airflow/ui/src/router.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/utils/links.ts Outdated
Comment thread airflow-core/src/airflow/ui/src/utils/links.ts Outdated
Keep route metadata selection independent from the application router so navigation modules do not depend on each other.
@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Aug 21, 2026
@bbovenzi
bbovenzi merged commit 4406537 into apache:main Aug 21, 2026
89 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
* UI: Preserve Dag tab when switching Dags

Keep users in the same Dag context while comparing Dags, without carrying entity-specific routes that may not exist on the destination Dag.

* UI: Use route metadata when switching Dags

Path parsing made unrelated and entity-specific pages difficult to distinguish reliably. Route-owned metadata keeps tab preservation aligned with the router's actual matches.

* UI: Derive preserved tabs from route handles

* UI: Reset plugin routes when switching Dags

* UI: Type tab route handles

* UI: Break Dag tab routing import cycle

Keep route metadata selection independent from the application router so navigation modules do not depend on each other.

---------

Co-authored-by: Shivam <shivam@Shivams-Mac-mini.local>
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 view does not remember tab when switching between dags

3 participants