Repository navigation
fix(ui): measure mobile picker geometry after animation - #140997
Conversation
Wait for the actual shadow popup through the existing proof-surface owner before sampling viewport bounds. Preserve every geometry assertion and all production CSS. Proof: exact mobile case passes 5/5; full composer e2e file 9/9; changed checks pass; independent review clean through P2. Main and pre-140633 controls each passed only 2/5.
|
🦞👀 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: blocked before merge. Reviewed September 7, 2026, 4:34 AM ET / 08:34 UTC. ClawSweeper reviewWhat this changesThe mobile composer browser test waits for model and effort picker animations to finish before checking their dimensions and placement. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful, focused test repair absent from current main. No actionable patch defects were found; the protected maintainer PR remains subject to normal landing checks. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI browser suite opens chat pickers using synthetic Gateway data and checks their layout. Its shared presentation helper waits for visible content and completed animations before measurements are taken. flowchart LR
A[Synthetic Gateway data] --> B[Mobile chat composer]
B --> C[Open model or effort picker]
C --> D[Wait for visible content and animation completion]
D --> E[Measure viewport bounds]
E --> F[Assert geometry and keyboard behavior]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +6. Total +6 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the existing presentation-readiness helper at the measurement boundary while retaining production animation and strict layout assertions. Do we have a high-confidence way to reproduce the issue? Yes: the focused mobile-picker case, reported intermittent baseline failures, and current animation source establish a concrete reproduction path. This review inspected source without executing it. Is this the best way to solve the issue? Yes: reusing the existing animation-readiness owner fixes when measurements occur without relaxing assertions or changing production layout. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b48ad1e469c6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
) Wait for the actual shadow popup through the existing proof-surface owner before sampling viewport bounds. Preserve every geometry assertion and all production CSS. Proof: exact mobile case passes 5/5; full composer e2e file 9/9; changed checks pass; independent review clean through P2. Main and pre-140633 controls each passed only 2/5.
What Problem This Solves
Resolves an intermittent Control UI e2e failure in the mobile model and effort picker geometry test. It can block unrelated PRs even though the fully opened panels retain the correct width and placement above an expanded composer.
Related: #140633, #140699, #140974.
Why This Change Was Made
The test waited a fixed 100 ms after opening each picker and then measured its bounding box. The popup animates from a scale of 0.9, so its correct 369 px layout width can temporarily measure 332.10 px. This animation was introduced in #133650 and predates #140633; the relevant test, picker renderers, overlays, and composer CSS have no changes between the parent of #140633 and the tested main revision.
The scenario now reuses
waitForControlUiProofSurfaceon the actual animated Web Awesome shadow popup, with the menu as required visible content. This joins the existing presentation owner before measuring. It removes the fixed delay and preserves every numeric geometry assertion, including the 368 px minimum. No production, CSS, dependency, timeout, retry, skip, mock, or baseline changes.User Impact
No product behavior change. The browser test continues to enforce full-width mobile panels, viewport containment, placement above the composer, and keyboard focus behavior, after the opening animation has completed.
Evidence
Five serial headless runs of the exact case, with
CI=1:86a3c7267be6cf361dc08fThe complete
chat-composer-redesign.e2e.test.tsfile passes 9/9. Production delta: 0; test delta: +7/-1, net +6.#140699 is an open draft whose actual fork parent is
b0667d59bcb; it only moves compact context-option styling, with no change to these popup widths or animations. That branch is not a causal candidate. No CSS value was adjusted to accommodate a test result.CI=1 OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-composer-redesign.e2e.test.ts --testNamePattern 'keeps mobile picker panels above an attachment-expanded composer' CI=1 OPENCLAW_UI_E2E_SKIP_REAL_GATEWAY=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-composer-redesign.e2e.test.tsEach run used a task-owned filesystem module cache, separate from the cron repair worktree. Changed checks pass, and independent Codex review is clean through P2. The tested e2e, readiness helper and composer CSS are unchanged across the rebase onto main
15e5cf111d5. Production delta remains zero.Completed landing validation
node scripts/check-changed.mjs: passed.pnpm build: passed in 8m 57.4s on head35fac1ff650af376953065fb5ea4818130813825.pnpm ui:check-performance: passed; startup JavaScript 347,949 B gzip / 8 requests, below 350,953 B / 18 requests. Startup CSS is 43,989 B gzip. The baseline is unchanged.ClawSweeper found no actionable patch defect and flagged missing CI/build/performance evidence. The completed checks above resolve that validation gap.
CI history
The original attempt failed an unrelated image-handoff case (278 passed / 1 failed); one local replay passed. The first retry request encountered GitHub
startup_failurebefore a second attempt was created. A subsequent authorized infrastructure retry started attempt 2, which executed the UI e2e step and passed. This was one executed test rerun on the unchanged head; no test assertion was weakened.Browser/Gateway data is synthetic. No external-provider live claim or separately allocated Testbox lease.