From 077d4d95a9b02fb9ed7e7eff993ec5fac20bd5ab Mon Sep 17 00:00:00 2001 From: "agermel@foxmail.com" Date: Mon, 27 Jul 2026 02:15:31 +0800 Subject: [PATCH 1/2] fix(ui): restore desktop main layout --- apps/src/app/accounts/accounts-page-view.tsx | 2 +- apps/src/app/globals.css | 15 +++- apps/src/components/layout/app-frame.tsx | 15 ++-- apps/tests/app-frame-scale.test.mjs | 13 ++-- ...7-desktop-sticky-action-column-pr-draft.md | 73 +++++++++++++++++++ 5 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md diff --git a/apps/src/app/accounts/accounts-page-view.tsx b/apps/src/app/accounts/accounts-page-view.tsx index 5a7263a77..3e01d29de 100644 --- a/apps/src/app/accounts/accounts-page-view.tsx +++ b/apps/src/app/accounts/accounts-page-view.tsx @@ -816,7 +816,7 @@ export function AccountsPageView(props: AccountsPageViewProps) { - +
diff --git a/apps/src/app/globals.css b/apps/src/app/globals.css index 006c39870..caee4969e 100644 --- a/apps/src/app/globals.css +++ b/apps/src/app/globals.css @@ -1010,20 +1010,27 @@ tr { .table-sticky-action-head { z-index: 4; - background: var(--console-panel-strong); + background: var(--card-solid); } .table-sticky-action-cell { z-index: 3; - background: var(--console-panel); + background: var(--card-solid); +} + +[data-appearance='modern'] .table-sticky-action-head, +[data-appearance='modern'] .table-sticky-action-cell { + -webkit-backdrop-filter: none; + backdrop-filter: none; + background: var(--card-solid); } [data-slot="table-body"] [data-slot="table-row"]:hover .table-sticky-action-cell { - background: var(--table-row-hover-bg); + background: color-mix(in srgb, var(--card-solid) 94%, rgb(var(--primary-rgb)) 6%); } [data-slot="table-body"] [data-slot="table-row"][data-state="selected"] .table-sticky-action-cell { - background: var(--table-row-selected-bg); + background: color-mix(in srgb, var(--card-solid) 90%, rgb(var(--primary-rgb)) 10%); } /* 🚀 Performance Mode Logic (Fixed Selectors) */ diff --git a/apps/src/components/layout/app-frame.tsx b/apps/src/components/layout/app-frame.tsx index d5e8422e7..0ce88d3f8 100644 --- a/apps/src/components/layout/app-frame.tsx +++ b/apps/src/components/layout/app-frame.tsx @@ -59,16 +59,11 @@ export function AppFrame({ children }: { children: React.ReactNode }) { data-slot="app-main-column" className="flex min-w-0 flex-1 flex-col overflow-hidden" > -
-
-
- - -
-
+
+
+ + +
); diff --git a/apps/tests/app-frame-scale.test.mjs b/apps/tests/app-frame-scale.test.mjs index 64fbcf5df..db4175315 100644 --- a/apps/tests/app-frame-scale.test.mjs +++ b/apps/tests/app-frame-scale.test.mjs @@ -14,12 +14,13 @@ const appFramePath = path.join( "app-frame.tsx", ); -test("宽屏主内容区使用 90% 视觉比例并补偿布局尺寸", async () => { +test("主内容区保持普通布局,浮层和 sticky 使用同一坐标系", async () => { const source = await fs.readFile(appFramePath, "utf8"); - assert.match(source, /data-slot="app-main-scale"/); - assert.match(source, /xl:scale-90/); - assert.match(source, /xl:h-\[111\.111111%\]/); - assert.match(source, /xl:w-\[111\.111111%\]/); - assert.match(source, /origin-top-left/); + assert.doesNotMatch(source, /data-slot="app-main-scale"/); + assert.doesNotMatch(source, /xl:scale-90/); + assert.doesNotMatch(source, /xl:\[zoom:0\.9\]/); + assert.doesNotMatch(source, /xl:h-\[111\.111111%\]/); + assert.doesNotMatch(source, /xl:w-\[111\.111111%\]/); + assert.match(source, /
[\s\S]*
Date: Mon, 27 Jul 2026 03:01:48 +0800 Subject: [PATCH 2/2] chore: delete local docs --- ...7-desktop-sticky-action-column-pr-draft.md | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md diff --git a/docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md b/docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md deleted file mode 100644 index c78496fd8..000000000 --- a/docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md +++ /dev/null @@ -1,73 +0,0 @@ -# PR Draft: 修复桌面全屏账号表操作列偏移 - -## 标题 - -修复桌面全屏账号表操作列偏移 - -## 变更摘要 - -- 移除右侧工作区的全局 90% 缩放层,恢复 Header 与 main 直接位于主列下的普通布局。 -- 将账号表 sticky 操作列背景改为实色,避免横向滚动内容从操作列下方透出。 -- 为账号表设置稳定最小宽度,并更新源码回归测试,锁住主内容普通布局。 - -## 改动范围 - -- [x] Frontend -- [x] Desktop / Tauri -- [ ] Service -- [ ] Gateway / Protocol Adapter -- [x] Docs / Governance -- [ ] Workflow / Release - -## 主要文件 - -- `apps/src/components/layout/app-frame.tsx` -- `apps/src/app/accounts/accounts-page-view.tsx` -- `apps/src/app/globals.css` -- `apps/tests/app-frame-scale.test.mjs` -- `docs/superpowers/plans/2026-07-27-desktop-sticky-action-column-pr-draft.md` - -## 验证 - -- [x] `pnpm -C apps run test` -- [x] `pnpm -C apps run build` -- [ ] `pnpm -C apps run test:ui` -- [ ] `cargo test --workspace` -- [x] 其他本地验证已说明 - -已执行的实际验证: - -```text -pnpm -C apps run test:runtime -pnpm -C apps run lint -pnpm -C apps run build:desktop -git diff --check -``` - -验证结果: - -```text -test:runtime: 189 passed -lint: passed -build:desktop: passed -git diff --check: passed -``` - -未执行的验证与原因: - -```text -cargo test --workspace 未执行。本次改动只涉及 apps 前端布局、CSS 和前端测试,没有修改 Rust service、Tauri 命令或网关协议代码。 -pnpm -C apps run test:ui 未执行。当前提交只保留源码回归测试。 -``` - -## 风险与影响面 - -- 宽屏桌面主内容区恢复为 100% 普通布局,之前依赖整块 90% 缩放的视觉密度会回到局部 CSS 控制。 -- sticky 操作列改为实色背景后,现代外观下该列的玻璃透明感降低,换来内容遮挡稳定性。 -- 账号表设置最小宽度后,小宽度窗口通过表格容器横向滚动访问完整列。 - -## 备注 - -- 问题引入点是 `3fa3572f feat(ui): restore shell features and dashboard wiring` 中新增的 `app-main-scale`。 -- 当前修复保留作者想要的宽屏可用性目标,把实现方式从整块缩放收敛到局部表格与操作列布局。 -- 提交前请确认未包含敏感 token、cookie、API key。