Repository navigation
perf(test): speed up lazy UI lifecycle polling - #127025
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
41c8296 to
12d1ee2
Compare
|
Land-ready after exact-head CI for The two changed UI suites preserve all 11 existing tests and assertions while replacing 17 default 50 ms Vitest polling intervals with the existing 1 ms Intended-fault proof: removing the lazy controller's authoritative current-request assignment makes the preserved loading-state regression fail; the production owner was immediately restored. Focused coverage passed 60 UI owner/sibling tests plus four real Chromium stale-chunk recovery tests. The complete Production LOC: +0/-0. Test LOC: +19/-17. No timeouts increased, assertions weakened, snapshots/baselines changed, or runtime boundaries mocked. Blacksmith benchmark/focused/full-gate evidence: https://github.com/openclaw/openclaw/actions/runs/32447826685 Exact-head PR CI: https://github.com/openclaw/openclaw/actions/runs/32449817759 |
|
Merged via squash.
|
What Problem This Solves
The Control UI lazy-element and onboarding-memory-import regression suites spent about 0.8 seconds waiting for default 50 ms polling intervals even though their observed state transitions settle immediately through Promises. Recent onboarding coverage introduced additional waits on this same owner boundary.
Why This Change Was Made
Use the existing Control UI
waitForFasthelper for the 17 asynchronous assertions across the two affected suites. It retains the original assertions, one-second failure deadline, actual lazy-element controller, application shell, and lifecycle ordering while reducing the polling interval to 1 ms. No production code, timeout, mock, fixture, or browser boundary changes.User Impact
No user-visible behavior changes. Developers and CI retain all existing lazy-load, failure, retry, dismissal, foreground takeover, and onboarding cleanup coverage while running these focused tests approximately 16% faster end to end.
Evidence
/usr/bin/time -v, and excluded warmups.expected undefined to match object { status: "loading", ... }; production source was restored completely.OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test ui/src/app/lazy-custom-element.test.ts ui/src/app/app-host-onboarding-memory-import.test.ts ui/src/app/question-prompt.test.ts ui/src/e2e/lazy-custom-element-recovery.e2e.test.ts --maxWorkers=1 --reporter=verbosepnpm check:changednode_modules/.bin/oxfmt --check ui/src/app/lazy-custom-element.test.ts ui/src/app/app-host-onboarding-memory-import.test.ts