Skip to content

Wait for the native window show before e2e launch returns - #198

Merged
BunsDev merged 3 commits into
mainfrom
e2e-window-show-wait
Oct 14, 2026
Merged

BunsDev merged 3 commits into
mainfrom
e2e-window-show-wait

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Diagnose the v0.0.7 release-run failure that was retained for follow-up (run 37359528998, attempt 1: release.spec minimum-window test read innerWidth 1380 for 15 s after setContentSize(900, 600)).
  • Make the e2e launch helper wait for each window's native show event, recorded from a listener installed before the window exists, instead of isVisible().
  • Route the update-banner spec's remaining setSize through resizeWindow.
  • Record the cause in the v0.0.7 release review and the change in docs/status.md.

Cause

The retained Playwright trace shows launch()'s isVisible() poll passing on its first sample and the resize issued 10 ms later; every poll sample for 15 s then read 1380. In Electron 44 on macOS, NativeWindowMac::IsVisible() is [window isVisible] plus a minimized check and an inverted occlusion test that never fires in practice, so it turns true the moment ShowInactive() calls orderFrontRegardless. Electron's show event, and BrowserWindow::OnWindowShow -> WebContents::WasShown, fire only from windowDidChangeOcclusionState, when the window server reports the window visible. A probe of ten local launches with the app's own showInactive() measured show 35–50 ms after isVisible() turned true, and the trace places the failing resize inside that gap on the slower hosted runner.

resizeWindow (#167, 9d93586) now settles native and renderer geometry at every measurement site, and the minimum-window test has passed on every main run since. This PR closes the gap at its source so launch-time work is not raced, and keeps resizeWindow as the guard at measurement sites. The removed comment said inactive windows may never emit show; the probe saw it on every launch, and this PR's hosted run tests that claim on the runner itself.

Verification

  • Local, on this tree rebased onto main at e3fecf0: workspace build; unit suites (core 15, desktop 1260 with 16 skipped, site 21, store-desktop 10, 16 further checks; 0 failures); focused e2e release, layout, window-lifecycle, updates, panel-layout: 35 passed in 2.2 min.
  • Before the rebase, the same launch change with its own resize helper passed the full desktop suite at a79c0f3: 122 passed in 3.6 min.
  • Hosted: the unit + e2e (macOS) check on this PR. If the launch poll ever fails there with "the window never reported its native show", the show claim is wrong on the runner and the launch change should be dropped while the diagnosis stays.

The e2e launch helper polled BrowserWindow.isVisible(), which in Electron 44
on macOS turns true as soon as the window is ordered front, before the window
server has displayed it and before Electron emits `show`. The v0.0.7 release
run's first attempt (37359528998) resized the window 10 ms into that gap and
the renderer never saw the new size: release.spec's minimum-window test read
innerWidth 1380 for 15 s. Across ten local launches `show` followed
isVisible() by 35-50 ms; showInactive emits it every time.

launch() now records each window's `show` from a listener installed before
any window exists, so the one-time event cannot be missed, and waits for it.
resizeWindow (#167, 9d93586) already settles native and renderer geometry at
every measurement site; the update-banner spec's remaining setSize call now
goes through it too. The release review records the cause.

Coven-Harness: Claude Code / claude-fable-5-1
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
modex Ready Ready Preview Oct 14, 2026 7:58pm UTC

Request Review

Merging main put the note inside the shipped v0.0.12 section, because
the bullet it preceded moved there. The launch helper change is
unreleased.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev merged commit 74e689d into main Oct 14, 2026
7 checks passed
@BunsDev
BunsDev deleted the e2e-window-show-wait branch October 14, 2026 20:27

This branch was successfully deployed

1 active deployment
Preview — 7b5dfd81 Deployed Oct 14, 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