From 50c2c91d4af169150346d68310023e18b425cb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 7 Oct 2026 13:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=B9=E8=AF=9D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E3=80=8C=E8=BF=90=E8=A1=8C=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E3=80=8D=E8=A2=AB=E8=AE=BE=E7=BD=AE=E6=B5=AE=E5=B1=82=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E7=9A=84=E5=B1=82=E7=BA=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整 .project-chat-settings-backdrop 的 z-index 从 240 降到 210,让二级浮层运行配置(220)与插件面板(230)正常叠在其上 新增 windowChromeOverlayContract 回归测试,约束对话设置 / 运行配置 / 插件面板三层 z-index 严格递增 --- apps/ai-game-creator-shell/src/styles.css | 8 +++++++- .../tests/windowChromeOverlayContract.test.ts | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/styles.css b/apps/ai-game-creator-shell/src/styles.css index 05f24f2c9..af78f75d4 100644 --- a/apps/ai-game-creator-shell/src/styles.css +++ b/apps/ai-game-creator-shell/src/styles.css @@ -12861,7 +12861,13 @@ button.design-workspace-tree__entry:hover, right: 0; bottom: 0; left: 0; - z-index: 240; + /* + * 必须低于二级浮层:这里点「运行配置」打开的是既有 `.settings-overlay` + * (z-index 220),插件面板 `.agc-plugin-panel-overlay` 为 230。 + * 设置浮层若压在最上层,二级弹窗就会盖在它下面;210 仍高于工作台内容 + * 与启动器(200),同时让运行配置 / 插件面板正常叠在其上。 + */ + z-index: 210; display: grid; padding: 20px; background: rgb(65 43 34 / 42%); diff --git a/apps/ai-game-creator-shell/tests/windowChromeOverlayContract.test.ts b/apps/ai-game-creator-shell/tests/windowChromeOverlayContract.test.ts index b9bbb16d9..2369c472c 100644 --- a/apps/ai-game-creator-shell/tests/windowChromeOverlayContract.test.ts +++ b/apps/ai-game-creator-shell/tests/windowChromeOverlayContract.test.ts @@ -50,4 +50,19 @@ describe('窗口标题栏与全屏弹层的层叠约定', () => { `${selector} 必须声明 top: var(--window-chrome-height)`, ).toBe('var(--window-chrome-height)'); }); + + it('从「对话设置」打开的二级弹窗叠在设置浮层之上', () => { + const zIndexOf = (selector: string) => { + const raw = declarationsForSelector(css, selector).get('z-index'); + expect(raw, `${selector} 必须声明 z-index`).toBeDefined(); + return Number(raw); + }; + const settingsZIndex = zIndexOf('.project-chat-settings-backdrop'); + const runtimeConfigZIndex = zIndexOf('.settings-overlay'); + const pluginPanelZIndex = zIndexOf('.agc-plugin-panel-overlay'); + // 对话设置里点「运行配置」会就地打开 `.settings-overlay`,插件面板又从 + // 运行配置里打开;三层必须严格递增,否则后开的会盖在上一层下面。 + expect(runtimeConfigZIndex).toBeGreaterThan(settingsZIndex); + expect(pluginPanelZIndex).toBeGreaterThan(runtimeConfigZIndex); + }); });