Skip to content

fix(desktop-e2e): let the user's click focus the page before reloading in the leave-page Escape check - #10385

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-page-dialog-focus-race
Nov 24, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/desktop-page-dialog-focus-race

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • browser-page-dialogs.spec.ts "Escape keeps the draft and returns typing to the page" failed intermittently (twice in the last ~150 desktop-e2e runs) with toBeFocused() reporting the Stay button "inactive"
  • Playwright's toBeFocused also requires document.hasFocus(), so the button can be the active element while the Sim window lacks keyboard focus. The step clicks into the page with sendInputEvent and reloads straight away; that queued click can take focus into the page after the leave-page modal has moved focus to the Sim window
  • The step now waits until the page actually holds focus before reloading, the way a real click completes before the user reaches the reload button. The existing post-Escape focus poll shares the same helper

Type of Change

  • Bug fix

Testing

  • desktop type-check, biome
  • desktop-e2e runs this spec in CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 24, 2026 11:00pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The Escape check now waits for the embedded page to take focus before reloading.

  • The Escape check waits for the page to take focus before reloading.

Reviews (1) · Last reviewed commit: "fix(desktop-e2e): let the user's click f..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 927594b into staging Nov 24, 2026
50 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/desktop-page-dialog-focus-race branch November 24, 2026 23:09

This branch was previously deployed

1 inactive deployment
Preview — 11dd2bdb Deployed Nov 24, 2026 by vercel[bot]
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.

1 participant