feat(gui): export a workflow as Python, and read the schema's constraints in the panel - #8350
Draft
kz930 wants to merge 3 commits into
Draft
feat(gui): export a workflow as Python, and read the schema's constraints in the panel#8350kz930 wants to merge 3 commits into
kz930 wants to merge 3 commits into
Conversation
A button on the workflow toolbar asks the compiling service to translate the canvas into a script and shows what comes back, with a copy control so the script can be taken somewhere that runs it. The translation is a round trip, so the button disables itself while one is in flight. A workflow the translator cannot express comes back with a reason rather than an empty modal, and that reason is what the notification says. The route is added in the two places a browser reaches the compiling service from: the dev server's proxy and the single-node nginx. Without them the button reaches nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8350 +/- ##
============================================
- Coverage 94.11% 94.06% -0.05%
Complexity 4811 4811
============================================
Files 1197 1199 +2
Lines 48813 48953 +140
Branches 5906 5942 +36
============================================
+ Hits 45939 46047 +108
- Misses 1420 1446 +26
- Partials 1454 1460 +6
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Three changes that were open as separate PRs land here instead, so the frontend arrives in one piece rather than as four reviews of the same files. A workflow that fails to compile cannot be executed, so the run button reads that state alongside the schema and port validation it already read, and running to an operator is offered only when everything upstream of it compiled too. The property panel reads the constraints the schema declares. A column property is checked against the attribute type rule for every column it names, not only the first. A hyperparameter's value renders as the control its parameter implies: a dropdown where the set is known, a number input where it is numeric, a text box otherwise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 2, 2026
Closed
Contributor
Author
|
/request-review @mengw15 |
Contributor
Author
|
@carloea2 May you take a look at it? |
carloea2
suggested changes
Sep 4, 2026
carloea2
left a comment
Contributor
There was a problem hiding this comment.
Please add before and after screenshots for the new toolbar button and modal. Also list the exact frontend test command. This changes visible UI, and the current test section only gives a test count.
kz930
marked this pull request as draft
September 4, 2026 17:12
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.
What changes were proposed in this PR?
Everything the browser side of this work needs, in one piece.
A button on the workflow toolbar asks the compiling service to translate the canvas into a Python script and shows what comes back, with a copy control so the script can be taken somewhere that runs it. The translation is a round trip, so the button disables itself while one is in flight, and a workflow the translator cannot express comes back with a reason rather than an empty modal. The route is added in the two places a browser reaches the compiling service from: the dev server's proxy and the single-node nginx.
A workflow that fails to compile cannot be executed either, so the run button reads the compilation state alongside the schema and port validation it already read. Running to one operator is offered only when everything upstream of it compiled too, not only the operator itself.
The property panel reads the constraints the schema declares. A column property is checked against the attribute type rule for every column it names rather than only the first. A hyperparameter's value renders as the control its parameter implies: a dropdown where the accepted set is known, a number input where it is numeric, a plain text box where the rules say nothing.
Any related issues, documentation, discussions?
Part of #8325, 21 of 21; that issue lists the set in order.
This one stands alone. It touches no Scala, so it compiles and its tests run on their own, and its CI is green today. The endpoint the button calls is added in #8327: until that lands, clicking it reports that the request failed and nothing else changes, so the order here is a preference rather than a constraint.
Supersedes #7983, #7980 and the frontend half of #7946, which are closed in favour of this. They touched the same three files, so reviewing them apart meant reading the same code more than once and resolving a conflict between them at merge.
Closes #7981. Part of #7979, #7952 and #7936, whose remaining half is in #8348; those three stay open until both land, since each is only fixed once the schema declares the rule and the panel enforces it.
Closes #8427, the task this change is the whole of.
How was this PR tested?
The five affected specs pass at 447 tests. They cover the three ways the export click can end, the run button and the execute-to-here entry under a failed compilation, a column property that names several columns, and each control the value rules select.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)