From 512ac91f14d22a3bea3a43b70a52cfe1da5dc785 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:12:57 -0700 Subject: [PATCH] fix(win-e2e): survive the agent-CLI feature-wall modal in harness driving MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The modal renders off an async capability check and can be up at (or appear right after) the harness's first interaction, swallowing every click until closed — both crash-survival attempts on #9446 timed out exactly there, while the app itself was healthy. Add its 'Close' button to the overlay dismiss list, dismiss overlays before ensureTerminal's first probe, and retry the first New-workspace click through a dismissal pass instead of hanging the full 60s. --- tools/win-update-e2e/app-driver.mjs | 32 ++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/tools/win-update-e2e/app-driver.mjs b/tools/win-update-e2e/app-driver.mjs index 076aa2ceaa5..3a0b4d9efb9 100644 --- a/tools/win-update-e2e/app-driver.mjs +++ b/tools/win-update-e2e/app-driver.mjs @@ -237,6 +237,9 @@ export async function waitForTerminalReady(page, timeoutMs = 60_000, terminalTab * workspace (which would mask a broken restore). */ export async function ensureTerminal(page, { allowCreate = true, timeoutMs = 60_000 } = {}) { + // Why: the agent-CLI feature-wall modal can already be up at first interaction + // (it renders off an async capability check that races app launch). + await dismissOverlays(page) const visibleTerminal = page.locator(TERMINAL_SURFACE_VISIBLE).first() if (await visibleTerminal.isVisible().catch(() => false)) { await waitForTerminalReady(page, timeoutMs) @@ -264,10 +267,25 @@ export async function ensureTerminal(page, { allowCreate = true, timeoutMs = 60_ * plain terminal (not an agent), then submit "Create worktree". */ async function createWorkspaceFromSeededRepo(page, timeoutMs) { - await page + // Why: an overlay (e.g. the agent-CLI feature wall) can appear between the + // dismissal rounds and this first click; retry with a dismissal pass instead + // of force-clicking through whatever is on top. + const newWorkspace = page .getByRole(NEW_WORKSPACE_BUTTON.role, { name: NEW_WORKSPACE_BUTTON.name }) .first() - .click({ timeout: timeoutMs }) + let clicked = false + for (let attempt = 0; attempt < 3 && !clicked; attempt++) { + clicked = await newWorkspace + .click({ timeout: 15_000 }) + .then(() => true) + .catch(() => false) + if (!clicked) { + await dismissOverlays(page) + } + } + if (!clicked) { + await newWorkspace.click({ timeout: timeoutMs }) + } // Choose the plain-terminal mode (best-effort — if it is already the default // or the label differs, the create below still produces a worktree). await page @@ -289,7 +307,15 @@ async function createWorkspaceFromSeededRepo(page, timeoutMs) { } } -const OVERLAY_DISMISS_LABELS = ['Got it', 'Dismiss setup scripts', 'Dismiss tip', 'Dismiss update'] +// Why 'Close': the agent-CLI feature-wall modal ("Let agents drive Orca with the Orca CLI") +// can render after an async capability check, mid-run, and swallows all clicks until closed. +const OVERLAY_DISMISS_LABELS = [ + 'Got it', + 'Dismiss setup scripts', + 'Dismiss tip', + 'Dismiss update', + 'Close' +] /** * Best-effort dismissal of the modals/banners that appear after creating a