Repository navigation
feat(desktop): 远程开发窗口按原型补齐:空页面快速连接、导入、生效设置、连接步骤与内联询问、远程信任 (#2231) - #2275
Merged
Merged
Conversation
- 左侧列表:搜索、按分组折叠、颜色标记、已连接圆点与上次连接的相对时间、导入菜单、新建 - 空状态:user@host:port 快速填写、从 Motty / ~/.ssh/config 导入卡片 - 概览:主机信息、最近打开的文件夹、测试结果、ssh -G 生效值及来源 - 连接步骤页:六个阶段、上传进度、主机密钥和密码询问内联在对应步骤下 - 选完文件夹首次打开前询问是否信任(可信任上级目录),安全模式不记录 - 导入页:Motty 与 SSH 配置主机列表、状态标签、保留分组/颜色 - 新增中英词条
- 新建连接需先点“+”,删除改为从“⋯”菜单进入,打开文件夹改为“打开文件夹…” - 主机信息加回主机名与主目录 - 表单里的测试结果放到字段上方,失败时诊断默认展开
- 没测过的主机图标显示名称首字母,不再显示“?”(列表、概览、连接步骤、导入页) - 概览地址与“经由跳板机”分开排版,跳板机说明、主机信息的核数与容量、生效设置的秒数改用正文字体,避免中文被等宽字体拉开字距 - 空列表提示改为“还没有保存的连接” - 无头截图新增空页面、测试失败、连接步骤(主机密钥、密码、失败)、信任文件夹、Motty 导入,并更新截图说明
…ow-complete # Conflicts: # desktop/internal/i18n/shared.generated.go # desktop/internal/workbench/app.go # shared/i18n/features/remote-connections.json
xiaoyumuxi
marked this pull request as ready for review
November 21, 2026 10:16
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
#2265 把远程开发窗口改成了左右两栏,但和原型相比还差不少:空页面不能直接输入地址;没有导入功能;概览里看不到
ssh -G实际生效的值;连接过程只有一个转圈,OpenSSH 的询问会盖住整个窗口;第一次打开远程文件夹时也不问是否信任。本 PR 按原型逐屏补齐,原型 HTML 在 Draft #2276。通用逻辑已在 Core #154 里完成(地址解析、搜索、导入、生效设置、连接阶段、远程信任),桌面端只负责显示。改动 / Changes
接入 Core 接口(f3f79eddf)
remoteconn接入 Core 【功能建议】允许自动保存--设置内默认开启 #154 的以下接口:地址解析(user@host:port)、列表搜索、Motty 与~/.ssh/config导入候选、ssh -G生效设置及来源、连接阶段事件、主机密钥与密码询问分类、远程工作区信任。c9955a0…),代码没有变化。窗口按原型重写(19f3d01da、50e193e7b、98d6f2f13)
user@host:22地址框,交给 Core 解析后填入新连接。ssh -G解析出的值和来源(本连接 / SSH 配置 / 默认值)。主机 : 路径,正文说明信任后会在远端运行哪些程序。ssh -G解析出的生效值和结果;被其他主机用作跳板的主机注明“作为 … 的 ProxyJump”;通配符 Host 跳过并说明原因。config.db,不读取vault.json,不导入密码。remote.stat查看前 64 个子文件夹里有没有.git(目录或工作树的文件),最多 8 个并行,有的标“Git”。查不到的不标,换目录或关闭后丢弃结果。Core 改动限定在crates/remote,所以没有新增 Core 方法,由桌面端组合已有方法。~/.ssh/config可导入数量,现在把已保存列表交给 Core 比对,已经保存过的主机不再计入;保存、导入或重新读取列表后重新计数。文案、测试与截图
shared/i18n/features/remote-connections.json补齐中英文词条,并重新生成shared.generated.go。remote_test.go、remote_workspace_test.go按新流程更新:先点“新建”再填写表单,删除改从“⋯”菜单进入,连接改为“打开文件夹”。TestRemoteImportCountsLeaveOutSavedHosts:用替身 Kernel 返回导入列表(不跑 ssh、不读账号文件),确认保存 alpha 后可导入数量从 2 变成 1。TestRemoteImportNewGroupsAreTheChosenOnesTheListLacks:底部只列出勾选主机带来、列表里还没有的分组,不保留分组时不列。TestRemoteBrowserTagsGitRepositories:.git是目录或文件的子文件夹都标 Git,其他不标。TestRemoteTestAsksInTheWindowAndReportsTheHost改为检查成功结果的“这台主机可以用于远程开发”,不再找主机信息表格的“CPU 数”表头。TestVisualRemoteConnections新增空页面、测试失败、测试成功、连接步骤(主机密钥、密码、失败)、信任文件夹、Motty 导入(展开字段映射)、SSH 配置导入、选文件夹,原有场景重新截图,说明见docs/assets/remote-connections/README.md。不在本 PR 范围内 / Out of scope
p.trust.allowed为否),构建、Git 钩子等项目代码暂不放行。这部分和远程 Git 一起放在 [Feature] 远程开发完整设计:各平台连接 Linux(SSH、WSL、容器),插件留在本机、工具与项目进程在远端运行 #2231 的接缝④里做。类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD,均通过.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
N/A:只改宿主的远程开发窗口,不涉及插件。
UI 验证 / UI evidence
TestVisualRemoteConnections(-tags vivahead,lithevisual,提交 55366ac,1200×760,浅色英文、深色中文),共 14 个场景,逐张检查过docs/assets/remote-connections/并嵌入下方统一日志系统 / Structured logging
app.action.performed事件(a.performed),没有新增事件,也没有手写事件 ID界面文案 / i18n
shared/i18n/features/remote-connections.json,已运行node scripts/i18n/generate-i18n.mjs并提交生成结果node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check和node --test scripts/i18n/test-i18n.mjs,均通过,没有放宽脚本逻辑归属 / Logic placement
ssh -G生效值与来源、连接阶段、询问分类、远程信任都在 Core 【功能建议】允许自动保存--设置内默认开启 #154(crates/remote);桌面端只负责显示和转发用户的选择~/.ssh/config是 Core 给出的导入来源)性能与内存 / Performance and memory
ssh -G生效设置只在选中连接时向 Core 请求一次并按连接缓存;导入数量只在打开窗口和列表变化(保存、导入、重读)后请求;没有新增轮询设置 / Settings
ssh -G解析结果插件契约 / Plugin contract
N/A:只用到 Core 的远程开发接口(
crates/remote),不涉及插件契约、能力版本或宿主方法。发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过无用代码与重构 / Dead code and refactoring
remoteStepKeys等)验证 / Verification
../scripts/desktop/desktop-go.sh test ./internal/... -count=1../scripts/desktop/desktop-go.sh test ./internal/workbench -run Remote -count=1(98d6f2f13)../scripts/desktop/desktop-go.sh test -tags vivahead,lithevisual ./internal/workbench -run '^TestVisualRemoteConnections$'gofmt -l internal/node scripts/i18n/verify-app-language-localization.mjs/generate-i18n.mjs --check/node --test scripts/i18n/test-i18n.mjsverify-platform-feature-matrix.sh/verify-platform-feature-matrix-change.sh origin/main HEADverify-runtime-bundle-immutability.sh未能执行的检查和原因:
go test跑在细节修正之前的提交上,之后的修正只涉及渲染(字体、图标字母、文案);修正后重新跑了-run Remote和截图测试,均通过。提交前确认 / Final checks
main创建,目标分支为main