mengw15 commented on code in PR #8441:
URL: https://github.com/apache/texera/pull/8441#discussion_r3952600303
##########
frontend/src/app/workspace/component/workflow-form/workflow-form.component.ts:
##########
@@ -376,11 +450,23 @@ export class WorkflowFormComponent implements OnInit,
OnDestroy {
this.parameters = this.formBindingService.resolveFields();
this.instructionTitle = config.instruction?.title ?? "";
this.instructionBody = config.instruction?.body ?? "";
+ this.refreshShownResults();
// A reader always sees the instruction as rendered markdown.
void this.renderInstruction();
this.buildForm();
}
+ /**
+ * Limit the shown results to the author's chosen operators that STILL have
view-result on in the
+ * canvas. This is a pure display filter: it reads the canvas's view-result
set and never writes
+ * it, so a normal canvas user's result-viewing is unaffected. A chosen
operator whose view-result
+ * was turned off (or that was deleted) simply drops out here rather than
rendering a stale card.
+ */
+ private refreshShownResults(): void {
+ const viewed =
this.workflowActionService.getTexeraGraph().getOperatorsToViewResult();
+ this.shownResultIds =
this.formBindingService.getConfig().resultOperatorIds.filter(id =>
viewed.has(id));
Review Comment:
Correction to my own mechanism description after reading the compiler: the
sink story above is frontend leftovers — `SimpleSink` no longer exists in the
backend at all. The real rule is in `WorkflowCompiler.expandLogicalPlan`:
storage = **terminal operators ∪ opsToViewResult**, so a workflow's last
operator (any type, no eye) is materialized unconditionally. That makes the gap
broader than a sink: an author who picks the workflow's final operator — the
most common choice, and one that has no reason to carry the eye — is filtered
out here. The fix is a terminal branch (`viewed.has(id)` or the operator has no
outgoing links), and #8026's picker range is viewed ∪ terminals.
--
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]