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
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