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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to