You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/09/15 16:26:05 UTC

[PR] Anchor top-level nav and needs-review links to root paths [airflow]

pierrejeambrun opened a new pull request, #73202:
URL: https://github.com/apache/airflow/pull/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 happens to render the component. #73178 swept the four `Stats.tsx` cards that broke.
   
   The two remaining spots still work today only because of where they are rendered:
   
   - `Nav.tsx` — Dags/Assets buttons use `to="dags"` / `to="assets"`. Nav is inside `<BaseLayout />` which is the element for `<Route path="/">`, so react-router-dom v6 resolves the relative `to=` against `/` and the links land correctly. Re-parenting Nav under any other route would silently break them; `NavButton.test.tsx` only asserts `href` from `wrapperAt("/")`, so a regression would slip past CI.
   - `NeedsReviewButton.tsx` — the non-modal `NeedsReviewButton` variant uses `link="required_actions?response_received=false"`. It is currently rendered only from `pages/Task/Overview/Overview.tsx`, which happens to have a nested `required_actions` route (backward-compat, `router.tsx:214`), so the relative link happens to land on a valid page. The `NeedsReviewButtonWithModal` sibling already uses absolute `to="/required_actions?..."`, so the two variants are inconsistent.
   
   Anchoring both to absolute paths removes the reliance on the surrounding Route context, so re-parenting a caller cannot silently 404 the link and the two `NeedsReviewButton` variants agree.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7)
   
   Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Anchor top-level nav and needs-review links to root paths [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #73202:
URL: https://github.com/apache/airflow/pull/73202


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org