This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 86ff1dc8186 Anchor top-level nav and needs-review links to root paths
(#73202)
86ff1dc8186 is described below
commit 86ff1dc81861d8f0338517a9dc59d96c51cac7e2
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Fri Sep 18 18:23:11 2026 +0200
Anchor top-level nav and needs-review links to root paths (#73202)
The dashboard moved from the index route to /home in #71699. That flipped
every relative `to=` / `link=` in the app tree from resolving against `/`
to resolving against whichever nested route happened to render the
component. #73178 swept the four Stats.tsx cards that broke; the two
remaining spots -- the Dags/Assets buttons in the top nav and the
non-modal NeedsReviewButton -- still work today only because their
current render sites (BaseLayout for Nav, the Task page's backward-compat
`required_actions` child route for the button) happen to make relative
resolution land somewhere valid. Anchoring them to absolute paths
removes the reliance on that positioning, so re-parenting a caller
cannot silently 404 the link.
---
airflow-core/src/airflow/ui/src/components/NeedsReviewButton.tsx | 2 +-
airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/airflow-core/src/airflow/ui/src/components/NeedsReviewButton.tsx
b/airflow-core/src/airflow/ui/src/components/NeedsReviewButton.tsx
index 40a67a81dd1..a462a6fc437 100644
--- a/airflow-core/src/airflow/ui/src/components/NeedsReviewButton.tsx
+++ b/airflow-core/src/airflow/ui/src/components/NeedsReviewButton.tsx
@@ -143,7 +143,7 @@ export const NeedsReviewButton = ({
<NeedsReviewButtonCard
hitlTIsCount={hitlTIsCount}
isLoading={isLoading}
- link="required_actions?response_received=false"
+ link="/required_actions?response_received=false"
/>
);
};
diff --git a/airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx
b/airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx
index a3ae3fd809f..45303a7083f 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx
+++ b/airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx
@@ -186,14 +186,14 @@ export const Nav = () => {
icon={DagIcon}
matchPaths={["dag_runs", "task_instances"]}
title={translate("nav.dags")}
- to="dags"
+ to="/dags"
/>
<NavButton
data-testid="nav-assets-link"
disabled={!authLinks?.authorized_menu_items.includes("Assets")}
icon={FiDatabase}
title={translate("nav.assets")}
- to="assets"
+ to="/assets"
/>
<BrowseButton
authorizedMenuItems={authLinks?.authorized_menu_items ?? []}