deepujain opened a new pull request, #64374:
URL: https://github.com/apache/airflow/pull/64374

   ## Summary
   When a DAG becomes stale or deactivated, the UI still shows active-oriented 
controls like the pause toggle, trigger button, and next-run information. This 
change makes the deactivated state explicit by showing a badge and hiding 
controls or stats that imply the DAG is still schedulable.
   
   ## Changes
   - **`airflow-core/src/airflow/ui/src/components/DagDeactivatedBadge.tsx`** 
-- added a reusable badge component for stale/deactivated DAGs.
   - **`airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx`** -- shows the 
deactivated badge for stale DAGs and hides the misleading next-run stat.
   - **`airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx`** -- 
shows the deactivated badge in the breadcrumb instead of the pause toggle for 
stale DAGs.
   - **`airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx`** -- 
hides the trigger button for stale DAGs.
   - **`airflow-core/src/airflow/ui/public/i18n/locales/en/dag.json`** -- adds 
the deactivated badge label.
   - **`airflow-core/src/airflow/ui/src/pages/Dag/Header.test.tsx`** -- adds a 
regression test covering the stale DAG header behavior.
   
   ## Test plan
   - [x] `npm run test -- Header.test.tsx`
   - [x] `npx eslint src/components/DagDeactivatedBadge.tsx 
src/pages/Dag/Header.tsx src/layouts/Details/DagBreadcrumb.tsx 
src/layouts/Details/DetailsLayout.tsx src/pages/Dag/Header.test.tsx`
   - [x] `npm run build`
   - [ ] CI passes (ruff, mypy, pytest)
   
   ## Evidence it works
   - The focused Vitest run passed locally with `2 passed` test files and `3 
passed` tests, including the new stale-DAG header regression.
   - The changed UI files pass focused eslint checks.
   - A production UI build completed successfully after the change, which 
exercises the TypeScript/Vite compile path for the updated components.
   
   Fixes #63800
   


-- 
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