Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizer operator does not propagate internal workflow visualizer #1860

Closed
bruno-f-cruz opened this issue Jun 24, 2024 · 1 comment · Fixed by #1889
Closed

Visualizer operator does not propagate internal workflow visualizer #1860

bruno-f-cruz opened this issue Jun 24, 2024 · 1 comment · Fixed by #1889
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bruno-f-cruz
Copy link
Contributor

bruno-f-cruz commented Jun 24, 2024

The intended use of Visualizer was to be able to propagate the visualizer of the nested workflow. However, as of the last bonsai version, this behavior seems to have been broken:

image

Here, I would expect that a visualizer for the String type should be propagated and not the Int. This is probably because Visualizer is of operator type Sink. This regression bug was probably introduced in #1751 where sinks will now propagate the visualizer of the input type.

I believe we should support the following 2 cases:

1. Propagation of the original sequence's visualizer

This is extremely useful for introducing side-effects after UI elements. For instance:
image
This should be supported by the generic Sink operator

2. Propagation of nested workflow's visualizer

This is useful when the user wants to have a UI for the actual side effect. Moroever, as the Visualizer operator has its own scope, it also prevents contaminating the workflow with unnecessary subjects. This is also critical for IncludeWorkflows with their own visualizer.

image

This case should be handled by the Visualizer operator. Moreover, it would be very useful to allow a 0-input Visualizer overload. Essentially allowing the creation of "visualization scopes".

@bruno-f-cruz bruno-f-cruz added the bug Something isn't working label Jun 24, 2024
@bruno-f-cruz bruno-f-cruz added this to the 2.8.4 milestone Jun 24, 2024
@bruno-f-cruz
Copy link
Contributor Author

bruno-f-cruz commented Jun 26, 2024

I just realized that there may actually be a 3rd case

3. Propagation of internal scope sequence + visualizer

For instance, consider the following workflow:

image

A potential pattern might be to nest these operators within a Defer and want the visualizer output to be Button while the output to be the Int. I wonder if a more "Bonsonic" way to do this is to allow VisualizerMapping to target WorkflowOutputs. For instance:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants