From 758925edb805c1df7ad219a9d1ff8c0bf9d4f42a Mon Sep 17 00:00:00 2001 From: yuxuanhui Date: Thu, 10 Sep 2026 13:16:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=A6=86=E7=9B=96=E6=8A=BD=E5=B1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/sidebar.css | 2 +- frontend/tests/sidebar.spec.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/sidebar.css b/frontend/src/components/sidebar.css index 15f5f11..f90c957 100644 --- a/frontend/src/components/sidebar.css +++ b/frontend/src/components/sidebar.css @@ -224,7 +224,7 @@ position: fixed; top: 0; right: var(--chat-space, 0px); - z-index: 1002; + z-index: 30; background: var(--surface); display: flex; align-items: center; diff --git a/frontend/tests/sidebar.spec.ts b/frontend/tests/sidebar.spec.ts index 7b553de..d37dbae 100644 --- a/frontend/tests/sidebar.spec.ts +++ b/frontend/tests/sidebar.spec.ts @@ -62,6 +62,18 @@ test("sidebar geometry, recent navigation, user menu and compact tools", async ( ).toHaveAttribute("aria-current", "page"); await page.getByRole("button", { name: "同步任务", exact: true }).click(); await expect(page.locator(".job-panel")).toBeVisible(); + // The drawer must receive pointer events where the global tools sit behind it. + await expect.poll(() => + page.getByRole("toolbar").getByRole("button").evaluateAll((buttons) => + buttons.every((button) => { + const rect = button.getBoundingClientRect(); + return Boolean(document.elementFromPoint( + rect.x + rect.width / 2, + rect.y + rect.height / 2, + )?.closest(".job-panel")); + }), + ), + ).toBe(true); await page.locator(".job-panel .semi-sidesheet-close").click(); await expect(page.locator(".job-panel")).not.toBeVisible(); await page.getByRole("button", { name: "切换研究助手" }).click();