Skip to content

feat(gui): read the schema's constraints in the property panel - #8507

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
kz930:feat/panel-reads-schema-constraints
Sep 24, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
kz930:feat/panel-reads-schema-constraints

Conversation

@kz930

@kz930 kz930 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

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. A property declared unique among rows says which row already holds the value, and a row deleted clears the error it left behind, since deleting a row changes no surviving control's value and the row left behind would otherwise keep an error about a duplicate that is no longer there.

#8350 is the export button; this one is a separate thread of work.

Any related issues, documentation, discussions?

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

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

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.

How was this PR tested?

formly-utils.spec.ts covers the mapping from a declared rule to a control and the type checking across every named column. constrained-value.component.spec.ts covers what each control renders. operator-property-edit-frame.component.spec.ts drives the rendered form, including the click that deletes a duplicate row and the error it has to clear.

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

Generated-by: Claude Code (Claude Opus 5)

🤖 Generated with Claude Code

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. A property declared unique among rows
says which row already holds the value, and a row deleted clears the
error it left behind.

Split out of apache#8350 on review. That change is the export button; this one
is a separate thread, and nothing in it makes a workflow exportable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @aicam, @Ma77Ball
    You can notify them by mentioning @aglinxinyuan, @aicam, @Ma77Ball in a comment.

@codecov-commenter

codecov-commenter commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.50943% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.72%. Comparing base (ca6316c) to head (e802643).

Files with missing lines Patch % Lines
...it-frame/operator-property-edit-frame.component.ts 86.11% 2 Missing and 3 partials ⚠️
frontend/src/app/common/formly/formly-utils.ts 95.83% 0 Missing and 2 partials ⚠️
...t/constrained-value/constrained-value.component.ts 90.47% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8507      +/-   ##
============================================
- Coverage     92.73%   92.72%   -0.02%     
  Complexity     4926     4926              
============================================
  Files          1241     1242       +1     
  Lines         52476    52564      +88     
  Branches       6475     6505      +30     
============================================
+ Hits          48662    48738      +76     
- Misses         2206     2210       +4     
- Partials       1608     1616       +8     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from f24dab0
agent-service 99.16% <ø> (ø) Carriedforward from f24dab0
amber 88.43% <ø> (ø) Carriedforward from f24dab0
computing-unit-managing-service 55.24% <ø> (ø) Carriedforward from f24dab0
config-service 87.37% <ø> (ø) Carriedforward from f24dab0
file-service 81.53% <ø> (ø) Carriedforward from f24dab0
frontend 96.50% <91.50%> (-0.04%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from f24dab0
pyamber 98.48% <ø> (ø) Carriedforward from f24dab0
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from f24dab0

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kz930

kz930 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

/request-review @aglinxinyuan

@carloea2 carloea2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The schema rules and row revalidation look good.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Sep 24, 2026
Merged via the queue into apache:main with commit fbf7733 Sep 24, 2026
24 checks passed
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 15, 2026
…ints in the panel (apache#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 apache#8325, 25 of 27; that issue lists the set in order.

The property panel's reading of the schema's constraints is in apache#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 apache#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 apache#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) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read the schema's constraints in the property panel The Run button ignores compilation errors, so a workflow that cannot compile still starts

4 participants