Skip to content

Add operator drag-and-connect controller #7521

Description

@xuang7

Feature Summary

Step 3 of the operator-demo video generator: add the controller that places an operator on the canvas and wires it up.

This is the first step whose output is visible in the recording: every demo starts by dragging the operator being demoed onto the canvas of an already-imported sample workflow and connecting it to the data flowing through it.

Proposed Solution or Design

Add a new OperatorControllerBuilder to the Playwright layer. It finds the operator in the left panel, drags it onto the canvas near the sample workflow, and connects its ports.

Finding the operator: It navigates the panel the way a user would rather than guessing at the DOM. It expands the operator's group path, taken from the operator's own metadata (operatorGroupName resolved against the group tree), since the panel nests subgroups and a collapsed group renders no items at all: for example User-defined Functions, then Python, then the item. Once the group is open the item is picked by its per-operator test id (operator-item-), with an exact-label match as a secondary. If the item still cannot be reached, it falls back to typing the operator name into the panel's search box and taking the first match.

Connecting operator: The wiring strategy is based on the operator's input-port count:

  • 0 inputs: place it on the canvas with no upstream connection.
  • 1 input: connect it to the sample workflow's source.
  • 2+ inputs: connect it to two upstream operators.
new OperatorControllerBuilder(ctx)
  .insertViaDrag(
    operatorName,
    operatorType = Some(operatorType),
    dragNextTo = Some("CSVFileScan-operator-"),
    autoConnectToAnchor = true
  )
  .execute()

Frontend hooks: Adds the data-testid attributes this controller relies on: the left-panel Operators button, the operator search input, and a per-operator id on each list item (operator-item-); extends the guard test.

Affected Area

No response

Activity

  1. added theissue type on Aug 10, 2026
  2. changed the title [-]Operator drag-and-connect controller[/-] [+]Add operator drag-and-connect controller[/+] on Aug 10, 2026
  3. self-assigned this
    on Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions