Skip to content

Agent-service auto-layout ranksep inconsistent with frontend #4577

@bobbai00

Description

@bobbai00

What happened?

agent-service/src/agent/util/auto-layout.ts and frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts both use dagre for auto-layout, but with different ranksep values:

  • Frontend (autoLayoutJoint): rankSep: 80
  • Agent-service (LAYOUT_CONFIG): ranksep: 100

Result: workflows laid out by the agent have visibly larger horizontal gaps between operators than workflows laid out by the user via the frontend's auto-layout button. nodesep (100) and edgesep (150) already match.

How to reproduce?

  1. Build the same workflow twice — once via the frontend's auto-layout, once via an agent-service tool that calls autoLayoutWorkflow.
  2. Compare operator positions; the agent-laid-out version is wider.

Version

1.1.0-incubating (Pre-release/Master)

Possible fix

Change ranksep in agent-service/src/agent/util/auto-layout.ts from 100 to 80 to match the frontend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagePending for triaging

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions