test(web): stabilize composer menu dismissal settling

Merged
TE
4d ago
+120-30

Fixes the base web red in composer-menu-dismiss.test.ts.

Base red: cmux-next checks run 41482881033 and run 41487395714, plus the repeated base run 41501739354, where the test timed out in settle() while waiting for every popup animation to finish.

The failure is a timing flake under loaded WebKit, not a product regression. git log -S on the assertion points to #23585 (09ca3be94392) and #28494 (fb0888b27fac); neither introduced a functional change to popup dismissal. The test now waits for the requested live popup state and geometry, explicitly ignores popups marked data-ending-style, and no longer couples the pointer-state assertion to unrelated document animation bookkeeping. This preserves the behavior under test while removing the race with stale closing popups.

Validation: focused browser coverage is dispatched through cmux-ci; no heavy build runs locally.

🤖 Generated with Codex
Agent session: agent session


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Stabilizes the composer menu dismissal test so it no longer flakes under loaded WebKit. The base red was a timing flake, not a product regression: the test timed out in settle() while waiting for every popup animation to finish.

  • settle() now matches each open menu to its trigger via aria-controls/aria-label/aria-labelledby, requires the live popup to be fully rendered (non-zero geometry, visible, opacity above 0, pointer-events enabled), ignores data-ending-style popups, and waits for closing popups to stop intercepting input.
  • Chip presses wait until the chip center is uncovered before clicking, and presses wait for open menus to stop moving so rows land in final positions.