Repository navigation
perf(test): speed up Agents page observation polling - #127063
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 21, 2026 06:37
Contributor
Author
|
Ready to land exact head
|
Contributor
Author
|
Merged via squash.
|
vincentkoc
added a commit
that referenced
this pull request
Aug 21, 2026
* origin/main: (107 commits) perf(test): speed up Agents page observation polling (#127063) fix(android): explicitly target notification intents (#127055) fix(agents): preserve literal Unicode-space paths (#126797) fix(agents): distinguish review routing from enforcement (#126216) fix(ui): associate steering work by target run (#126997) fix(ui): collapse completed pre-steer work fix(codex): preserve steering transcript order fix(gateway): retain Bonjour cleanup on startup failure (#127062) fix(release): require concrete validation retry groups (#127012) fix(file-transfer): expose directory page tokens (#127051) perf: trim setup detection worker imports (#127053) fix(onboard): make --auth-choice help match the accepted set (#127030) fix(gateway): await cron exit watcher drain (#126963) fix(telegram): preserve direct-topic self-history (#127050) fix: dismiss sidebar session menu tooltip (#127044) perf(test): speed up pairing access polling (#127047) perf(cli): remove ineffective dynamic imports (#127046) fix(gateway): recover credential-file accounts after secrets reload (#126999) fix(gateway): restore scheduler-owned Gateway context (#126640) fix(macos): keep first-run onboarding visible after Gateway changes (#127038) ... # Conflicts: # .github/workflows/full-release-validation.yml # test/scripts/full-release-validation-at-sha.test.ts
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Agents-page test suite spends about one second waiting for Vitest's default 50 ms observation-polling interval, even though the model catalog, reconnect fencing, scoped cron, file, identity, and effective-tools transitions are driven by already-pending promises.
Why This Change Was Made
Classified each of the 24 waits in
ui/src/pages/agents/agents-page.test.ts: all observe actual promise/state completion; none enforces a product debounce, timer, deadline, or lifecycle duration. Reuse the existingwaitForFasthelper, which preserves Vitest's assertion, timeout, and async semantics while using a 1 ms observation interval. Keep every assertion, reconnect, deferred resolution, stale-result check, and real state transition unchanged. Compact an existing equivalent fixture constructor so the test stays below the repository's 1,000-line lint limit.User Impact
No runtime or production behavior changes. Production LOC: +0/-0. Test LOC: +26/-27 (net -1).
Four retained runs per side on the same Blacksmith Testbox, with one worker, distinct filesystem caches, import diagnostics,
/usr/bin/time -v, and an excluded warmup:Median RSS is approximately 682 MB before and 686 MB after; user/system CPU remains approximately 2.2-2.3 s / 0.28-0.30 s. The gain removes waiting, not product work.
Evidence
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/agents-page-SAMPLE /usr/bin/time -v node scripts/run-vitest.mjs ui/src/pages/agents/agents-page.test.ts --maxWorkers=1 --reporter=verbose.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs ui/src/pages/agents/agents-page.test.ts ui/src/pages/agents/agent-file-lifecycle.test.ts ui/src/pages/agents/github-identity-controller.test.ts ui/src/pages/agents/skills.test.ts ui/src/lib/agents/index.test.ts ui/src/lib/chat/chat-metadata-store.test.ts ui/src/lit/gateway-page-controller.test.ts ui/src/lit/subscriptions-controller.test.ts— 8 files, 104 passing tests.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/model-alias-display.e2e.test.ts ui/src/e2e/agents-set-default-persistence.e2e.test.ts ui/src/e2e/agent-config-save.e2e.test.ts ui/src/e2e/agent-page-scope.e2e.test.ts— 4 files, 9 passing scenarios.OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 pnpm check:changed.node_modules/.bin/oxfmt --check ui/src/pages/agents/agents-page.test.ts;node_modules/.bin/oxlint --config .oxlintrc.json ui/src/pages/agents/agents-page.test.ts;git diff --check; clean independent autoreview.