From 2f56bc78022eb61b64362160169eeea47076d55c Mon Sep 17 00:00:00 2001 From: t8y2 Date: Fri, 9 Oct 2026 13:20:12 +0800 Subject: [PATCH] fix(ci): clear sidebar search filter when a ui-preview step fails --- .github/ui-preview/record.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/ui-preview/record.mjs b/.github/ui-preview/record.mjs index 0e88188099..a60d0c153a 100755 --- a/.github/ui-preview/record.mjs +++ b/.github/ui-preview/record.mjs @@ -586,6 +586,18 @@ async function main() { // shows up in the shots that follow: clear it before going on await page.keyboard.press("Escape").catch(() => {}); await sleep(400); + // an active sidebar search keeps the tree filtered down to + // nothing, starving every later lookup of its targets: empty it + // the way a user would + try { + const box = page.locator(".connection-tree-search input").first(); + if ((await box.isVisible().catch(() => false)) && (await box.inputValue().catch(() => ""))) { + await box.click({ timeout: 1500 }); + await page.keyboard.press("ControlOrMeta+A"); + await page.keyboard.press("Delete"); + await sleep(300); + } + } catch {} if (repairs >= 3) continue; repairs++; // the page as it is now, and what went wrong: the rest of the scene again