UI: Update browser tab title dynamically with DAG name#67169
UI: Update browser tab title dynamically with DAG name#67169Subham-KRLX wants to merge 2 commits into
Conversation
bbovenzi
left a comment
There was a problem hiding this comment.
Good call.
We probably want to expand this to every page. But that can be a follow-up PR
a6a0c23 to
ddb08df
Compare
Agreed. Let's handle expanding this to all other pages in a follow up PR. |
|
I think there may be an effect ordering issue here between BaseLayout and Header. On a hard refresh of /dags/<dag_id>, both useDocumentTitle() hooks mount in the same commit, and React runs effects child → parent:
Screen.Recording.2026-05-20.at.11.30.26.PM.movCould you double-check the hard-refresh case? |
I removed the hook from BaseLayout to fix the effect ordering issue and simplify the logic |
|
looks good. Let's fix the static checks |
The browser tab title always showed Airflow in the new React UI because BaseLayout.tsx set it synchronously on every render.
We wrapped the default title logic in a useEffect hook so that it only sets the fallback title on mount. We also added a useDocumentTitle hook and called it in the DAG detail page to show the DAG name dynamically.
closes: #67145
Was generative AI tooling used to co-author this PR?
Yes — Claude (For PR description)