The GitHub Actions job "Direct Backport Push" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
fd09f20ec9cdf17f1c9fe18af735a22d95774d98 / yangzhang75 <[email protected]>
fix(workflow-form): hold a rebuild that arrives while typing instead of 
dropping it (#8499)

### What changes were proposed in this PR?

Closes #8497. The Form View skips rebuilding its input cards while the
reader is typing, so a rebuild cannot throw away a half-entered value
(from #8437). Two things were wrong with that skip.

- It counted any focused `INPUT` as typing, tick boxes included. Ticking
a property in the step panel focuses the tick box, so the rebuild that
should add the card was skipped and the tick looked like it did nothing
until something else rebuilt the page (the way #8455's edit mode
surfaces it).
- A skipped rebuild was dropped, not postponed. A schema refresh that
landed while someone was typing (the column names an attribute dropdown
offers, after a compile) never reached the cards until the next compile
or a reload.

Now only text-like inputs, textareas, selects and content-editables
count as typing, and a rebuild that does arrive mid-typing is held and
runs once the focus leaves the text control: a `focusout` host listener
decides one tick later, so tabbing to the next text field keeps it held
while any other focus change runs it. Both subscribers (compilation
state, form-binding changes) go through the one `rebuildFormOrDefer`.

#8455 carries the same change so it stays self-contained and testable on
its own; whichever merges first, the other rebases and the duplicate
hunk disappears.

### Any related issues, documentation, discussions?

Closes #8497. Found while verifying #8455 on a flag-on instance (parent
#8011).

### How was this PR tested?

Unit tests (vitest): a focused tick box is not typing; a held rebuild
runs once on focusout for both the compilation and the binding stream;
it stays held when the focus only moves to another text field; a
focusout with nothing held rebuilds nothing; a queued focusout callback
does not rebuild a second time when the control that took the focus
already rebuilt (the tick box case). The rendered spec dispatches a real
bubbling `focusout` from a control inside the page and asserts the host
listener drains the held rebuild. Each was checked to fail with its half
of the fix removed, including removing the `@HostListener` decorator.
Full suite passes (5780), changed lines fully covered, eslint, prettier
and the production (AOT) build pass.

In a headless browser against a dev server built from this branch:
typing a value into an exposed input and tabbing out keeps the value
through the held rebuild, with no console errors and every autosave
answering 200. The tick-box path was exercised the same way on #8455,
which carries the identical change: the card follows the tick within a
second, in both directions.

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

Yes. Generated-by: Claude Code (Claude Fable 5.1, Anthropic).
Co-authored with Claude, reviewed line by line by the author before
submission.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FVvP3ttj22f9LB4p9u2anY

Co-authored-by: Claude Fable 5.1 <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/34557789663

With regards,
GitHub Actions via GitBox

Reply via email to