Skip to content

feat: allow Multi-Link on Input Ports#4342

Open
aglinxinyuan wants to merge 4 commits intomainfrom
xinyuan-union
Open

feat: allow Multi-Link on Input Ports#4342
aglinxinyuan wants to merge 4 commits intomainfrom
xinyuan-union

Conversation

@aglinxinyuan
Copy link
Copy Markdown
Contributor

@aglinxinyuan aglinxinyuan commented Mar 31, 2026

What changes were proposed in this PR?

Enabling multi-link support for input ports.

Before the change After the change
image image

Any related issues, documentation, discussions?

Closes #4329

How was this PR tested?

Tested manually.

Was this PR authored or co-authored using generative AI tooling?

No.

@aglinxinyuan aglinxinyuan self-assigned this Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 23:42
@github-actions github-actions bot added the frontend Changes related to the frontend GUI label Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables multi-link support on input ports in the workflow editor, aligning input-port connection behavior with existing output-port multi-link behavior (closes #4329).

Changes:

  • Allows multiple links to connect to the same input port in the workflow editor connection validator.
  • Updates workflow validation so input ports no longer require exactly one incoming link.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
frontend/src/app/workspace/service/validation/validation-workflow.service.ts Adjusts operator connection validation logic for input ports to permit multi-link.
frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts Relaxes UI connection validation to allow additional links into already-connected input ports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…low.service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
@chenlica
Copy link
Copy Markdown
Contributor

chenlica commented Apr 1, 2026

@Xiao-zhen-Liu Please review it.

Copy link
Copy Markdown
Contributor

@Xiao-zhen-Liu Xiao-zhen-Liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment.

const port = operator.inputPorts[i];
const portNumInputs = numInputLinksByPort.get(port.portID) ?? 0;
if (port.allowMultiInputs) {
let allowMultiInput = port.allowMultiInputs;
Copy link
Copy Markdown
Contributor

@Xiao-zhen-Liu Xiao-zhen-Liu Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change... If allowMultiInput is set to true, what is the point of the next if?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our discussion on the issue, we want to keep the "flag", i.e., we want to keep the change minimal, such that we can revert this change easily. It's expected that there will be redundant and unused code blocks as a result of this decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Multi-Link on Input Ports

4 participants