From 664a96dd19725765713e58150858cfcf9ce110f2 Mon Sep 17 00:00:00 2001 From: "frank.wang" Date: Thu, 1 Oct 2026 12:02:21 +0800 Subject: [PATCH 01/20] =?UTF-8?q?feat(windows):=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E4=BB=8E=E6=B4=BB=E5=8A=A8=E6=A0=8F=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E7=A7=BB=E8=87=B3=E6=A0=87=E9=A2=98=E6=A0=8F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=8C=89=E9=92=AE=E6=97=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Windows 标题栏在搜索(放大镜)按钮后新增设置齿轮按钮,点击打开设置对话框 - 活动栏移除设置项,右键「在活动栏中显示」列表不再包含设置 - settings 移出活动栏 ID 集合,旧设置文件中遗留的排序/隐藏条目在归一化时自动清理 - 同步更新 item-order 与 git-log keymap 测试断言,新增 settings 不属于活动栏的防回归断言 - 平台功能矩阵新增 workbench-settings-entry 行并重新生成 md/csv 视图 --- docs/development/platform-parity-matrix.csv | 1 + docs/development/platform-parity-matrix.md | 9 ++++--- shared/platform-feature-matrix.json | 25 +++++++++++++++++++ .../defaults/default-keymaps.git-log.test.ts | 5 +--- .../components/sidebar/main-sidebar.tsx | 4 --- .../sidebar/sidebar-pane-selector.tsx | 19 -------------- .../features/layout/config/item-order.test.ts | 13 ++++++---- .../src/features/layout/config/item-order.ts | 4 +-- .../window/components/title-bar/title-bar.tsx | 17 +++++++++++++ 9 files changed, 59 insertions(+), 38 deletions(-) diff --git a/docs/development/platform-parity-matrix.csv b/docs/development/platform-parity-matrix.csv index 767f5eb16..e95483845 100644 --- a/docs/development/platform-parity-matrix.csv +++ b/docs/development/platform-parity-matrix.csv @@ -88,6 +88,7 @@ plugin-extension-management,扩展,插件与主题,插件、语言服务与主 onboarding-welcome,启动与窗口,首次启动,欢迎页、项目入口与首次启动引导,已实现,待验证,已实现,待验证,Onboarding,清空首次启动状态,验证打开项目、克隆项目、最近项目和跳过引导;在 macOS 深色与浅色模式检查欢迎页布局、颜色和交互,确认默认及最小内容尺寸均为 800×650、可向屏幕可用区域放大,左下角齿轮菜单采用设置页下拉框配色并可进入设置与检查更新。,,macos/Sources/Lithe/Views/App/WelcomeView.swift; macos/Sources/Lithe/Views/Workspace,windows/tauri/src/features/onboarding; windows/tauri/src/features/bootstrap command-palette,工作台,命令与布局,命令面板与全局动作,已实现,待验证,已实现,待验证,Workbench,搜索并执行打开面板、运行、Git 和设置命令,确认快捷键和不可用命令状态。,,macos/Sources/Lithe/Models/Keymap/LitheCommandCatalog.swift; macos/Sources/Lithe/Views/Search/SearchEverywhereView.swift,windows/tauri/src/features/command-palette workbench-compact-menu-bar,工作台,命令与布局,紧凑菜单栏可在标题栏左侧原位展开完整水平菜单,并在点击外部或按 Escape 后收起,不遮挡工作区,平台专属,不适用,已实现,待验证,Workbench,在 Windows 工作台点击标题栏左端菜单按钮,确认汉堡按钮由“文件”菜单项取代,“文件”项处于选中状态且其下拉菜单立即展开;菜单与标题栏同高,不覆盖编辑区域,项目/分支控件在展开时隐藏。检查常驻品牌标识与下方活动栏图标列对齐且不可选中,并确认项目菜单显示当前项目图标(无自定义图标时显示项目缩写)。点击其他菜单项时菜单条保持展开并执行动作;点击工作区、标题栏空白和右侧控件或按 Escape 后收起;按 Escape 后确认焦点返回菜单入口;窄窗口确认菜单在标题栏内水平滚动且不挤压窗口控件。macOS 保持系统菜单栏行为。,,macos/Sources/Lithe/LitheApp.swift,windows/tauri/src/features/window/components/title-bar/title-bar.tsx; windows/tauri/src/features/window/components/title-bar/title-project-menu.tsx; windows/tauri/src/features/window/components/window-menu-bar.tsx; windows/tauri/src/features/window/hooks/use-compact-menu-bar-dismissal.ts; windows/tauri/src/features/window/hooks/use-compact-menu-bar-dismissal.test.tsx +workbench-settings-entry,工作台,命令与布局,从工作台 chrome 打开设置:Windows 点击标题栏搜索按钮右侧的齿轮,macOS 通过应用菜单及面板内入口,已实现,待验证,已实现,待验证,Workbench,在 Windows 打开工作区,确认左侧活动栏底部不再显示设置齿轮,活动栏右键“在活动栏中显示”列表不包含设置项;点击标题栏右上搜索按钮右侧的齿轮打开设置对话框并再次关闭;携带旧版设置文件(活动栏排序或隐藏列表含 settings)启动后确认遗留条目被清理且活动栏显示正常。macOS 通过应用菜单和各面板入口打开设置保持不变。,,macos/Sources/Lithe/Models/LitheAction.swift; macos/Sources/Lithe/Views/App/SettingsView.swift,windows/tauri/src/features/window/components/title-bar/title-bar.tsx; windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx; windows/tauri/src/features/layout/config/item-order.ts window-controls,工作台,窗口管理,标题栏控制窗口最小化、最大化/还原与关闭;命令面板可最小化、最大化及切换全屏,已实现,待验证,已实现,待验证,Workbench,在 macOS 检查系统标题栏控制及全屏入口;在 Windows 验证标题栏最小化、最大化/还原和关闭,以及命令面板的窗口操作,确认图标语义、最大化/还原状态与按钮标签一致,并确认悬停关闭按钮背景贴合窗口右边缘。,,macos/Sources/Lithe/LitheApp.swift; macos/Sources/Lithe/Views/App/RootView.swift,windows/tauri/src/features/window/components/title-bar/window-controls.tsx; windows/tauri/src/features/command-palette/constants/window-actions.tsx; windows/tauri/src/features/window/utils/window-actions.ts workbench-panes,工作台,命令与布局,分栏、面板与工具窗布局,已实现,待验证,已实现,待验证,Workbench,打开、关闭、移动和调整面板,验证布局持久化及高频拖动稳定性;在 macOS 启用背景图后检查项目栏、编辑器、底部及右侧工具窗之间是否仍有清晰的分割区间;将 macOS 左侧工具窗缩至 30pt 并确认目录树始终贴左、不随宽度向右移动、内容不溢出、右上和右下圆角仍可见,关闭并重新打开项目后仍保持窄侧栏及其他布局尺寸,重新展开后布局正常;在 Maven 项目产生构建输出时确认左侧模块按钮可滚动、设置按钮始终完整显示;在亮色主题且有未读通知时确认未打开的铃铛图标清晰可见、打开通知面板后白色图标与蓝色背景成对出现;在深色 Lithe 主题下对照外框渐变、面板对比度、背景图片回退、左右工具窗的 40pt 按钮槽、30pt 选中块及 IDEA Community 图标对比度,悬停工具窗按钮时确认箭头光标,检查项目栏标题颜色和弹窗主按钮主题色;检查 macOS 40pt 顶栏 Logo 与系统窗口按钮垂直居中,项目切换器使用 20pt 项目字母头像和 30pt 悬停块,项目与分支切换块悬停保持箭头光标,红绿灯右侧留白与 IDEA 接近,项目头像、欢迎列表及切换菜单按标准化项目路径共享稳定颜色(超过 9 个项目、移除后重开仍一致),顶栏使用 IDEA Islands 主题项目色并按 85% 混色、600pt 水平和 300pt 垂直范围渐变,深色窗口分隔条四角与底栏缺口无浅色亮斑,缩放窗口及从欢迎页进入工作区再返回后仍对齐。,,macos/Sources/Lithe/Views/Workbench; macos/Sources/Lithe/Views/Workspace/ProjectSidebarView.swift; macos/Sources/Lithe/Views/Components/LitheSplitPaneView.swift; macos/Sources/Lithe/Services/Workbench/WorkbenchLayoutStore.swift; macos/Sources/Lithe/Views/App/RootView.swift; macos/Sources/Lithe/LitheApp.swift; macos/Sources/Lithe/Theme/LitheTheme.swift; macos/Resources/IDEAIcons/expui; macos/Resources/IDEAIcons/terminal,windows/tauri/src/features/panes; windows/tauri/src/features/layout workbench-activity-tooltips,工作台,工作台布局,活动栏图标的稳定悬停说明,已实现,待验证,已实现,待验证,Workbench,逐一悬停左上导航、左下工具入口及右侧通知/插件/Maven,快速切换图标并移出活动栏;确认始终只显示当前图标说明,面板更新和滚动后不残留旧提示,禁用入口可显示说明,短文字自适应且提示不超出窗口边缘。,,macos/Sources/Lithe/Views/Workbench/WorkbenchHoverTooltip.swift; macos/Sources/Lithe/Views/Workbench/WorkbenchView.swift; macos/Tests/LitheTests/WorkbenchHoverTooltipTests.swift,windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx; windows/tauri/src/features/layout/components/footer/footer-tab-control.tsx; windows/tauri/src/features/layout/components/plugin-activity-rail.tsx diff --git a/docs/development/platform-parity-matrix.md b/docs/development/platform-parity-matrix.md index 37a0ad01b..48bbf6b3d 100644 --- a/docs/development/platform-parity-matrix.md +++ b/docs/development/platform-parity-matrix.md @@ -4,9 +4,9 @@ - 最后复核:2026-09-29 - 盘点状态:initial-static-inventory(根据 macOS Views/Application/Services、Windows features/extensions 和共享契约的代码入口进行初版盘点;未替代真实运行验收。) -- 功能项:116 -- macOS:实现:✅ 102 已实现,🟡 3 部分实现,❌ 7 未实现,🧩 4 平台专属;验证:✔️ 0 已验证,🔍 105 待验证,— 11 不适用 -- Windows:实现:✅ 98 已实现,🟡 11 部分实现,❌ 5 未实现,🧩 2 平台专属;验证:✔️ 0 已验证,🔍 109 待验证,— 7 不适用 +- 功能项:117 +- macOS:实现:✅ 103 已实现,🟡 3 部分实现,❌ 7 未实现,🧩 4 平台专属;验证:✔️ 0 已验证,🔍 106 待验证,— 11 不适用 +- Windows:实现:✅ 99 已实现,🟡 11 部分实现,❌ 5 未实现,🧩 2 平台专属;验证:✔️ 0 已验证,🔍 110 待验证,— 7 不适用 ## 实现状态定义 @@ -175,7 +175,7 @@
-工作台 · 12 个能力点 +工作台 · 13 个能力点 | 功能组 | 能力点 | macOS | Windows | 负责人 | 验证方式 | 备注 | | --- | --- | --- | --- | --- | --- | --- | @@ -187,6 +187,7 @@ | 本地历史 | **恢复、删除与持久化**
history-restore | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/History` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/local-history` | Local History | 验证恢复、删除、应用重启后持久化和失败回滚。 | | | 命令与布局 | **命令面板与全局动作**
command-palette | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Models/Keymap/LitheCommandCatalog.swift`、`macos/Sources/Lithe/Views/Search/SearchEverywhereView.swift` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/command-palette` | Workbench | 搜索并执行打开面板、运行、Git 和设置命令,确认快捷键和不可用命令状态。 | | | 命令与布局 | **紧凑菜单栏可在标题栏左侧原位展开完整水平菜单,并在点击外部或按 Escape 后收起,不遮挡工作区**
workbench-compact-menu-bar | 🧩 平台专属
— 不适用
`macos/Sources/Lithe/LitheApp.swift` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/window/components/title-bar/title-bar.tsx`、`windows/tauri/src/features/window/components/title-bar/title-project-menu.tsx`、`windows/tauri/src/features/window/components/window-menu-bar.tsx`、`windows/tauri/src/features/window/hooks/use-compact-menu-bar-dismissal.ts`、`windows/tauri/src/features/window/hooks/use-compact-menu-bar-dismissal.test.tsx` | Workbench | 在 Windows 工作台点击标题栏左端菜单按钮,确认汉堡按钮由“文件”菜单项取代,“文件”项处于选中状态且其下拉菜单立即展开;菜单与标题栏同高,不覆盖编辑区域,项目/分支控件在展开时隐藏。检查常驻品牌标识与下方活动栏图标列对齐且不可选中,并确认项目菜单显示当前项目图标(无自定义图标时显示项目缩写)。点击其他菜单项时菜单条保持展开并执行动作;点击工作区、标题栏空白和右侧控件或按 Escape 后收起;按 Escape 后确认焦点返回菜单入口;窄窗口确认菜单在标题栏内水平滚动且不挤压窗口控件。macOS 保持系统菜单栏行为。 | | +| 命令与布局 | **从工作台 chrome 打开设置:Windows 点击标题栏搜索按钮右侧的齿轮,macOS 通过应用菜单及面板内入口**
workbench-settings-entry | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Models/LitheAction.swift`、`macos/Sources/Lithe/Views/App/SettingsView.swift` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/window/components/title-bar/title-bar.tsx`、`windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx`、`windows/tauri/src/features/layout/config/item-order.ts` | Workbench | 在 Windows 打开工作区,确认左侧活动栏底部不再显示设置齿轮,活动栏右键“在活动栏中显示”列表不包含设置项;点击标题栏右上搜索按钮右侧的齿轮打开设置对话框并再次关闭;携带旧版设置文件(活动栏排序或隐藏列表含 settings)启动后确认遗留条目被清理且活动栏显示正常。macOS 通过应用菜单和各面板入口打开设置保持不变。 | | | 窗口管理 | **标题栏控制窗口最小化、最大化/还原与关闭;命令面板可最小化、最大化及切换全屏**
window-controls | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/LitheApp.swift`、`macos/Sources/Lithe/Views/App/RootView.swift` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/window/components/title-bar/window-controls.tsx`、`windows/tauri/src/features/command-palette/constants/window-actions.tsx`、`windows/tauri/src/features/window/utils/window-actions.ts` | Workbench | 在 macOS 检查系统标题栏控制及全屏入口;在 Windows 验证标题栏最小化、最大化/还原和关闭,以及命令面板的窗口操作,确认图标语义、最大化/还原状态与按钮标签一致,并确认悬停关闭按钮背景贴合窗口右边缘。 | | | 命令与布局 | **分栏、面板与工具窗布局**
workbench-panes | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Workbench`、`macos/Sources/Lithe/Views/Workspace/ProjectSidebarView.swift`、`macos/Sources/Lithe/Views/Components/LitheSplitPaneView.swift`、`macos/Sources/Lithe/Services/Workbench/WorkbenchLayoutStore.swift`、`macos/Sources/Lithe/Views/App/RootView.swift`、`macos/Sources/Lithe/LitheApp.swift`、`macos/Sources/Lithe/Theme/LitheTheme.swift`、`macos/Resources/IDEAIcons/expui`、`macos/Resources/IDEAIcons/terminal` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/panes`、`windows/tauri/src/features/layout` | Workbench | 打开、关闭、移动和调整面板,验证布局持久化及高频拖动稳定性;在 macOS 启用背景图后检查项目栏、编辑器、底部及右侧工具窗之间是否仍有清晰的分割区间;将 macOS 左侧工具窗缩至 30pt 并确认目录树始终贴左、不随宽度向右移动、内容不溢出、右上和右下圆角仍可见,关闭并重新打开项目后仍保持窄侧栏及其他布局尺寸,重新展开后布局正常;在 Maven 项目产生构建输出时确认左侧模块按钮可滚动、设置按钮始终完整显示;在亮色主题且有未读通知时确认未打开的铃铛图标清晰可见、打开通知面板后白色图标与蓝色背景成对出现;在深色 Lithe 主题下对照外框渐变、面板对比度、背景图片回退、左右工具窗的 40pt 按钮槽、30pt 选中块及 IDEA Community 图标对比度,悬停工具窗按钮时确认箭头光标,检查项目栏标题颜色和弹窗主按钮主题色;检查 macOS 40pt 顶栏 Logo 与系统窗口按钮垂直居中,项目切换器使用 20pt 项目字母头像和 30pt 悬停块,项目与分支切换块悬停保持箭头光标,红绿灯右侧留白与 IDEA 接近,项目头像、欢迎列表及切换菜单按标准化项目路径共享稳定颜色(超过 9 个项目、移除后重开仍一致),顶栏使用 IDEA Islands 主题项目色并按 85% 混色、600pt 水平和 300pt 垂直范围渐变,深色窗口分隔条四角与底栏缺口无浅色亮斑,缩放窗口及从欢迎页进入工作区再返回后仍对齐。 | | | 工作台布局 | **活动栏图标的稳定悬停说明**
workbench-activity-tooltips | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Workbench/WorkbenchHoverTooltip.swift`、`macos/Sources/Lithe/Views/Workbench/WorkbenchView.swift`、`macos/Tests/LitheTests/WorkbenchHoverTooltipTests.swift` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx`、`windows/tauri/src/features/layout/components/footer/footer-tab-control.tsx`、`windows/tauri/src/features/layout/components/plugin-activity-rail.tsx` | Workbench | 逐一悬停左上导航、左下工具入口及右侧通知/插件/Maven,快速切换图标并移出活动栏;确认始终只显示当前图标说明,面板更新和滚动后不残留旧提示,禁用入口可显示说明,短文字自适应且提示不超出窗口边缘。 | | diff --git a/shared/platform-feature-matrix.json b/shared/platform-feature-matrix.json index 08f610fe4..8fd688e15 100644 --- a/shared/platform-feature-matrix.json +++ b/shared/platform-feature-matrix.json @@ -2275,6 +2275,31 @@ "owner": "Workbench", "verification": "在 Windows 工作台点击标题栏左端菜单按钮,确认汉堡按钮由“文件”菜单项取代,“文件”项处于选中状态且其下拉菜单立即展开;菜单与标题栏同高,不覆盖编辑区域,项目/分支控件在展开时隐藏。检查常驻品牌标识与下方活动栏图标列对齐且不可选中,并确认项目菜单显示当前项目图标(无自定义图标时显示项目缩写)。点击其他菜单项时菜单条保持展开并执行动作;点击工作区、标题栏空白和右侧控件或按 Escape 后收起;按 Escape 后确认焦点返回菜单入口;窄窗口确认菜单在标题栏内水平滚动且不挤压窗口控件。macOS 保持系统菜单栏行为。" }, + { + "id": "workbench-settings-entry", + "area": "工作台", + "group": "命令与布局", + "capability": "从工作台 chrome 打开设置:Windows 点击标题栏搜索按钮右侧的齿轮,macOS 通过应用菜单及面板内入口", + "macos": { + "evidence": [ + "macos/Sources/Lithe/Models/LitheAction.swift", + "macos/Sources/Lithe/Views/App/SettingsView.swift" + ], + "implementationStatus": "implemented", + "verificationStatus": "pending" + }, + "windows": { + "evidence": [ + "windows/tauri/src/features/window/components/title-bar/title-bar.tsx", + "windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx", + "windows/tauri/src/features/layout/config/item-order.ts" + ], + "implementationStatus": "implemented", + "verificationStatus": "pending" + }, + "owner": "Workbench", + "verification": "在 Windows 打开工作区,确认左侧活动栏底部不再显示设置齿轮,活动栏右键“在活动栏中显示”列表不包含设置项;点击标题栏右上搜索按钮右侧的齿轮打开设置对话框并再次关闭;携带旧版设置文件(活动栏排序或隐藏列表含 settings)启动后确认遗留条目被清理且活动栏显示正常。macOS 通过应用菜单和各面板入口打开设置保持不变。" + }, { "id": "window-controls", "area": "工作台", diff --git a/windows/tauri/src/features/keymaps/defaults/default-keymaps.git-log.test.ts b/windows/tauri/src/features/keymaps/defaults/default-keymaps.git-log.test.ts index fd770c2db..d2eb20e51 100644 --- a/windows/tauri/src/features/keymaps/defaults/default-keymaps.git-log.test.ts +++ b/windows/tauri/src/features/keymaps/defaults/default-keymaps.git-log.test.ts @@ -31,12 +31,9 @@ describe("Git Log workbench entry points", () => { }); }); - test("places Git Log on the bottom activity rail above Settings", () => { + test("places Git Log on the bottom activity rail after Run", () => { expect(SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS.indexOf("run")).toBeLessThan( SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS.indexOf("gitLog"), ); - expect(SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS.indexOf("gitLog")).toBeLessThan( - SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS.indexOf("settings"), - ); }); }); diff --git a/windows/tauri/src/features/layout/components/sidebar/main-sidebar.tsx b/windows/tauri/src/features/layout/components/sidebar/main-sidebar.tsx index fc760d65a..999a10494 100644 --- a/windows/tauri/src/features/layout/components/sidebar/main-sidebar.tsx +++ b/windows/tauri/src/features/layout/components/sidebar/main-sidebar.tsx @@ -70,7 +70,6 @@ import { FilesIcon, FolderIcon, FolderOpenIcon, - GearIcon, GitBranchIcon, GitGraphIcon, MagnifyingGlassIcon, @@ -121,7 +120,6 @@ export const SidebarActivityRail = memo(({ expanded = false }: SidebarActivityRa const isSidebarVisible = useUIState((state) => state.isSidebarVisible); const activeSidebarView = useUIState((state) => state.activeSidebarView); const setIsProjectPickerVisible = useUIState((state) => state.setIsProjectPickerVisible); - const openSettingsDialog = useUIState((state) => state.openSettingsDialog); const isBottomPaneVisible = useUIState((state) => state.isBottomPaneVisible); const bottomPaneActiveTab = useUIState((state) => state.bottomPaneActiveTab); const configuredActivityRailWidth = useSettingsStore((state) => state.settings.activityRailWidth); @@ -193,7 +191,6 @@ export const SidebarActivityRail = memo(({ expanded = false }: SidebarActivityRa { id: "diagnostics", label: t("workbench.diagnostics"), icon: }, ], ["gitLog", { id: "gitLog", label: t("workbench.gitLog"), icon: }], - ["settings", { id: "settings", label: t("workbench.settings"), icon: }], ]); return sidebarActivityVisibilityItemIds(coreFeatures).map((id) => items.get(id)!); }, [coreFeatures.diagnostics, coreFeatures.git, coreFeatures.search, coreFeatures.terminal, t]); @@ -623,7 +620,6 @@ export const SidebarActivityRail = memo(({ expanded = false }: SidebarActivityRa } onGitLogClick={() => toggleGitLogPane()} isGitLogActive={isBottomPaneVisible && bottomPaneActiveTab === "gitLog"} - onSettingsClick={() => openSettingsDialog()} onTerminalClick={() => toggleTerminalPane()} isTerminalActive={isBottomPaneVisible && bottomPaneActiveTab === "terminal"} onDiagnosticsClick={() => toggleDiagnosticsPane()} diff --git a/windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx b/windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx index bfc1aacc5..a4c8abfd5 100644 --- a/windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx +++ b/windows/tauri/src/features/layout/components/sidebar/sidebar-pane-selector.tsx @@ -14,7 +14,6 @@ import { useSettingsStore } from "@/features/settings/stores/settings.store"; import { SidebarListItem } from "@/ui/sidebar"; import { Tabs, TabsList, TabsTrigger } from "@/ui/tabs"; import { - GearIcon, GitBranchIcon, GitGraphIcon, FilesIcon, @@ -63,7 +62,6 @@ interface SidebarPaneSelectorProps { isSearchActive?: boolean; onGitLogClick?: () => void; isGitLogActive?: boolean; - onSettingsClick?: () => void; onTerminalClick?: () => void; isTerminalActive?: boolean; onDiagnosticsClick?: () => void; @@ -85,7 +83,6 @@ export const SidebarPaneSelector = ({ isSearchActive = false, onGitLogClick, isGitLogActive = false, - onSettingsClick, onTerminalClick, isTerminalActive = false, onDiagnosticsClick, @@ -231,21 +228,6 @@ export const SidebarPaneSelector = ({ } satisfies SidebarPaneItem, ] : []), - ...(onSettingsClick - ? [ - { - id: "settings", - label: showLabels ? t("workbench.settings") : undefined, - icon: , - onClick: onSettingsClick, - ariaLabel: t("workbench.settings"), - tooltip: { - content: t("workbench.settings"), - side: tooltipSide, - }, - } satisfies SidebarPaneItem, - ] - : []), ], [ coreFeatures.diagnostics, @@ -265,7 +247,6 @@ export const SidebarPaneSelector = ({ onDiagnosticsClick, isDiagnosticsActive, onRunClick, - onSettingsClick, isRunActive, onViewChange, showLabels, diff --git a/windows/tauri/src/features/layout/config/item-order.test.ts b/windows/tauri/src/features/layout/config/item-order.test.ts index a5336362f..347c580af 100644 --- a/windows/tauri/src/features/layout/config/item-order.test.ts +++ b/windows/tauri/src/features/layout/config/item-order.test.ts @@ -33,7 +33,7 @@ describe("sidebar activity order", () => { terminal: true, diagnostics: true, }), - ).toEqual(["files", "git", "search", "run", "terminal", "diagnostics", "gitLog", "settings"]); + ).toEqual(["files", "git", "search", "run", "terminal", "diagnostics", "gitLog"]); expect([...SIDEBAR_ACTIVITY_ITEM_IDS]).not.toContain("maven"); }); @@ -48,18 +48,22 @@ describe("sidebar activity order", () => { expect([...SIDEBAR_ACTIVITY_ITEM_IDS]).not.toContain("database"); }); + test("keeps the Settings entry out of the activity rail because it moved to the title bar", () => { + expect([...SIDEBAR_ACTIVITY_ITEM_IDS]).not.toContain("settings"); + expect([...SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS]).not.toContain("settings"); + }); + test("keeps bottom activity items ordered after the primary views", () => { expect([...SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS]).toEqual([ "run", "terminal", "diagnostics", "gitLog", - "settings", ]); }); - test("drops the removed Maven item from persisted left sidebar order", () => { - expect(normalizeItemOrder(["maven", "run"], SIDEBAR_ACTIVITY_ITEM_IDS)).toEqual([ + test("drops removed Maven and Settings items from persisted left sidebar order", () => { + expect(normalizeItemOrder(["maven", "settings", "run"], SIDEBAR_ACTIVITY_ITEM_IDS)).toEqual([ "run", "files", "git", @@ -67,7 +71,6 @@ describe("sidebar activity order", () => { "terminal", "diagnostics", "gitLog", - "settings", ]); }); }); diff --git a/windows/tauri/src/features/layout/config/item-order.ts b/windows/tauri/src/features/layout/config/item-order.ts index 29e9aa9b0..530e69d45 100644 --- a/windows/tauri/src/features/layout/config/item-order.ts +++ b/windows/tauri/src/features/layout/config/item-order.ts @@ -1,3 +1,5 @@ +// Settings moved from the activity rail bottom to the title bar (next to the +// search action), so it is no longer a reorderable or hideable rail item. export const SIDEBAR_ACTIVITY_ITEM_IDS = [ "files", "git", @@ -6,14 +8,12 @@ export const SIDEBAR_ACTIVITY_ITEM_IDS = [ "terminal", "diagnostics", "gitLog", - "settings", ] as const; export const SIDEBAR_BOTTOM_ACTIVITY_ITEM_IDS = [ "run", "terminal", "diagnostics", "gitLog", - "settings", ] as const; export const FOOTER_LEADING_ITEM_IDS = ["filePath", "branch"] as const; export const FOOTER_TRAILING_ITEM_IDS = [ diff --git a/windows/tauri/src/features/window/components/title-bar/title-bar.tsx b/windows/tauri/src/features/window/components/title-bar/title-bar.tsx index eaac4bce4..58002257a 100644 --- a/windows/tauri/src/features/window/components/title-bar/title-bar.tsx +++ b/windows/tauri/src/features/window/components/title-bar/title-bar.tsx @@ -29,6 +29,7 @@ import { import { FilesIcon, FolderOpenIcon, + GearIcon, ListIcon, MagnifyingGlassIcon, PlayIcon, @@ -65,6 +66,7 @@ export const TitleBar = ({ const closeProject = useFileSystemStore((state) => state.closeProject); const projectTabs = useWorkspaceTabsStore.use.projectTabs(); const setIsQuickOpenVisible = useUIState((state) => state.setIsQuickOpenVisible); + const openSettingsDialog = useUIState((state) => state.openSettingsDialog); const branchItem = useFooterGitBranchItem(); const [menuBarActiveMenu, setMenuBarActiveMenu] = useState(null); @@ -284,6 +286,20 @@ export const TitleBar = ({ ); + const settingsAction = ( + + ); + const workbenchActions = ( @@ -383,6 +399,7 @@ export const TitleBar = ({ {quickOpenAction} + {settingsAction} {isWindows ? : null} {showAppWindowControls && ( From 55a44552533f57036660e752ea35b826b7aae803 Mon Sep 17 00:00:00 2001 From: "frank.wang" Date: Thu, 1 Oct 2026 12:03:54 +0800 Subject: [PATCH 02/20] =?UTF-8?q?fix(scripts):=20verify-windows-boundaries?= =?UTF-8?q?=20=E8=B1=81=E5=85=8D=E8=BF=87=E6=BB=A4=E5=85=BC=E5=AE=B9=20Git?= =?UTF-8?q?=20Bash/Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 豁免正则以 "/" 开头会被 Git Bash (MSYS) 当作路径改写,加上 ripgrep 在 Windows 上输出反斜杠分隔路径,导致 core/lithe-core-client 与 platform/tauri-core 两个合法豁免文件被误判为违规。改为字符类开头并 兼容两种分隔符;已在 Windows 验证干净树通过、植入违规文件能被捕获。 --- scripts/verify-windows-boundaries.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/verify-windows-boundaries.sh b/scripts/verify-windows-boundaries.sh index 6465443d5..729a729fb 100755 --- a/scripts/verify-windows-boundaries.sh +++ b/scripts/verify-windows-boundaries.sh @@ -10,9 +10,12 @@ if find windows \ exit 1 fi +# The exemption pattern accepts backslash separators (ripgrep emits them on +# Windows) and starts with a character class so Git Bash does not rewrite a +# leading-slash argument into a Windows path. direct_imports=$(rg -l 'from "@tauri-apps/api/core"' windows/tauri/src \ --glob '*.ts' --glob '*.tsx' | \ - rg -v '/(core/lithe-core-client|platform/tauri-core)\.ts$' || true) + rg -v '[/\\](core[/\\]lithe-core-client|platform[/\\]tauri-core)\.ts$' || true) if [[ -n "$direct_imports" ]]; then echo "Frontend modules must use @/platform/tauri-core:" >&2 echo "$direct_imports" >&2 From d3fcae024c21e2d65cb8b60d8c7deb5b2508058d Mon Sep 17 00:00:00 2001 From: "frank.wang" Date: Thu, 1 Oct 2026 13:57:29 +0800 Subject: [PATCH 03/20] =?UTF-8?q?feat(windows):=20=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E9=BB=98=E8=AE=A4=E9=80=9A=E6=A0=8F=E5=B9=B6?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E6=B4=BB=E5=8A=A8=E6=A0=8F=E9=80=9A=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 终端/底部面板默认宽度模式由 editor 改为 full,与 IDEA 默认一致 - 两条活动栏提到最外层保持通高,通栏面板只位于活动栏之间, 左侧底部按钮不再被面板顶上去;editor 模式布局不变 - 新增 terminal.store 默认值与切换的单测 - 更新 terminal-sessions 矩阵验证描述并重新生成矩阵视图 --- docs/development/platform-parity-matrix.csv | 2 +- docs/development/platform-parity-matrix.md | 2 +- shared/platform-feature-matrix.json | 2 +- .../layout/components/main-layout.tsx | 85 ++++++++++--------- .../terminal/stores/terminal.store.test.ts | 12 +++ .../terminal/stores/terminal.store.ts | 8 +- 6 files changed, 68 insertions(+), 43 deletions(-) create mode 100644 windows/tauri/src/features/terminal/stores/terminal.store.test.ts diff --git a/docs/development/platform-parity-matrix.csv b/docs/development/platform-parity-matrix.csv index e95483845..d444f5148 100644 --- a/docs/development/platform-parity-matrix.csv +++ b/docs/development/platform-parity-matrix.csv @@ -65,7 +65,7 @@ run-java-long-classpath,运行与调试,运行配置,超长 Java 类路径自动 debug-breakpoints,运行与调试,调试器,启动调试与断点,已实现,待验证,部分实现,待验证,Debug,设置、命中、禁用和重新定位断点,确认调试会话生命周期。,Windows 真实调试产品链路仍在 #466 跟进。,macos/Sources/Lithe/Views/Debug; shared/fixtures/debug,windows/tauri/src/features/debugger; shared/fixtures/debug debug-state,运行与调试,调试器,变量、异常与断开策略,已实现,待验证,部分实现,待验证,Debug,验证变量分页、异常信息、step filters、暂停/继续和 disconnect policy。,Windows 真实调试产品链路仍在 #466 跟进。,macos/Sources/Lithe/Views/Debug; shared/fixtures/debug,windows/tauri/src/features/debugger; shared/fixtures/debug terminal-shell,工作台,终端,Shell 发现与配置,已实现,待验证,已实现,待验证,Terminal,验证设置页默认 Shell 选项与终端「新建终端」菜单检测到的 Shell 一致、可选 Git Bash 并生效,以及环境变量、工作目录和不可用 Shell 的提示。,,macos/Sources/Lithe/Views/Terminal; macos/Sources/Lithe/Views/App/SettingsView.swift; macos/Sources/Lithe/Services,windows/tauri/src/features/terminal; windows/tauri/src/features/settings/components/macos-settings-panels.tsx; windows/tauri/src/features/settings/lib/default-shell-options.ts; windows/tauri/src-tauri -terminal-sessions,工作台,终端,多会话与标签,已实现,待验证,已实现,待验证,Terminal,创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态。,,macos/Sources/Lithe/Views/Terminal,windows/tauri/src/features/terminal +terminal-sessions,工作台,终端,多会话与标签,已实现,待验证,已实现,待验证,Terminal,创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态;Windows 打开底部终端面板时默认通栏(与 IDEA 一致):面板位于左右两条活动栏之间并横跨侧边栏与编辑器下方(活动栏保持通高,底部的活动栏按钮位置不上移),侧边栏让出纵向空间,且仍可通过面板菜单切换为编辑器宽度。,,macos/Sources/Lithe/Views/Terminal,windows/tauri/src/features/terminal terminal-interaction,工作台,终端,复制粘贴、搜索与调整大小,已实现,待验证,已实现,待验证,Terminal,验证复制粘贴、终端搜索、调整面板大小和高频输入不丢失。,,macos/Sources/Lithe/Views/Terminal,windows/tauri/src/features/terminal terminal-long-command-input,工作台,终端,Windows Shell 超长命令输入,平台专属,不适用,已实现,待验证,Terminal,在 Windows cmd.exe 和 PowerShell 中执行超过 Shell 单行限制的 IDE 多行命令,确认脚本执行、原始命令内容和终端关闭后的临时文件清理。,仅在 IDE 后端为 cmd.exe/PowerShell 的超长多行文本创建一次性脚本;不修改系统 Shell 配置。,macos/Sources/Lithe/Views/Terminal,windows/tauri/crates/terminal/src/connection.rs; windows/tauri/src-tauri/src/terminal.rs markdown-rendering,编辑器,Markdown,Markdown 预览与富文本渲染,已实现,待验证,已实现,待验证,Editor,使用代码高亮、表格、Mermaid、链接和相对路径 fixture 对比渲染结果。,,macos/Sources/Lithe/Views/Editor/MarkdownPreviewView.swift; macos/Sources/Lithe/Core/Ports/MarkdownRendering.swift,windows/tauri/src/features/editor/markdown diff --git a/docs/development/platform-parity-matrix.md b/docs/development/platform-parity-matrix.md index 48bbf6b3d..63f350144 100644 --- a/docs/development/platform-parity-matrix.md +++ b/docs/development/platform-parity-matrix.md @@ -180,7 +180,7 @@ | 功能组 | 能力点 | macOS | Windows | 负责人 | 验证方式 | 备注 | | --- | --- | --- | --- | --- | --- | --- | | 终端 | **Shell 发现与配置**
terminal-shell | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Terminal`、`macos/Sources/Lithe/Views/App/SettingsView.swift`、`macos/Sources/Lithe/Services` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/terminal`、`windows/tauri/src/features/settings/components/macos-settings-panels.tsx`、`windows/tauri/src/features/settings/lib/default-shell-options.ts`、`windows/tauri/src-tauri` | Terminal | 验证设置页默认 Shell 选项与终端「新建终端」菜单检测到的 Shell 一致、可选 Git Bash 并生效,以及环境变量、工作目录和不可用 Shell 的提示。 | | -| 终端 | **多会话与标签**
terminal-sessions | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Terminal` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/terminal` | Terminal | 创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态。 | | +| 终端 | **多会话与标签**
terminal-sessions | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Terminal` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/terminal` | Terminal | 创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态;Windows 打开底部终端面板时默认通栏(与 IDEA 一致):面板位于左右两条活动栏之间并横跨侧边栏与编辑器下方(活动栏保持通高,底部的活动栏按钮位置不上移),侧边栏让出纵向空间,且仍可通过面板菜单切换为编辑器宽度。 | | | 终端 | **复制粘贴、搜索与调整大小**
terminal-interaction | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/Terminal` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/terminal` | Terminal | 验证复制粘贴、终端搜索、调整面板大小和高频输入不丢失。 | | | 终端 | **Windows Shell 超长命令输入**
terminal-long-command-input | 🧩 平台专属
— 不适用
`macos/Sources/Lithe/Views/Terminal` | ✅ 已实现
🔍 待验证
`windows/tauri/crates/terminal/src/connection.rs`、`windows/tauri/src-tauri/src/terminal.rs` | Terminal | 在 Windows cmd.exe 和 PowerShell 中执行超过 Shell 单行限制的 IDE 多行命令,确认脚本执行、原始命令内容和终端关闭后的临时文件清理。 | 仅在 IDE 后端为 cmd.exe/PowerShell 的超长多行文本创建一次性脚本;不修改系统 Shell 配置。 | | 本地历史 | **快照列表与 Diff**
history-snapshots | ✅ 已实现
🔍 待验证
`macos/Sources/Lithe/Views/History`、`macos/Sources/Lithe/Services` | ✅ 已实现
🔍 待验证
`windows/tauri/src/features/local-history` | Local History | 编辑同一文件多次,比较快照时间、内容 Diff 和文件范围。 | | diff --git a/shared/platform-feature-matrix.json b/shared/platform-feature-matrix.json index 8fd688e15..394b18209 100644 --- a/shared/platform-feature-matrix.json +++ b/shared/platform-feature-matrix.json @@ -1742,7 +1742,7 @@ "verificationStatus": "pending" }, "owner": "Terminal", - "verification": "创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态。" + "verification": "创建多个终端会话并切换、重命名、关闭,确认子进程生命周期和资源清理;Windows 横向标签栏的新建终端与 Shell 配置按钮紧跟最后一个标签,标签溢出时按钮保持可见;标签栏右侧最小化按钮隐藏终端面板且会话继续运行,重新打开时恢复为停靠状态;Windows 打开底部终端面板时默认通栏(与 IDEA 一致):面板位于左右两条活动栏之间并横跨侧边栏与编辑器下方(活动栏保持通高,底部的活动栏按钮位置不上移),侧边栏让出纵向空间,且仍可通过面板菜单切换为编辑器宽度。" }, { "id": "terminal-interaction", diff --git a/windows/tauri/src/features/layout/components/main-layout.tsx b/windows/tauri/src/features/layout/components/main-layout.tsx index 586d134c1..d2f852e4d 100644 --- a/windows/tauri/src/features/layout/components/main-layout.tsx +++ b/windows/tauri/src/features/layout/components/main-layout.tsx @@ -304,56 +304,65 @@ export function MainLayout() { className="flex flex-1 flex-row overflow-hidden" style={{ minHeight: 0 }} > + {/* Both activity rails stay outside the middle column so they span the full + workbench height; the full-width bottom pane only stretches between them. */} -
-
- - - +
+ + +
+
+ + + +
+ {terminalWidthMode === "editor" && deferredSurfacesReady && ( + + + + )} +
+ +
- {terminalWidthMode === "editor" && deferredSurfacesReady && ( + + {terminalWidthMode === "full" && deferredSurfacesReady && ( )}
-
- - {terminalWidthMode === "full" && deferredSurfacesReady && ( -
- - - -
- )} {showStatusBar ?