Skip to content

fix(ci): board widget e2e clicks are silently swallowed before the frame accepts input - #139635

Merged
steipete merged 1 commit into
mainfrom
claude/modest-brattain-542901
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/modest-brattain-542901

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a flake where the Control UI dashboard A2UI e2e test failed in checks-ui-e2e on unrelated PRs and passed on rerun. Seen 2026-09-05 on #139371, #139355 (run 33993524339), and #139384 (run 33996683994): expected +0 to be 1 polling for the board.event request after clicking the widget's "Refresh data" button, with the failing variant alternating between dark and light. Each failing test was as fast as its passing sibling (~0.6–1.1 s before the poll), so it is an ordering race, not a slow-runner timeout.

Why This Change Was Made

Since #139076 (landed the same morning) a board widget's outer iframe stays inert with opacity: 0 behind a skeleton until the sandbox proxy reports sandbox-resource-loaded, and the frame is revealed two animation frames later. The test polled only for the renderer's custom element inside the widget document, which is defined by the bundle script before the inner document's load event fires, so the click routinely runs while the outer frame is still inert.

On the CI Chromium (the runner image's /usr/bin/chromium-browser, Chromium 151, selected because the Playwright browser cache restores only ~2 MB) the parent document hit-tests the inert iframe element as the target: elementsFromPoint returns the iframe, so Playwright's actionability checks pass, and the real pointerdown/mousedown/click are dispatched to the iframe element in the top document and never enter the widget. Playwright's hit-target interceptor reports "done" when no event reaches the target frame, so the click is a silent no-op and no board.event is ever sent. Even after inert/opacity are cleared, Linux keeps routing pointer events to the outer element until the compositor catches up. macOS Chromium skips inert nodes in elementsFromPoint, so Playwright waits there instead, which is why this never reproduces locally.

#139506 (landed while this was in flight) already waits for the outer frame's reveal and performs one hover with a :hover poll before the click. That converts the silent no-op into a loud failure, but a single hover cannot recover: when the first pointer move is routed to the outer iframe element, nothing re-dispatches it, so the widget document never reports :hover and the poll times out (its own evidence notes a hover-only candidate still failed pointer entry).

This PR moves that wait into the shared harness as clickBoardWidgetControl(page, control): hover, verify the widget document reports :hover, and retry with a leave/re-enter pointer move (which forces fresh hit testing) until it does, bounded by controlUiE2eWaitTimeoutMs, then click. It keeps #139506's reveal assertions in the A2UI test and applies the helper to the sibling board widget click in chat-widget-sandbox.e2e.test.ts, which takes the same reveal path. No timeouts were raised and no assertions weakened.

User Impact

No product change. The Control UI e2e harness gains clickBoardWidgetControl, which every test that clicks into a board widget frame should use; on the CI browser a click that never reaches the widget now retries until the widget observes the pointer and fails loudly at the wait deadline instead of passing the click and timing out on a later assertion.

Evidence

Reproduction and proof ran on a Blacksmith Testbox through scripts/crabbox-wrapper.mjs (Linux, system Chromium 151, the CI browser), using a scratch copy of the test with repeats: 40 per variant and failure diagnostics.

Before, pre-#139506 test (Testbox run 34003022453): 9 silent-click failures across 80 iterations. Every failure recorded inert:true, opacity:0 on the outer frame at click time, with the top document receiving pointerdown/mousedown/click targeted at IFRAME.board-widget__frame and the proxy frame receiving nothing. A minimal cross-origin-frame script on the same box lost 300/300 clicks issued immediately after clearing inert/opacity:0 (DOM check already reported the iframe as the hit target), and 99/100 on fresh pages.

After, helper on the pre-#139506 test (Testbox run 34005414551): 0 failures across the same 80 iterations (40 dark + 40 light, ~0.8 s each), and the hover-verified variant of the minimal script lost 0/300 clicks on the same browser.

Local (macOS, Chrome for Testing): 0 failures in 250 iterations before or after, matching the platform difference above.

Head-to-head on one Testbox (run 34005936572), 40 repeats per variant each: current main (#139506's single hover) failed the light variant once with expected false to be true on its :hover poll, the loud form of the same routing race; this branch's helper passed 80/80.

Locally on the rebased tree: pnpm tsgo:core:test, board-a2ui.e2e.test.ts, and chat-widget-sandbox.e2e.test.ts pass; node scripts/check-changed.mjs passes; Codex autoreview (P0–P2) reported no actionable findings.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 1:04 AM ET / 05:04 UTC.

ClawSweeper review

What this changes

The Control UI browser-test harness retries pointer entry into dashboard widgets before clicking once, preserving the existing interaction assertions.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main retains the single-hover approach that the supplied Linux comparison still found unreliable. No actionable patch defect was found, and the earlier review recorded no code findings.

Priority: P2
Reviewed head: 7ce5ddc4551ec183a2854c2a52219bcc8ec1a6cc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful comparative browser evidence and no actionable correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied Testbox evidence exercises real Chromium input through the Control UI sandbox and observes widget-event outcomes, including 80/80 helper passes against a failing single-hover baseline. Linked raw logs could not be retrieved; the detailed captured evidence remains sufficient for this test-harness repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied Testbox evidence exercises real Chromium input through the Control UI sandbox and observes widget-event outcomes, including 80/80 helper passes against a failing single-hover baseline. Linked raw logs could not be retrieved; the detailed captured evidence remains sufficient for this test-harness repair.
Evidence reviewed 7 items Verified introduced change: The local merge-base-to-head diff matches the supplied introduction evidence: only two browser-test interactions and their shared helper change. The helper checks native hover before issuing one click; it does not retry clicks, force input, or remove assertions.
Remaining behavior on current main: Inspected fetched main's A2UI test: it waits for opacity and non-inert state, performs one hover, then polls hover without moving the pointer again. The proposed shared helper is absent from the three relevant main files. The merged partial repair is #139506.
Production boundary and retained checks: The widget lifecycle renders the sandbox iframe inert and transparent until the render callback and two animation frames reveal it. The A2UI test retains reveal, single-event, payload, scrollbar, and browser-error checks; the sibling test retains visible state and event-payload checks.
Findings None None.
Security None None.

How this fits together

Control UI browser tests load real sandboxed widgets with synthetic Gateway responses. The shared interaction helper synchronizes Chromium input before tests verify widget events and visible results.

flowchart TD
  A[Browser test scenario] --> B[Control UI and sandboxed widget]
  B --> C[Move pointer out and into control]
  C --> D{Widget observes hover?}
  D -->|No, within deadline| C
  D -->|Deadline reached| E[Fail test]
  D -->|Yes| F[Click once]
  F --> G[Verify widget result and Gateway event]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +27. Total +27 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 34 7 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 34 7 +27

Review metrics

Metric Value Why it matters
Browser comparison Baseline 79/80; candidate 80/80 The supplied same-Testbox comparison tests the remaining race after the earlier fix merged.
Production versus test growth Production 0; tests and test support +27 net lines The change consolidates browser synchronization without expanding shipped runtime behavior.

Technical review

Best possible solution:

Keep browser readiness synchronization in the shared test helper while preserving native input, production sandbox behavior, and single-event assertions.

Do we have a high-confidence way to reproduce the issue?

Yes: the supplied Linux Chromium comparison describes the failing single-hover path still present on fetched main. This review verified the source boundary but did not rerun the browser scenario.

Is this the best way to solve the issue?

Yes: waiting for observed pointer entry in the test harness directly addresses the documented browser race while retaining one native click and the existing outcome checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 883d4d65bad1.

Labels

Label justifications:

  • P2: This repairs a demonstrated browser-test race affecting CI reliability without changing product behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied Testbox evidence exercises real Chromium input through the Control UI sandbox and observes widget-event outcomes, including 80/80 helper passes against a failing single-hover baseline. Linked raw logs could not be retrieved; the detailed captured evidence remains sufficient for this test-harness repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied Testbox evidence exercises real Chromium input through the Control UI sandbox and observes widget-event outcomes, including 80/80 helper passes against a failing single-hover baseline. Linked raw logs could not be retrieved; the detailed captured evidence remains sufficient for this test-harness repair.

Evidence

What I checked:

  • Verified introduced change: The local merge-base-to-head diff matches the supplied introduction evidence: only two browser-test interactions and their shared helper change. The helper checks native hover before issuing one click; it does not retry clicks, force input, or remove assertions. (ui/src/test-helpers/control-ui-e2e.ts:224, 7ce5ddc4551e)
  • Remaining behavior on current main: Inspected fetched main's A2UI test: it waits for opacity and non-inert state, performs one hover, then polls hover without moving the pointer again. The proposed shared helper is absent from the three relevant main files. The merged partial repair is fix(ci): synchronize cloud retries and board widget input #139506. (ui/src/e2e/board-a2ui.e2e.test.ts:230, 883d4d65bad1)
  • Production boundary and retained checks: The widget lifecycle renders the sandbox iframe inert and transparent until the render callback and two animation frames reveal it. The A2UI test retains reveal, single-event, payload, scrollbar, and browser-error checks; the sibling test retains visible state and event-payload checks. (ui/src/components/board/board-widget-frame.ts:256, 7ce5ddc4551e)
  • Supplied real-browser comparison: The fully supplied PR body reports Linux Chromium 151 event-routing diagnostics, 9 failures in 80 original iterations, and zero failures in 80 helper iterations. Its head-to-head comparison against the merged single-hover fix reports one baseline failure and 80/80 candidate passes: https://github.com/openclaw/openclaw/actions/runs/34005936572. This exercises the changed browser-input boundary rather than a mocked pointer client. The captured context has sourceRevision c79dfbbb2c4036df8b5a6c92fe1bbc3b9ff6fa165fd6a06b544310376643ae71. GitHub API and browser retrieval failed, so linked raw logs were not independently inspected.
  • Merged area history: Current-main file history identifies Peter Steinberger's prior input-synchronization repair and subsequent top-frame settings correction. This supports routing to steipete independently of authorship of this proposal; unavailable historical blobs prevented exact source-line introduction verification. (ui/src/e2e/board-a2ui.e2e.test.ts, 8214179fe29c)
  • Policy and re-review continuity: Read root and UI AGENTS.md fully, CONTRIBUTING.md, the PR template, and applicable ownership entries; no maintainer-notes directory exists. CONTRIBUTING.md discourages unsolicited known-main CI repairs, while this is maintainer-authored work with a protected maintainer label. The previous review's policy concern is historical context, not an unresolved code finding or a new approval requirement. (CONTRIBUTING.md:21, 7ce5ddc4551e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T02:37:58.710Z sha eaf6f78 :: blocked before merge. :: none
  • reviewed 2026-09-06T04:26:34.185Z sha 8fdda747a68108782b75e51343bada2b69dfc1cd :: blocked before merge. :: none

@steipete
steipete force-pushed the claude/modest-brattain-542901 branch from eaf6f78 to 8fdda74 Compare September 6, 2026 04:21
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
`board-a2ui.e2e.test.ts` flaked in `checks-ui-e2e` with `expected +0 to be 1`
polling for the `board.event` request after clicking the widget's button.
Since #139076 a board widget's outer iframe stays `inert` and transparent
until the sandbox reports the document rendered, and the test polled only
for the renderer's custom element, which is defined before that reveal. On
the CI Chromium (Linux system browser), the parent document hit-tests the
inert iframe element as the target, so Playwright's actionability checks
pass while the real click is dispatched to the iframe element and never
enters the widget; Playwright reports a click that reached no frame as
delivered. Even after the reveal, Linux keeps routing pointer events to
the outer element until the compositor catches up. macOS Chromium skips
inert nodes in `elementsFromPoint`, so the race never reproduced locally.

Add `clickBoardWidgetControl` to the Control UI e2e harness: hover, verify
the widget document reports `:hover`, retry with a leave/re-enter move
until it does, then click, failing loudly at the wait deadline. Use it for
the A2UI click and the sibling board widget click in the chat widget
sandbox test.

Blacksmith Testbox (Linux, Chromium 151, 40 repeats per variant): 9/80
silent-click failures before, 0/80 after; a minimal cross-origin frame
script lost 300/300 immediate post-reveal clicks and 0/300 hover-verified.
@steipete
steipete force-pushed the claude/modest-brattain-542901 branch from 8fdda74 to 7ce5ddc Compare September 6, 2026 04:58
@steipete
steipete merged commit 270a650 into main Sep 6, 2026
125 checks passed
@steipete
steipete deleted the claude/modest-brattain-542901 branch September 6, 2026 05:21
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…enclaw#139635)

`board-a2ui.e2e.test.ts` flaked in `checks-ui-e2e` with `expected +0 to be 1`
polling for the `board.event` request after clicking the widget's button.
Since openclaw#139076 a board widget's outer iframe stays `inert` and transparent
until the sandbox reports the document rendered, and the test polled only
for the renderer's custom element, which is defined before that reveal. On
the CI Chromium (Linux system browser), the parent document hit-tests the
inert iframe element as the target, so Playwright's actionability checks
pass while the real click is dispatched to the iframe element and never
enters the widget; Playwright reports a click that reached no frame as
delivered. Even after the reveal, Linux keeps routing pointer events to
the outer element until the compositor catches up. macOS Chromium skips
inert nodes in `elementsFromPoint`, so the race never reproduced locally.

Add `clickBoardWidgetControl` to the Control UI e2e harness: hover, verify
the widget document reports `:hover`, retry with a leave/re-enter move
until it does, then click, failing loudly at the wait deadline. Use it for
the A2UI click and the sibling board widget click in the chat widget
sandbox test.

Blacksmith Testbox (Linux, Chromium 151, 40 repeats per variant): 9/80
silent-click failures before, 0/80 after; a minimal cross-origin frame
script lost 300/300 immediate post-reveal clicks and 0/300 hover-verified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant