This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new b2f327748b8 Restore default ELK node placement in Graph view (#76488)
b2f327748b8 is described below

commit b2f327748b867357942bdde4654db08169fa8fd3
Author: Brent Bovenzi <[email protected]>
AuthorDate: Wed Nov 4 15:21:23 2026 -0500

    Restore default ELK node placement in Graph view (#76488)
    
    #65031 switched every graph to ELK's SIMPLE node placement for speed.
    SIMPLE pulls nodes toward one center line and adds many edge bends,
    which made dependency graphs much harder to read after 3.2.2.
    
    Measured with elkjs, SIMPLE saves only 5-15 ms on graphs up to about
    100 nodes and is slower than the default BRANDES_KOEPF placement at
    1000 nodes. The other speedups from #65031 stay: the web worker and
    lower crossing thoroughness for large graphs.
    
    closes: #74398
    
    Co-authored-by: bbovenzi <[email protected]>
---
 .../airflow/ui/src/components/Graph/elkGraphUtils.test.ts  | 14 ++++++++++++++
 .../src/airflow/ui/src/components/Graph/elkGraphUtils.ts   |  3 ---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts 
b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
index 6c0de8dc190..d9c5ca28dc5 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
@@ -359,3 +359,17 @@ describe("generateElkGraph — operator colors", () => {
     expect(group?.uiFgcolor).toBe("green.600");
   });
 });
+
+describe("generateElkGraph — layout options", () => {
+  it("keeps ELK's default node placement so nodes are not squeezed toward one 
line", () => {
+    const root = generateElkGraph({
+      direction: "RIGHT",
+      edges: [buildEdge("t1", "t2")],
+      font: "12px sans-serif",
+      nodes: [buildNode({ id: "t1", label: "t1" }), buildNode({ id: "t2", 
label: "t2" })],
+      openGroupIds: [],
+    });
+
+    
expect(root.layoutOptions).not.toHaveProperty("elk.layered.nodePlacement.strategy");
+  });
+});
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 36af06e7f16..998c228f233 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
@@ -423,9 +423,6 @@ export const generateElkGraph = ({
     layoutOptions: {
       "elk.core.options.EdgeLabelPlacement": "CENTER",
       "elk.direction": direction,
-      // SIMPLE placement is a single-pass algorithm — much faster than the
-      // default BRANDES_KOEPF four-pass approach with acceptable quality for 
DAGs.
-      "elk.layered.nodePlacement.strategy": "SIMPLE",
       // Crossing minimisation thoroughness (default 7) controls how many 
random
       // sweeps are attempted. Drop to 3 for large graphs where the extra 
passes
       // rarely pay off and add noticeable layout latency.

Reply via email to