nathadfield opened a new pull request, #62119: URL: https://github.com/apache/airflow/pull/62119
## Problem The grid and graph views showed inconsistent tooltip information when hovering over task instances: - **Grid view** used a basic inline tooltip showing only task ID, state, and dates with no duration, no child state breakdown for task groups or mapped tasks - **Graph view** was missing dates and duration entirely because the API endpoint was overriding `min_start_date`/`max_end_date` with `null` for leaf task nodes - **Task groups** in the graph view did not display their tooltip description ## Solution Both views now use the shared `TaskInstanceTooltip` component, showing consistent information: task ID, state, dates, duration, and child state breakdown with colored indicators. **Backend** (`grid.py`): - Removed `None` overrides for `min_start_date`/`max_end_date` on leaf task nodes, so the API returns the actual dates computed by `_get_aggs_for_node` **Frontend**: - `TaskInstanceTooltip.tsx`: Enhanced to show task ID, support `LightGridTaskInstanceSummary` dates/duration via `getDuration`, render child state breakdown, and accept an optional `tooltip` prop for task group descriptions - `GridTI.tsx`: Replaced `BasicTooltip` with `TaskInstanceTooltip` - `TaskNode.tsx` / `reactflowUtils.ts` / `useGraphLayout.ts`: Thread `tooltip` prop through the graph layout pipeline - `datetimeUtils.ts`: Hardened `getDuration` with null/undefined guards and added `withMilliseconds` parameter ## Tests - Added `TaskInstanceTooltip.test.tsx` covering key rendering branches (both dates, start-only, no dates, tooltip-only, combined tooltip + task instance) - Added `getDuration` test for `withMilliseconds=false` - Updated grid API test expectations to expect real date values ## Screenshots ### Grid View <img width="538" height="269" alt="Screenshot 2026-02-18 at 09 35 00" src="https://github.com/user-attachments/assets/ad37838c-eb62-4dd8-8989-170cfc484da2" /> ### Graph View <img width="323" height="325" alt="Screenshot 2026-02-18 at 09 35 21" src="https://github.com/user-attachments/assets/28a7b8fc-b81c-4b09-8d9f-0b9a05ab4f1d" /> ## Generative AI Usage **Was generative AI tooling used to co-author this PR?** Yes **Generated-by:** Claude Opus 4.6 following the [Airflow contribution guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) -- 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]
