Display flow run outputs in Python script node editor#340
Open
Edwardvaneechoud wants to merge 1 commit intofeauture/kernel-implementationfrom
Open
Display flow run outputs in Python script node editor#340Edwardvaneechoud wants to merge 1 commit intofeauture/kernel-implementationfrom
Edwardvaneechoud wants to merge 1 commit intofeauture/kernel-implementationfrom
Conversation
When running a flow with python_script nodes, display outputs (matplotlib plots, plotly charts, images, HTML, text) from flowfile.display() calls were captured by the kernel but discarded by the flow execution engine. Now they are stored on the node and exposed via a new API endpoint so the notebook editor can show them automatically. Backend: - Store display_outputs on NodeResults after kernel execution - Add GET /node/display_outputs endpoint to retrieve them Frontend: - Add NodeApi.getDisplayOutputs() method - Fetch display outputs when PythonScript panel loads and after flow run completes, attaching them to the last notebook cell https://claude.ai/code/session_01LxQSB6d2gGPRCG9wGcmRnH
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds functionality to retrieve and display output artifacts (images, HTML, text) from the last flow execution in the Python script node editor. When a flow run completes, the frontend now automatically fetches display outputs and attaches them to the last notebook cell for visualization.
Key Changes
Frontend (PythonScript.vue):
watchto monitor flow run completion viaeditorStore.isRunningloadFlowRunDisplayOutputs()to fetch display outputs from the backendFrontend API (node.api.ts):
getDisplayOutputs()method to retrieve display outputs from backendBackend Routes (routes.py):
/node/display_outputsGET endpoint to retrieve display outputs for a specific nodeBackend Models (flow_graph.py & flow_node/models.py):
NodeResultsclass withdisplay_outputsfield to store output artifactsImplementation Details
editorStore.isRunningto detect when a flow run finishes and automatically refreshes both display outputs and artifactshttps://claude.ai/code/session_01LxQSB6d2gGPRCG9wGcmRnH