-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix(ui): avoid gantt annotation error during resize #60877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ui): avoid gantt annotation error during resize #60877
Conversation
|
Can you walk me through how exactly you got this error? I would like to replicate first. |
Screen.Recording.2026-01-22.at.9.27.19.PM.movSorry for the brief description earlier. |
|
I think code looks reasonable to me, but I tried on main and can't reproduce(Chrome, arc browser) 🥲 |
|
@bbovenzi @choo121600 Screen.Recording.2026-01-24.at.10.43.29.PM.mov |
|
I can't reproduce as well but I think that might be some kind of race condition between the initiation of Could you help try set it might be like this reference |
|
@guan404ming I’ve applied For reference, here is the environment where I tested this change (including re-testing with Safari):
|
|
Please resolve the ci error, thanks! Nice, thanks for the tests. I don't think to add the wdyt @bbovenzi @choo121600 |
I agree with this take as well. |
|
Yeah sounds like low overhead even though iI still can't replicate on my end. But we need to fix the ordering linting issue. Should be as simple as running |
|
Thanks everyone for the review and helpful suggestions! I learned a lot from this discussion. The formatting issue has been resolved. |
|
Cool, Thanks :) |
* fix(ui): avoid chart annotation left error by removing resizeDelay * fix(ui): keep resizeDelay and set annotation clip false in gantt * fix(ui): adjust annotation clip false position per prek formatting (cherry picked from commit 122146f) Co-authored-by: yuseok89 <yuseok89@gmail.com>
* fix(ui): avoid chart annotation left error by removing resizeDelay * fix(ui): keep resizeDelay and set annotation clip false in gantt * fix(ui): adjust annotation clip false position per prek formatting (cherry picked from commit 122146f)
* fix(ui): avoid chart annotation left error by removing resizeDelay * fix(ui): keep resizeDelay and set annotation clip false in gantt * fix(ui): adjust annotation clip false position per prek formatting
When clicking the DAG task icon to open the task view, I intermittently hit a Chart.js error:

The stack trace points into chartjs-plugin-annotation’s
beforeDrawhook while rendering the Gantt chartAccording to Chart.js / annotation plugin issue reports, this error commonly occurs when
resizeDelayis set, because the annotation plugin can run during a resize before chartArea is fully initialized, making chartArea.left undefined. Our Gantt chart options were using resizeDelay: 100 together with the annotation plugin, which matches this pattern. To avoid this resize race while preserving the existing annotation/highlight behavior, I removed theresizeDelaysetting so the chart resizes immediately without triggering that crash.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.