This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-4-test by this push:
new 22afeb387a9 Reserve graph header width for loop-group iteration badge
(#75076) (#75095)
22afeb387a9 is described below
commit 22afeb387a9efeeebf2b31153fa25887a700c032
Author: Rahul Vats <[email protected]>
AuthorDate: Tue Oct 20 03:31:40 2026 +0530
Reserve graph header width for loop-group iteration badge (#75076) (#75095)
A looped Task Group renders an inline iteration badge (loop icon + count)
in its graph-node header, but the node width was measured only from the
label plus the "+ N tasks" button. The badge therefore overflowed into
the button's space, overlapping it (e.g. rendering as "3 Tasks" for a
single-task loop group). Add the badge width to the measured node width.
(cherry picked from commit 27c8cd7059cf55a5e245a1d1bbee003d17112a21)
---
airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
index 2d65750dd3f..36af06e7f16 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
@@ -375,6 +375,11 @@ export const generateElkGraph = ({
const label = `${node.label}${node.is_mapped ? "[1000]" :
""}${node.children ? ` + ${node.children.length} tasks` : ""}`;
let width = getTextWidth(label, font) + 16; // 16 for icons
+
+ // Budget the inline loop-iteration badge's width too, else it overlaps
the "+ N tasks" button.
+ if (node.is_loop) {
+ width += getTextWidth(` ${node.loop_max_iterations ?? ""}`, font) + 20;
// 20 for the loop icon
+ }
const hasStateBar = Boolean(node.is_mapped) || Boolean(node.children);
let height = hasStateBar ? 90 : 80;