The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-8350-6a101ad4623dcc81030e298a58341ec4e0d12b16
 has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
40ced5bdb399d58aaa0535f5dc886be44a5f64e4 / Kary Zheng 
<[email protected]>
feat(gui): export a workflow as Python, and read the schema's constraints in 
the panel (#8350)

### What changes were proposed in this PR?

The browser side of the export.

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.

### Any related issues, documentation, discussions?

Part of #8325, 25 of 27; that issue lists the set in order.

The property panel's reading of the schema's constraints is in #8507.
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.

Closes #8427, the task this change is the whole of.

### What it looks like

The toolbar without this change, and with it. The new control is the
sixth, between the download and the info buttons.

<img width="549" height="48" alt="toolbar before"
src="https://github.com/user-attachments/assets/434cd8d5-16ca-4ff1-ad4f-7244656110c3";
/>

<img width="549" height="48" alt="toolbar after"
src="https://github.com/user-attachments/assets/f2d3c617-71fa-44f6-ac7f-9cd854ebe36f";
/>

Clicking it asks the compiling service to translate the canvas and shows
what comes back, with a control that copies the script.

<img width="1354" height="896" alt="the export modal"
src="https://github.com/user-attachments/assets/0b119b15-5ca9-43e8-afd1-098f5fa34f8b";
/>

### How was this PR tested?

`yarn --cwd frontend run test:ci`, which is what CI runs; a single spec
is `yarn --cwd frontend ng test --watch=false --include=<path>`.

`menu.component.spec.ts` covers the three ways the export click can end:
the script coming back, the translator refusing the plan, and the
request failing. `context-menu.component.spec.ts` covers the
execute-to-here entry under a failed compilation.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/38666563523

With regards,
GitHub Actions via GitBox

Reply via email to