feat(desktop): 添加在文件管理器中打开入口 - #3
Conversation
Signed-off-by: yuanzhengjie <yuanzhengjie@xd.com>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/features/cc-agent/sidebar/ShowInExplorerMenuItem.tsx | 新增复用菜单项,将快捷键监听生命周期限制在已打开菜单内,并展示平台化快捷键提示。 |
| apps/desktop/src/renderer/features/cc-agent/SessionContentHeader.tsx | 为顶部会话菜单增加受控打开状态及本地项目目录打开入口,远程会话被明确排除。 |
| apps/desktop/src/renderer/features/cc-agent/sidebar/SessionItem.tsx | 为侧栏会话条目的各菜单分支增加本地目录打开操作及失败提示。 |
| apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx | 为卡片式会话菜单增加与列表条目一致的本地目录打开行为。 |
| apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx | 将既有项目目录打开入口改为共享菜单项,并隐藏远程项目入口。 |
| apps/desktop/src/shared/appShortcuts.ts | 注册不可自定义且隐藏于设置页的跨平台“在文件管理器中打开”快捷键。 |
| apps/desktop/src/renderer/tests/sidebarShowInExplorerShortcut.test.ts | 覆盖平台映射、本地项目守卫、菜单项复用及提示文案,但主要通过源码字符串断言验证组件契约。 |
Sequence Diagram
sequenceDiagram
participant U as 用户
participant M as 本地项目菜单
participant S as 快捷键处理器
participant B as electronAPI
participant O as 系统文件管理器
U->>M: 打开菜单
M->>S: 挂载并启用快捷键
U->>M: 选择菜单项或按快捷键
M->>B: openPath(workingDir)
B->>O: 打开本地项目目录
B-->>M: 返回成功或错误
M->>S: 关闭菜单并卸载处理器
Reviews (1): Last reviewed commit: "feat(desktop): 添加在文件管理器中打开入口" | Re-trigger Greptile
|
CodeQL is not triggering for this fork PR. As of August 28, 2026, the regular checks (client-ci/verify, pr-design-basis, and Greptile) are successful, but no CodeQL workflow run is attached to the PR head commit. GitHub therefore reports “Code scanning is waiting for results from CodeQL” and keeps the merge blocked. Could a maintainer please re-trigger/approve CodeQL for this PR and, if needed, update the branch-protection/code-scanning requirement for external fork PRs? This appears to be a repository workflow/branch-protection issue rather than a code failure. |
这次改了什么
摘要
为本地项目增加“在文件管理器中打开”入口,方便从项目菜单、对话列表/卡片和顶部对话菜单直接打开当前项目目录;远程项目不会显示该入口,避免在控制端误打开同名路径。
变更类型
feat新功能fix缺陷修复refactor/perf重构或性能优化docs/test/chore文档、测试或工程维护范围
Ctrl+Shift+S、macOS⌘⇧S快捷键;四语言文案;回归测试UI 变化
docs/design-rules/DESIGN.md§Light / Dark Dual-Mode Delivery Gate、§11 Voice & Content。入口复用现有 DropdownMenu 行高、间距和语义颜色 token;快捷键提示复用菜单元信息 token;中文采用“在文件管理器中打开”,并同步 en/ja/ko 文案。未新增只适配单一主题的颜色或样式。未附截图:本次仅在既有菜单中增加标准菜单项和快捷键提示,未改变布局结构。
怎么验证的
自动验证
手工验证
不涉及:当前环境未启动 Desktop 实例,未执行 Windows/macOS/Linux 实机菜单目检。
未执行的验证
pnpm test:all;本次为 Desktop Renderer 的小范围菜单能力,已完成仓库要求的完整单元测试、Desktop 类型检查及相关静态检查。风险
风险分类
影响与回滚
Ctrl+Shift+S,macOS 使用⌘⇧S;远程项目不显示入口。提交前检查
git commit -s,见 DCO)