Skip to content

A Python UDF's Name and Type parameter cells come back editable on the operator property panel #8847

Closed

Description

@yangzhang75

What happened?

The Python UDF operator's "UI parameters" table infers each parameter's name and type from the self.UiParameter(...) declarations in the operator's code, so the Name and Type columns are meant to be read-only: the widget disables their controls as it builds each row (added in #5043). A name typed into the table does not change the code, and the parameter's value then no longer reaches the UDF.

That lock does not hold on the operator property panel. The panel enables its whole form group whenever it turns interactive (setInteractivity(true) -> formlyFormGroup.enable()), which happens one task after every render and again whenever the workflow becomes modifiable, for instance when a run finishes. The enable reaches the cells the widget had disabled, and formly mirrors the new state back into props.disabled, so nothing puts the lock back. Whether a given panel opening shows the cells locked or editable depends on which of the two ran last, so the panel disagrees with itself between openings, and with the Form View, which never enables a group wholesale and therefore always shows them locked.

Measured on main (2082021), opening the panel for the same Python UDF five times with the panel widened so the two columns are in view: locked on 1 opening, editable on 4. After a run finishes they are editable every time.

Expected: the Name and Type cells stay read-only under the panel, as the widget intends and as the same table already behaves on the Form View.

Note for anyone trying to see this: at the panel's default width (260px) the Name and Type columns are not visible at all, because the table's grid is 250px 250px 1fr; the panel has to be widened to about 600px first. That clipping is a separate layout bug and is reported on its own.

How to reproduce?

  1. Add a Python UDF whose code declares a UI parameter, for example self.UiParameter(name="threshold", type=AttributeType.DOUBLE).value.
  2. Click the operator to open the property panel, and drag it wider (about 600px) so the Name and Type columns of the "Parameters" table come into view.
  3. Reload the page and reopen the panel a few times: on most openings the Name and Type cells are white and editable instead of greyed out.
  4. Alternatively, run the workflow and look at the table once the run finishes: the two cells are editable every time.
  5. Type a different name into the Name cell. The operator's code is unchanged, and the parameter's value no longer reaches the UDF.

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

2082021

What browsers are you seeing the problem on?

No response

Relevant log output

Five consecutive panel openings on main (2082021a8), same workflow, same Python UDF,
panel widened to 820px, read from the DOM (input.disabled / nz-select's disabled class):

  load 1: headers=[Value|Name|Type] Value=white Name=white Type=white
  load 2: headers=[Value|Name|Type] Value=white Name=grey  Type=grey
  load 3: headers=[Value|Name|Type] Value=white Name=white Type=white
  load 4: headers=[Value|Name|Type] Value=white Name=white Type=white
  load 5: headers=[Value|Name|Type] Value=white Name=white Type=white

The widget marks both columns disabled while it builds each row
(ui-udf-parameters.component.ts, fieldColumns + applyDisabledState), and the panel's
operator-property-edit-frame.component.ts enables the whole group afterwards:

  setTimeout(() => { this.setInteractivity(this.interactive); ... }, 0)   // after every render
  getWorkflowModificationEnabledStream().subscribe(canModify => this.setInteractivity(canModify))

Activity

  1. added theissue type on Oct 5, 2026
  2. yangzhang75 commented on Oct 5, 2026

    @yangzhang75
    ContributorAuthor

    /take

  3. added a commit that references this issue on Nov 5, 2026
    8b0fb16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions