Skip to content

fix(workflow-form): the Form View rebuilds every card on every compilation, redrawing its controls, dropping the focus and losing a click #8844

Closed

Description

@yangzhang75

What happened?

Every compilation result rebuilds all the Form View's input cards (workflow-form.component.ts: the getCompilationStateInfoChangedStream subscription calls rebuildFormOrDefer, which rebuilds every card through buildForm), including the compilation a card's own write triggers. Three things follow from that for any control that writes on a click (a tick box; the Move up / Move down and remove buttons of a repeated list):

  • The card's controls are torn down and redrawn about a second after the click. Measured on main: 2.8 s after ticking a box the <input type="checkbox"> is a new DOM node; the row buttons of a list flicker the same way.
  • The keyboard focus goes with the replaced node: 0.3 s after the click the box still has the focus, 2.8 s later the focus is on the body. A keyboard reader is sent back to the top of the page after every click.
  • A click made in the last 150 ms before that rebuild is lost. The card's write-back is form.valueChanges.pipe(debounceTime(150), takeUntil(formsRebuilt)), so the rebuild cancels the pending write, and the rebuilt card is seeded from the operator, which still holds the previous state: the control jumps back. Measured on main: tick a box twice 700 ms apart and it ends in the state after the first tick (the second one is undone); for a drag-reorder row, Move down twice 700 or 750 ms apart and the second move is undone.

The canvas's property panel redraws only when the operator's schema changes; a value written there never redraws the panel.

Expected: a compilation that changed nothing a card shows leaves the card alone. Only a changed operator schema (the column enums compilation writes into it), a changed set of inputs (an operator deleted, a property exposed or removed) or an operator value the card does not hold (a co-editor's edit) rebuilds, as on the canvas; and no rebuild loses an edit.

How to reproduce?

  1. On the canvas, expose a boolean property of an operator in the Form View (for example Projection's "Drop Option"); open the Form View.
  2. Tick the box and keep watching it: about a second later the control is redrawn, and its focus ring disappears (pressing Space again does nothing until you Tab back to it).
  3. Tick the box twice about 0.7 s apart: it ends in the state after the first tick; the second tick was undone.
  4. Same with a repeated list's row buttons (a Projection's columns, once the drag-reorder list renders on the form): Move down twice 0.7 s apart and the row jumps back.

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

Activity

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

    @yangzhang75
    ContributorAuthor

    /take

  3. added a commit that references this issue on Oct 18, 2026
    3726dd7
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