Copilot commented on code in PR #3914:
URL: https://github.com/apache/texera/pull/3914#discussion_r2436232616
##########
core/gui/src/app/workspace/service/validation/validation-workflow.service.ts:
##########
@@ -135,13 +135,13 @@ export class ValidationWorkflowService {
}
private updateValidationState(operatorID: string, validation: Validation) {
- this.operatorValidationStream.next({ validation, operatorID });
if (!validation.isValid) {
this.workflowErrors[operatorID] = validation;
} else {
delete this.workflowErrors[operatorID];
- this.workflowValidationErrorStream.next({ errors: this.workflowErrors,
workflowEmpty: this.workflowEmpty });
}
Review Comment:
[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.
```suggestion
}
// 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.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]