Skip to content

preserve Gantt tooltip task end date - #68959

Closed
mralonsocorona wants to merge 2 commits into
apache:mainfrom
mralonsocorona:fix/grid-gantt-queued-tooltip-end-date
Closed

preserve Gantt tooltip task end date#68959
mralonsocorona wants to merge 2 commits into
apache:mainfrom
mralonsocorona:fix/grid-gantt-queued-tooltip-end-date

Conversation

@mralonsocorona

Copy link
Copy Markdown

Why

Fixes #68174.

The Gantt timeline splits a task instance into visual segments such as scheduled, queued, and execution. For queued segments, the visual segment ends at start_date, which is correct for rendering the queued portion of the bar.

However, the tooltip summary used the visual segment end (segment.x[1]) as max_end_date. This caused the queued segment tooltip to show the end of the queued interval as the task End Date, instead of the real task instance end_date.

What changed

  • Preserve the real task instance end_date on each Gantt segment as end_when.
  • Use segment.end_when for the tooltip max_end_date when available.
  • Keep the existing visual segment boundaries unchanged.
  • Add unit test coverage to ensure queued and execution segments retain the real task end date.

Testing

  • git diff --check
  • cd airflow-core/src/airflow/ui && pnpm test src/layouts/Details/Gantt/utils.test.ts

Result:

  • 1 test file passed
  • 15 tests passed

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jun 25, 2026
@boring-cyborg

boring-cyborg Bot commented Jun 25, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@pierrejeambrun pierrejeambrun changed the title fix(ui): preserve Gantt tooltip task end date preserve Gantt tooltip task end date Jun 29, 2026

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR but unfortunately #68570 is closer to getting meerged and more complete (test cases, handling running TI logic, etc...)

Closing, feel free to re-open if I missed something.

@mralonsocorona

Copy link
Copy Markdown
Author

Thanks for the review and for the context. That makes sense — #68570 covers the same issue more completely, including the running task instance case.

Closing this PR is fine from my side. I’ll follow #68570 and look for another issue to help with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grid pop-up of start/queue time is inconsistent

2 participants