Skip to content

Run local desktop e2e without taking the operator's screen and focus #232

Closed

Description

@yansfil

The task you are doing when you want this

Running the desktop e2e suite locally (an agent's QA, or pnpm --dir desktop e2e) while the operator keeps working in the installed hide.app on the same Mac.

What hide does today

Web e2e runs headless (web/playwright.config.ts, headless: true), so it never touches the screen.
Desktop e2e launches real Electron windows through _electron.launch (desktop/e2e/fixture.ts:83, 99).
The host shows each window on ready-to-show with window.show() (desktop/src/main/host.ts:458-472), which on macOS brings the app to the front and takes keyboard focus.
Specs that capture a window add --disable-backgrounding-occluded-windows so an occluded window keeps painting, but nothing keeps the window from coming to the front.
So test windows pop over the operator's work, keys typed at that moment can land in a test window, and a spec that depends on focus can fail when the operator clicks elsewhere.
On 2026-09-28, six implementors running desktop QA in parallel on the operator's Mac hit exactly this; one had to gate its synthetic drags on a frontmost-PID check.

What it should do instead

Under e2e, the desktop host shows its window without activating the app (for example showInactive() behind an e2e-only switch, or an off-screen position) and keeps painting while occluded.
Specs that truly need focus or native input (real keystrokes, pinch, native drag) mark themselves and focus the window explicitly; every other spec passes while the operator keeps using the Mac.
CI keeps its current behavior.

Where the authority for it lives

The desktop host (desktop/src/main/host.ts) and the e2e fixture (desktop/e2e/fixture.ts); the switch must not change the shipped app's behavior.

Activity

  1. added
    enhancement
    on Sep 28, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions