test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface#104361
Conversation
…harness surface - fix 7 Control UI tests broken on main: module-mock factories are unreliable under isolate:false shared workers; use RealtimeTalkSession prototype spies and real jsdom storage instead (chat-realtime, chat-pull-requests) - add gated checks-ui CI job (runUiTests changed-scope output): chromium provisioning, lint:ui:no-raw-window-open, pnpm --dir ui test; ~30s on a 4vcpu runner, runs only when ui-affecting paths change - add weekly node22-compat workflow exercising the supported lower Node bound with the same command set as the dispatch-only ci.yml job - delete the unreachable channels entry in EXTENSION_TEST_CONFIG_ROUTES and the never-populated extensionRoutedChannelTestFiles override machinery (born empty in 2ccb5cf); resolved globs are provably identical - guard run-vitest.mjs hardcoded path maps with existence tests so renames cannot silently drop extended stall watchdogs - remove unenforced coverage thresholds; test:coverage is informational, docs updated (reference/test, help/testing, plugins/sdk-testing) Closes #104321
…nbound prototype method
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 413316e2af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run: pnpm lint:ui:no-raw-window-open | ||
|
|
||
| - name: Test Control UI | ||
| run: pnpm --dir ui test |
There was a problem hiding this comment.
Run the full Control UI test script
For UI source changes outside ui/src/i18n, preflight sets run_ui_tests but not run_control_ui_i18n, so this new job runs only the raw ui Vitest suite plus the window-open lint and skips the existing pnpm test:ui script’s pnpm ui:i18n:check step. That means a normal UI component change can introduce hard-coded copy or stale locale output without this CI lane catching it; use pnpm test:ui here or add the i18n check to the same checks-ui job.
Useful? React with 👍 / 👎.
|
Codex review: found issues before merge. Reviewed July 11, 2026, 5:53 AM ET / 09:53 UTC. Summary PR surface: Source +4, Tests +15, Docs 0, Config +67, Other +10. Total +96 across 19 files. Reproducibility: yes. The changed-scope rules and workflow command establish a deterministic source-level path where an ordinary Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Have Do we have a high-confidence way to reproduce the issue? Yes. The changed-scope rules and workflow command establish a deterministic source-level path where an ordinary Is this the best way to solve the issue? No. Reusing the existing aggregate script is narrower and prevents the CI implementation from drifting away from the supported Control UI test contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14a056ac83a3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +15, Docs 0, Config +67, Other +10. Total +96 across 19 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Merged via squash.
|
* origin/main: fix(cron): abort superseded reconciliation hooks (#104368) ci(release): expose Telegram runtime preflight stage (#104387) fix(status): avoid false shell-wrapper audit warnings (#81778) fix: retry live Gateway readiness proof (#104374) fix(exec-approval): stop misattributing Allow Always unavailability to policy (#97740) fix: preserve Mac bundle during live builds (#104376) chore(docs): translate with GPT-5.6 xhigh test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface (#104361) fix(ui): hide group submenu separator when New group is the only entry (#104370) fix(discord): reset progress drafts across queued turns (#102341) docs(cli): clarify that exec-policy show and approvals get exclude per-session /exec overrides (#94999) fix(discord): single-source thread-binding default placement and guard artifact parity (#104342) fix(agents): add tool-activity heartbeat to keep subagent alive during tool calls (#95536) fix(maint): reuse recent same-PR hosted gates (#104355)
…harness surface (openclaw#104361) * test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface - fix 7 Control UI tests broken on main: module-mock factories are unreliable under isolate:false shared workers; use RealtimeTalkSession prototype spies and real jsdom storage instead (chat-realtime, chat-pull-requests) - add gated checks-ui CI job (runUiTests changed-scope output): chromium provisioning, lint:ui:no-raw-window-open, pnpm --dir ui test; ~30s on a 4vcpu runner, runs only when ui-affecting paths change - add weekly node22-compat workflow exercising the supported lower Node bound with the same command set as the dispatch-only ci.yml job - delete the unreachable channels entry in EXTENSION_TEST_CONFIG_ROUTES and the never-populated extensionRoutedChannelTestFiles override machinery (born empty in b479115); resolved globs are provably identical - guard run-vitest.mjs hardcoded path maps with existence tests so renames cannot silently drop extended stall watchdogs - remove unenforced coverage thresholds; test:coverage is informational, docs updated (reference/test, help/testing, plugins/sdk-testing) Closes openclaw#104321 * test: pin OPENCLAW_CI_RUN_UI_TESTS in the manifest env expectation * test(ui): capture the realtime start spy instead of referencing the unbound prototype method * test(ui): raise ui vitest timeouts for real-browser layout tests on small CI runners
* origin/main: fix(cron): abort superseded reconciliation hooks (openclaw#104368) ci(release): expose Telegram runtime preflight stage (openclaw#104387) fix(status): avoid false shell-wrapper audit warnings (openclaw#81778) fix: retry live Gateway readiness proof (openclaw#104374) fix(exec-approval): stop misattributing Allow Always unavailability to policy (openclaw#97740) fix: preserve Mac bundle during live builds (openclaw#104376) chore(docs): translate with GPT-5.6 xhigh test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface (openclaw#104361) fix(ui): hide group submenu separator when New group is the only entry (openclaw#104370) fix(discord): reset progress drafts across queued turns (openclaw#102341) docs(cli): clarify that exec-policy show and approvals get exclude per-session /exec overrides (openclaw#94999) fix(discord): single-source thread-binding default placement and guard artifact parity (openclaw#104342) fix(agents): add tool-activity heartbeat to keep subagent alive during tool calls (openclaw#95536) fix(maint): reuse recent same-PR hosted gates (openclaw#104355)
Closes #104321
What Problem This Solves
Fixes an issue where the Control UI Vitest suite (3283 tests) was red on
mainwith nobody noticing, because no CI workflow runs it: 7 tests acrossui/src/pages/chat/chat-realtime.test.tsandui/src/pages/chat/components/chat-pull-requests.test.tsfailed in any full-suite run. Also resolves the remaining test-harness integrity items from the follow-up audit: an unreachable extension routing entry, ~35 lines of never-populated channel-override machinery, unguarded hardcoded path maps in the Vitest wrapper, dead coverage thresholds, and a Node 22 lower-bound compat job that only ran on manual dispatch.Why This Change Was Made
The broken ui tests were diagnosed as stale tests, not product regressions: the ui Vitest config runs
isolate: false, and these tests (added after that flip) relied onvi.mockmodule factories that only take effect when their file loads first in a shared worker — green solo, red in the full suite. They now useRealtimeTalkSessionprototype spies and real jsdom storage. To keep this class of rot from recurring, a new gatedchecks-uiCI job runs the suite whenever ui-affecting paths change (runUiTestschanged-scope output), measured at ~13s for the suite plus ~13s Chromium provisioning on a Testbox-class runner — negligible CI cost, and zero for non-ui PRs. The dead-surface deletions follow the repo lean-code policy; the coverage thresholds were unenforced policy surface (docs updated accordingly); the weeklynode22-compatworkflow exercises the supported lower Node bound with the same command set as the existing dispatch-only ci.yml job.User Impact
None at product runtime. Maintainers get: ui regressions caught on PRs, a weekly Node 22 compatibility signal, fewer dead harness paths, and honest
test:coveragedocumentation.Evidence
tbx_01kx8747whetcg3jdej2s266rb/tbx_01kx86pdwv64chz5pjsjbnqyth): full Control UI suite green (214 files / 3283 tests, ~13s), focused harness meta-tests green (391 tests),pnpm test:changedgreen,pnpm check:changed(typecheck core tests, lint core, lint scripts, guards) green,pnpm check:workflowsgreen — final combined rerun exit 0.window.localStorageundefined regardless of this diff; CI truth is Linux Node 24, where everything is green.gpt-5.6-sol, thinking xhigh) on the final branch diff: clean, "patch is correct (0.93)", no actionable findings.test/**TS edits to a typecheck lane.test/tsconfig/tsconfig.core.test.jsondoes not include roottest/**/*.ts(the test: fix changed-run routing, dedupe gateway package lanes, repair force-rerun triggers #104287envDirerror was caught only transitively), so honest coverage needs a dedicated root-test tsgo lane — same shape as the in-flighttsgo:scriptslane work. Follow-up noted on test harness follow-up: ui suite red with no CI lane, changed-gate typecheck gap, dead routing machinery, unenforced coverage thresholds #104321.tsgo:scriptslane touchingchanged-lanes.mjs/check-changed.mjs/ci.yml; whichever lands second rebases (hunks are disjoint).