Skip to content

fix(workflow-form): the code editor button opens nothing in the Form View, which has no editor host #8760

Open

Description

@yangzhang75

What happened?

Two paths reach the canvas's code editor from the Form View, and neither can show it.

  • The step panel renders the operator's real property frame, and in edit mode (panelLive) that frame is interactive, so a Python UDF step shows the ordinary code-editor button. Pressing it calls codeEditorService.vc.createComponent(...) (codearea-custom-template.component.ts:87), and the only thing that ever sets vc is the canvas (workspace.component.ts:188, its <ng-template #codeEditor>). Before perf(workflow): switch between a workflow's two views without reloading the page #8581 the Form View was a fresh page load, so vc was undefined and the click threw; since perf(workflow): switch between a workflow's two views without reloading the page #8581 the canvas-to-form switch routes, so vc is the destroyed canvas's ViewContainerRef (its ngOnDestroy clears the container but keeps the reference) and Monaco is created into a detached view -- nothing visible.
  • An exposed code-editor property is not offered for exposure at all (NON_FORM_FIELD_TYPES, custom-formly-type.ts:26), and a workflow that carries one from before falls back to a plain editable control (CANVAS_ONLY_FORMLY_TYPES, custom-formly-type.ts:35).

Expected, in two steps. Interim: the button is not shown, or is disabled with a reason, in the Form View until the form has an editor host, so a click neither throws nor does nothing silently. Proper: the form gets its own editor host -- owned above both views, or handed over with the session the way #8581 hands the rest over, rather than by the canvas alone -- and supplies the operator id from the binding; the shared codearea component changes accordingly. Then the code editor can be offered for exposure and rendered in the form instead of a fallback.

Part of #8439 (item 1) and the Form View feature #8011. Raised by @mengw15 on #8436; the step-panel path was found while auditing #8581.

How to reproduce?

  1. Open a workflow with a Python UDF operator on the canvas, then switch to the Form View with the Form View button (perf(workflow): switch between a workflow's two views without reloading the page #8581 routes).
  2. Enter edit mode and open the UDF step's panel.
  3. Click the code editor button: nothing appears. (Opening the Form View from a direct URL instead: an exception in the console on the click.)

Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

506397a

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Activity

  1. github-actions commented on Sep 29, 2026

    @github-actions
    Contributor

    👋 Thanks for opening this issue, @yangzhang75!

    It looks like the issue description doesn't quite follow our template yet:

    • This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.

    Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.

    You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.

  2. yangzhang75 commented on Oct 5, 2026

    @yangzhang75
    ContributorAuthor

    /take

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

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions