mengw15 commented on code in PR #8441:
URL: https://github.com/apache/texera/pull/8441#discussion_r3952538495
##########
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:
A question first: if the workflow's last operator has no eye (view-result)
on the canvas, can a Form View reader ever see its result here?
Digging into that: a chosen sink can never pass this filter — a sink never
enters the view-result set (the eye toggle excludes sinks outright,
`highlightedOperatorIdsExcludingSinks`), while its output is materialized
unconditionally (the result panel even auto-highlights a sink on completion).
So an author who picks the "View Results" sink — the most natural choice — gets
a card that never appears. The filter needs a sink branch (a chosen sink passes
while it still exists on the graph), and #8026's picker range will need to be
viewed-∪-sinks for the same reason.
--
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]