Repository navigation
Description
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:
- Line 793, the window-return step: after
window.blur()cancels a fresh hold, the test returns the window and polls 5 s for the page to hold native focus again. PR Cut the web end-to-end setup cost: one hided build, one zsh download, six Linux shards #305 run 36898497112, attempts 1 and 2 (the desktop job, 17:27 and 17:38 UTC). The host gives the page the keyboard once, in awindow.once("focus")listener (desktop/src/main/browser.ts); nothing waits or retries if that attempt is refused or taken back. - Line 774, the second cycle start: Control-Tab posted after the Escape case's
focus()shows no[data-cycle=area]overlay for 5 s. main run 36905666917 (c04909a). - Lines 745 and 786 in the version before Fix the evening e2e flakes at their causes and quarantine the split-output stall #304 (the first posting and the blur step); these are the failures that led to Fix the evening e2e flakes at their causes and quarantine the split-output stall #304.
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.
- Rerun the desktop job on a branch until it fails (about 2 of 20 runs).
Versions
- hide: main at c04909a and PR Cut the web end-to-end setup cost: one hided build, one zsh download, six Linux shards #305 at 26ed9e9
- Herdr: v0.9.1 (the pin)
- Electron 44.4.5 on macos-15-arm64
Diagnostics
PR #310 adds two host log events, written to the desktop job's log:
browser.window_returnwithpage_focused: whether the page held the keyboard right after the host's one refocus on window return.falsemeans the attempt was refused (the page not yet accepting focus after the window came back);truefollowed by the step failing means the shell or macOS activation took it back afterwards.browser.cycle_start_refusedwithpage_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
Quarantine the area cycle native spec under #311 on a desktop step th…
Fix the web and desktop e2e flakes at their causes (#310)
Retry a failed test once in CI and file the flaky ones as issues (#419)
Remove the quarantine steps now that no e2e test is tagged @flaky (#493)
fix: bring a new worktree forward once listed, and end three desktop …