Skip to content

test(e2e): stabilize native clicks during title-bar layout changes - #2081

Closed
benceruleanlu wants to merge 1 commit into
mainfrom
codex/fix-update-pill-click-race
Closed

benceruleanlu wants to merge 1 commit into
mainfrom
codex/fix-update-pill-click-race

Conversation

@benceruleanlu

Copy link
Copy Markdown
Member

The desktop-update restart-prompt test intermittently times out in Windows CI after the click helper reports success (failure example). The helper can measure a button, let its layout change, and then send native input to the old coordinates.

Wait for the target element and its bounds to remain stable across two animation frames before dispatching native clicks. Preserve the existing hit test and timeout. Add a regression that moves the update pill after its first bounds measurement and verifies that the restart modal opens; it reproduces the timeout with the previous helper.

Validation:

  • Regression fails before the fix and passes afterward.
  • Update-pills suite repeated 20 times on macOS with retries disabled: 140 passed.
  • Related native-input, dropdown, and title-bar hover tests: 9 passed.
  • Full pnpm run typecheck, pnpm run lint, and pnpm run format:check passed.

Windows confirmation remains for CI.

@benceruleanlu
benceruleanlu requested review from a team as code owners November 13, 2026 22:01
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

sendClick now requires a visible, unobstructed target to remain unchanged across two animation-frame checks. The update-pill end-to-end test simulates movement after reading the pill’s bounds and checks that the restart prompt appears.

Changes: Click Target Stability

Layer / File(s) Summary
Stable click check
e2e/support/cdpPages.ts, e2e/update-pills.test.ts
sendClick waits for two consecutive checks with the same target and rectangle, using animation frames within the existing five-second deadline. The blocked-click error mentions a potentially moving element. An end-to-end test simulates pill movement and checks for the system-modal restart prompt.

Suggested reviewers: deepme987

Merge Risk: Minimal · up to b85f9

This change only makes a test-helper click wait for a stable target before sending native input. It has no production impact, and nothing blocks merging.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c4b2a79b-c275-43d8-a939-d51253ba8912
Commits

Reviewing files that changed from the base of the PR and between b425688 and b85f999.

Files selected for processing: 2

  • e2e/support/cdpPages.ts
  • e2e/update-pills.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@coderabbitai
coderabbitai Bot requested a review from deepme987 November 13, 2026 22:03
@alexisrolland
alexisrolland added this pull request to the merge queue Nov 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 14, 2026

Copy link
Copy Markdown
Member Author

Closing as superseded by #2093, which checks the actual press target and suppresses missed gestures before re-aiming. The moving-pill regression will be carried forward there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants