Skip to content

[Diagram Editor] Frontend progress visualization#194

Open
ArizmendiWan wants to merge 8 commits into
open-rmf:mainfrom
ArizmendiWan:frontend-debugging-progress
Open

[Diagram Editor] Frontend progress visualization#194
ArizmendiWan wants to merge 8 commits into
open-rmf:mainfrom
ArizmendiWan:frontend-debugging-progress

Conversation

@ArizmendiWan

@ArizmendiWan ArizmendiWan commented May 16, 2026

Copy link
Copy Markdown
Contributor

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

  • Highlight the currently executing node and retain visited nodes during debug runs.
  • Move Run/Debug UI from popover into the right side panel under a Run tab.
  • Add optional wsDebugWorkflow support to the frontend API client.
  • Add DebugSession handling for backend operationStarted and finish messages.
  • Add delay_ms to the calculator example catalog.
  • Add carry_object_progress.json as 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

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: Codex

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>
@mxgrey mxgrey added this to PMC Board May 16, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board May 16, 2026
@mxgrey mxgrey requested a review from aaronchongth May 19, 2026 01:30
@mxgrey mxgrey moved this from Inbox to In Review in PMC Board May 19, 2026
…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 aaronchongth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/diagram/calculator/README.md Outdated
Signed-off-by: ArizmendiWan <2311602492@qq.com>
@ArizmendiWan

ArizmendiWan commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

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.

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.

@ArizmendiWan ArizmendiWan requested a review from aaronchongth May 22, 2026 02:28
Signed-off-by: ArizmendiWan <2311602492@qq.com>
Signed-off-by: ArizmendiWan <2311602492@qq.com>

@aaronchongth aaronchongth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason 750ms was picked, as opposed to the usual more commonly used 1000ms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" />}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)}`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? `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

Comment on lines +45 to +46
outline: debugLatest
? `2px solid ${theme.palette.success.main}`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Screencast.From.2026-06-08.15-26-46.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants