Skip to content

Flaky desktop e2e: area cycle native spec loses the keyboard after a blur or a second cycle start #311

Closed

Description

@yansfil

What happened

desktop/e2e/browser.spec.ts "area cycle native: page input previews one exact area, releases once and cancels" (@needs-focus) fails intermittently on the macOS desktop job at three different steps, all after the window and keyboard handbacks that the earlier fix (#304) already waits for in its focus() helper:

It passed in about 18 other desktop runs. The runners are the same image (macos-15-arm64 20260907.0337.1) on passing and failing runs, so the image is not the difference.

Logs and artifacts (hide-desktop-e2e-logs) held no event naming which side refused: the host started no hold or took focus back silently, and the shell rejects an unadmitted start with endNativeCycle and no record.

What you expected

Native keys posted after the spec has seen the page hold the keyboard and the shell admit it start the hold, and a window that comes back after a blur gives the keyboard back to the page.

Steps to reproduce

Not reproducible on a workstation: @needs-focus specs take the operator's screen and keyboard, so they run in CI only.

  1. Rerun the desktop job on a branch until it fails (about 2 of 20 runs).

Versions

Diagnostics

PR #310 adds two host log events, written to the desktop job's log:

  • browser.window_return with page_focused: whether the page held the keyboard right after the host's one refocus on window return. false means the attempt was refused (the page not yet accepting focus after the window came back); true followed by the step failing means the shell or macOS activation took it back afterwards.
  • browser.cycle_start_refused with page_visible, page_focused, window_focused: a Control-Tab (or the rebound cycle chord) reached a page and started no hold.

The spec is tagged @flaky and runs in the desktop job's non-blocking quarantine step until a failure there names the cause.

  • Expires: 2026-10-12

The @flaky tag is removed by this date: the cause is fixed, or the test is split by contract or deleted. A longer timeout or more retries does not end this issue.

Activity

  1. added
    bug
    on Oct 1, 2026
  2. added
    quarantine
    on Oct 5, 2026
  3. added a commit that references this issue on Oct 30, 2026
    421141e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugquarantine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions