mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
Streaming the test run gives the user a live progress bar but no results: NodeEvent carries node_id/title/status/error and nothing else, so a client watching the stream learns which node is running, never what it produced. The results already exist -- the run is a normal InvokeFrom.DEBUGGER draft run, its node executions are in the database, and the editor's canvas already knows how to render exactly that view. It was simply never told which run to open. So put the Dify run id where a client can reach it: - NodeEvent gains run_id, filled from the streaming frame. Every non-ping frame is stamped with workflow_run_id, so this arrives with the FIRST node event -- while the run is still going, which is the point. - The node SSE frame publishes it alongside the existing fields. - mark_test_success / mark_test_error carry dify_run_id in both the Build and Edit flows, so the terminal state names its run too. This is what makes per-node results land on the graph, where a node's inputs and outputs already have a home, instead of only as a JSON blob on a conversation card. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>