From f052831fea194f8741dd529f38569448ede2d452 Mon Sep 17 00:00:00 2001 From: CRT Date: Fri, 23 Oct 2026 10:44:54 +0800 Subject: [PATCH] Desktop boot check: the dry-run preview is accepted whenever it shows, also during waits --- tools/desktop-boot-check.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/desktop-boot-check.ts b/tools/desktop-boot-check.ts index d17deac..bb3843d 100644 --- a/tools/desktop-boot-check.ts +++ b/tools/desktop-boot-check.ts @@ -236,8 +236,10 @@ interface CaseResult { name: string; ok: boolean; problems: string[]; visited: n * going on: the native confirm dialog after it is what each case checks. */ async function newPage(ctx: { newPage(): Promise }): Promise { const page = await ctx.newPage(); - await page.addLocatorHandler(page.locator('.ds-scrim:has(.dr-cmd)'), async () => { - await page.locator('.ds-scrim:has(.dr-cmd) .btn-primary').click(); + // a person reads the preview and presses Continue, also while the check only waits (no action of its own to block) + await page.addInitScript(() => { + const go = () => { const b = document.querySelector('.ds-scrim:has(.dr-cmd) .btn-primary'); if (b) b.click(); }; + new MutationObserver(go).observe(document, { childList: true, subtree: true }); }); return page; }