[Diagram Editor] Frontend progress visualization#194
Conversation
Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
…progress Signed-off-by: ArizmendiWan <2311602492@qq.com> # Conflicts: # diagram-editor/dist.tar.gz # diagram-editor/frontend/command-panel.tsx # diagram-editor/frontend/diagram-editor.tsx # diagram-editor/frontend/diagram-properties-drawer.tsx # diagram-editor/frontend/run-button.tsx
aaronchongth
left a comment
There was a problem hiding this comment.
Thanks for hammering this out! Introspection and debugging will definitely help users more quickly test workflows.
Before I go through the review more thorough, I have some high-level comments about this feature. Some background reference, #86. Just to clarify, I believe these features regarding tracing events were called/referenced as "debug" , but it is part of introspection tools and should be provided out-of-the-box, and not just in debug mode for crossflow. Especially since they provide incredible value to users while incurring very little overhead, I'd suggest that UX-wise, we have the checkbox turned on by default beside the "Run" button in the Run panel, that only toggles the visualization, while all the tracing events are still provided. Let me know what you think or if I had the wrong understanding of this implementation.
I was able to follow the readme and run the example, but it would be cool to also include screen recordings of the new features and how to interact with them on PRs.
Signed-off-by: ArizmendiWan <2311602492@qq.com>
I think you’re right about introspection. Progress visualization is broadly useful for monitoring workflows and intuitive understanding of execution, not only for debugging. I originally approached this from the diagram editor debugging use case, where progress visualization felt necessary to make debugging usable, which is why the current commits use that naming and flow. I agree it would be better to reposition this as a normal introspection/progress feature. I’ll update the PR in that direction. edit: I just realized that the progress visualization is entirely built on top of debugging backend, which passes the status information of nodes. If we want to make the introspection default, we may have to make debug default too. IMO the overhead is acceptable. |
Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>
aaronchongth
left a comment
There was a problem hiding this comment.
Overall, I think the plumbing is working as expected, I've left some comments about the feature as well as the UX.
edit: I just realized that the progress visualization is entirely built on top of debugging backend, which passes the status information of nodes. If we want to make the introspection default, we may have to make debug default too. IMO the overhead is acceptable.
You're right about that. I also had the discussion with @koonpeng and in the early stages, it was considered to only be used for debugging purposes, but with a greater focus on building and running workflows from the UX perspective, I believe this should all be under the router feature. And any mention of "debug" should be renamed to either along the lines of progress visualization or just wsSession. Users from the frontend, can choose to enable the visualization or not.
| pass the input through unchanged. This is useful for making example \ | ||
| workflow progress visible in the diagram editor debugger."; | ||
| let delay_examples = [ | ||
| ConfigExample::new("Wait for the default 750 ms.", json!(null)), |
There was a problem hiding this comment.
Is there a reason 750ms was picked, as opposed to the usual more commonly used 1000ms?
There was a problem hiding this comment.
There is no specific reason. This is an arbitrary number. I will change the default number to 1000 in the following commit.
|
|
||
| let delay_description = "Wait for a configured number of milliseconds, then \ | ||
| pass the input through unchanged. This is useful for making example \ | ||
| workflow progress visible in the diagram editor debugger."; |
There was a problem hiding this comment.
Mention in the description that,
- This node is only for testing the progress visualization (also mention the example workflow json), and it should not be used in other workflows to naively introduce delays for async purposes.
- what the default value is, if not configured
| <Tab | ||
| value="run" | ||
| label="Run" | ||
| icon={<MaterialSymbol symbol="play_arrow" />} |
There was a problem hiding this comment.
I think we should still have the properties tab as the first tab to be displayed by default, this would be very helpful whenever users load a new diagram in, and is able to see the description and example input requests.
| outline: debugLatest | ||
| ? `2px solid ${theme.palette.success.main}` | ||
| : debugVisited | ||
| ? `1px solid ${alpha(theme.palette.info.main, 0.35)}` |
There was a problem hiding this comment.
| ? `1px solid ${alpha(theme.palette.info.main, 0.35)}` | |
| ? `2px solid ${alpha(theme.palette.info.main, 0.35)}` |
the outline for visited nodes is is same as the default outline, 1px, changing it to 2px will at least make a visible difference
| outline: debugLatest | ||
| ? `2px solid ${theme.palette.success.main}` |
There was a problem hiding this comment.
so far it looks like we are only display the success color on the latest node that has reported it has started. We should have the success color on all ongoing active nodes, and only extinguish it back to 2px info (visited), once those nodes have reported that it has finished.
Example of this issue, by adding a fork clone in the example json of this PR, and repeating another branch of delays, we see that only the most recent reported delay node is active on each step of the separate branch, when they both should be lit up
Adds the first frontend-visible debugging slice for the diagram editor.
It adds live operation-start visualization in the graph, exposes the existing backend debug WebSocket through the REST API client, and moves Run/Debug controls into the persistent right side panel so runtime status no longer blocks the diagram canvas.
It also adds a small delayed calculator example so the progress visualization is easy to verify manually.
Changes
Runtab.wsDebugWorkflowsupport to the frontend API client.DebugSessionhandling for backendoperationStartedandfinishmessages.delay_msto the calculator example catalog.carry_object_progress.jsonas a latency-focused progress demo.Demo Video
Screen.Recording.2026-05-21.at.20.34.02.mov
GenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: Codex