Commit 401df7b
fix(gxt-backend): drain leaked classic reactors between tests
_renderComponentGxt registers a reactor in _classicReactors (validator.ts)
and tries to unhook it via registerDestructor(owner, doDestroy). When the
caller passes a synthetic owner ({} — the documented default for the
renderComponent API), registerDestructor silently fails (plain objects
are not destroyable), so the reactor outlives its test.
On the next test's classic-tag dirty (e.g. typing in a textarea, swap of
a dynamic component, or any @Tracked write), the leaked reactor fires
_doRender against the prior test's detached target and triggers
__gxtSyncDomNow, which clobbers the active test's DOM through the
shared force-rerender path.
Symptom cluster on testem (single-page run, modules load sequentially):
- <Textarea> / {{textarea}} cut/input/change tests
- curly didReceiveAttrs deprecation
- dynamic component swap-out destroy
- error recovery during initial render
- renderComponent siblings (1 of 2)
- browser timeout 1200s after the textarea cluster wedges sync state
All affected modules pass in isolation; the failures are pure
cumulative-state leak symptoms. __gxtCleanupActiveComponents already
clears every other module-level Set/Map between tests; _classicReactors
is the one that was missing.
Fix: expose __gxtClearClassicReactors from validator.ts and call it
from __gxtCleanupActiveComponents. Smoke (14 modules / 333 tests)
passes; affected modules pass individually.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 4f68951 commit 401df7b
2 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5822 | 5822 | | |
5823 | 5823 | | |
5824 | 5824 | | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
5825 | 5834 | | |
5826 | 5835 | | |
5827 | 5836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
658 | 667 | | |
659 | 668 | | |
660 | 669 | | |
| |||
0 commit comments