Skip to content

Conversation

AnzhiZhang
Copy link
Contributor

What changes were proposed in this PR?

This PR fixes the run button is enabled when an operator is unconfigured (#3192)

image image

Any related issues, documentation, discussions?

Fixes #3192

How was this PR tested?

Manual test to ensure the reported behavior is fixed.

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

No.

@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 14:32
@github-actions github-actions bot added the fix label Oct 16, 2025
Copy link
Contributor

@Copilot 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

Fixes the issue where the "Run" button could remain enabled when an operator is unconfigured by ensuring the workflow validation error stream emits on invalid states and by aligning emission order.

  • Always emit workflowValidationErrorStream after updating workflowErrors, regardless of validity
  • Emit operatorValidationStream after updating the workflow error map to ensure consistent downstream state

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (!validation.isValid) {
this.workflowErrors[operatorID] = validation;
} else {
delete this.workflowErrors[operatorID];
this.workflowValidationErrorStream.next({ errors: this.workflowErrors, workflowEmpty: this.workflowEmpty });
}
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief comment explaining that both streams are intentionally emitted here, and that operatorValidationStream is emitted after updating workflowErrors to keep subscribers' view of the state consistent (e.g., to correctly enable/disable the Run button). This will help future readers understand the ordering requirement.

Suggested change
}
}
// Both streams are intentionally emitted here.
// operatorValidationStream is emitted after updating workflowErrors to keep subscribers' view of the state consistent
// (e.g., to correctly enable/disable the Run button). Do not change the ordering unless you fully understand the implications.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added the frontend Changes related to the frontend GUI label Oct 16, 2025
@Yicong-Huang
Copy link
Contributor

Yicong-Huang commented Oct 16, 2025

Could you please add a frontend test case?

@chenlica
Copy link
Contributor

@AnzhiZhang Please suggest a reviewer for this PR.

@chenlica
Copy link
Contributor

The text "Invalid Workflow" in the button is too long for the button. We could change it to something like "Invalid."

@AnzhiZhang
Copy link
Contributor Author

Could you please add a frontend test case?

Thanks for reminding me. I will check how to add a frontend test case and try to add one later.

@AnzhiZhang
Copy link
Contributor Author

@AnzhiZhang Please suggest a reviewer for this PR.

Based on the file history. @kunwp1 @shengquan-ni @zuozhiw If you are still working on this project, can I request your review for this PR?

@AnzhiZhang
Copy link
Contributor Author

The text "Invalid Workflow" in the button is too long for the button. We could change it to something like "Invalid."

I agree that it might be too long. Considering we still have enough space on the top, maybe this can provide a more informative message to the user? If we change it to something like "Invalid", we can have a hover text or sentence for more information.

@Yicong-Huang
Copy link
Contributor

I suggest Zuozhi to review this PR

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

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run Button is Enabled When an Operator is Unconfigured

3 participants