Repository navigation
fix(ui): wait for widget readiness in board layout tests - #152198
Conversation
Wait for the source-matched widget bridge handshake before starting the existing size-report assertion. Keep all geometry assertions and timeout values unchanged; this is test readiness only. Related: #150217 and main run 35394611976 (checks-ui 3/3). The original file passed 21 pressure executions; a controlled pre-bridge parser stall reproduced the zero-report assertion and passed with the fix.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 6:14 PM ET / 22:14 UTC. ClawSweeper reviewWhat this changesThe board layout browser tests wait for the widget iframe’s readiness message before checking its size reports, preserving existing geometry assertions and timeout values. Merge readiness✅ Ready for maintainer review Keep open: this focused test-readiness correction remains useful on current main. No actionable correctness or security findings were found; the related merged work does not supersede it. Priority: P3 Review scores
Verification
How this fits togetherControl UI dashboards display widgets inside isolated iframes that report their content height to the board. These browser tests verify stable widget geometry across three presentations and two layout surfaces. flowchart LR
A[Board test fixture] --> B[Widget iframe document]
B --> C[Bridge readiness message]
C --> D[Start size-report check]
B --> E[Content height reports]
E --> D
D --> F[Verify stable board geometry]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +11. Total +11 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Synchronize the existing browser test with document bootstrap while continuing to require real size messages and unchanged layout invariants. Do we have a high-confidence way to reproduce the issue? Yes for the controlled startup-delay mechanism: current source begins polling before iframe bootstrap, and the PR reports a failing-before/passing-after parser-stall experiment. The reviewer did not execute it, and the exact hosted timing remains unconfirmed. Is this the best way to solve the issue? Yes. Reusing the existing source-matched readiness signal addresses test startup ordering without changing production code, adding retries, or weakening geometry checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d43ed90854e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…pr-149099-main-20260918 * commit '795e460278d4f8f41545dc8b4a66da1d12defd90': (1902 commits) refactor(slack): share Markdown preparation (#149129) fix(tooling): release completed PR operations with exited loaders (#152209) fix(release): allow stable npm bootstrap under an operator soak waiver (#152206) fix(daemon): avoid false restart timeouts during slow startup (#151387) feat: read agent documents from a host-owned workspace (#150584) improve(startup): skip redundant single-agent directory checks (#152192) test(ui): await board widget readiness before size reports (#152198) perf(browser): move dashboard event discovery to SQLite worker (#151952) improve(auth): reduce pauses during concurrent credential reads (#152140) improve(ui): load older chat history in smaller pages (#152093) fix(release): reject incomplete legacy npm install trees (#152186) refactor: share current-conversation binding row serialization (#152134) test(tooling): preserve Node and terminal fixture ownership under Bun (#152187) fix(sqlite): service worker admission through retained path aliases (#152190) improve: reduce CPU work for long CLI reasoning streams (#152191) chore(ui): refresh control ui locales (#152196) test(subagents): align lifecycle retries with durable completion owners (#152184) perf(gateway): defer participant maps for owned sessions (#152097) refactor(stream): share auxiliary queue overflow handling (#149282) fix(test): execute CLI fixture preloads on Node and Bun (#152076) ...
…152198) Wait for the source-matched widget bridge handshake before starting the existing size-report assertion. Keep all geometry assertions and timeout values unchanged; this is test readiness only. Related: openclaw#150217 and main run 35394611976 (checks-ui 3/3). The original file passed 21 pressure executions; a controlled pre-bridge parser stall reproduced the zero-report assertion and passed with the fix.
What Problem This Solves
Fixes a board layout test race where the initial size-report check can expire before the iframe document starts its bridge. Main run 35394611976,
checks-ui (3/3), failed the full-bleed grid case with zero reports.Related: #150217 (earlier iframe readiness diagnostics), #149929 (browser interaction coverage).
User Impact
No user-visible change. This is a test-only correction; production code, timeout values, retries, and all size-report and geometry assertions remain unchanged.
Why This Change Was Made
Root cause category (b): test readiness. The test starts Vitest's default one-second size-report polling immediately after assigning
srcdoc, although assignment does not establish that the widget document has bootstrapped. Wait for the existing, source-matchedopenclaw:widget-bridge-readymessage before starting that same size-report check. Document startup remains bounded by the existing test timeout.Both the product host and test listener subscribe before document startup. The size reporter already reports on load and initial observation, including when the body fills the viewport. There is no evidence for a lost initial report or a missing ResizeObserver notification. The test continues to exercise real
openclaw:widget-sizemessages for all six presentation/surface combinations.Evidence
unit-nodeinline MCP App browser cases also passed in Chromium and WebKit (2 selected cases).node scripts/check-changed.mjspassed, including the UI test typecheck, repository guards, unused-export scans, and scoped lint. Line-cap ratchet againstorigin/main, type-aware Oxlint plus a failing canary,oxfmt --check, andgit diff --checkpassed. Shipped CSS/JavaScript inputs are unchanged; no bundle budget rebuild was selected for this test-only diff.The failed CI screenshot was not available and was not used. No CI reruns were requested. This maintainer-requested correction changes only test readiness; it does not claim a production sizing defect.