yangzhang75 commented on code in PR #8441:
URL: https://github.com/apache/texera/pull/8441#discussion_r3960877369
##########
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:
Confirmed against WorkflowCompiler (storage = terminal ∪ opsToViewResult)
and LogicalPlan.getTerminalOperatorIds (out-degree 0 on the enabled plan).
Thanks, this was the right call.
Fix in this PR: the terminal result now always shows in the form, because
the engine always materializes it and so it cannot be turned off.
`resultOperatorIds` layers extra view-result steps on top. Terminal detection
reads the enabled plan (`getAllEnabledLinks`, skipping disabled operators) to
match the compiler, so a disabled downstream link does not hide it.
For #8026 the picker never lists the terminal, since it always shows and is
not the author's to toggle; the picker offers only the intermediate view-result
steps and updates live when an eye is toggled. Tests cover the uncurated
terminal, chosen terminal, disabled link/operator, and live eye-toggle cases.
--
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]