Repository navigation
feat(desktop): 远程开发窗口改为分组列表加概览,连接可设颜色和分组 (#2231) - #2265
Merged
Merged
Conversation
- 左侧列表按 Core 给出的分组顺序列出连接,分组标题带数量,未分组的排在最后;每行带颜色条 - 选中已保存的连接先显示概览:颜色图标、名称、分组、地址和跳板机,本次运行最近一次测试得到的主机信息,以及逐项列出的连接设置(未填写的显示实际回退值) - 点“编辑”才进入表单,表单按名称与颜色、主机与端口、用户名与身份验证、分组分行,高级选项折叠;“取消”回到原来的连接 - 颜色和分组随连接保存在 Core(固定 Core 57230e6,Lithe-IDEA/Lithe-core-rust#152),分组可选已有分组或新建 - 新增新建、编辑、取消编辑三个操作日志;更新无头测试与截图
xiaoyumuxi
marked this pull request as ready for review
November 21, 2026 06:40
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 21, 2026
#2265 把远程开发窗口改为概览加编辑表单。只有已保存且未编辑的连接能连接,所以“连接”放在概览底部;连接进行中概览的主机信息显示“正在连接”,编辑按钮禁用,测试按钮换成停止。测试结果的文字改用与状态栏菜单共用的 remoteFailureText。i18n 词条按 id 三方合并,重新生成截图。
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
现在的“远程开发”窗口打开就是一张表单:选中已保存的连接也直接进入编辑,看不出这台主机是什么、上次测试得到了什么;连接多了以后只能平铺成一列,分不出生产、测试和实验机。这次按 #2231 的窗口原型(分支
docs/2231-remote-window-design,参考了 Motty 的“新建主机”,为以后从 Motty 导入做准备)重做窗口:左侧按分组列出连接,选中先看概览,点“编辑”才进入表单。颜色和分组随连接保存在 Core,分组和顺序由 Core 算好,桌面端只展示。改动 / Changes
Core 固定版本
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION升到 Core main53c7cfa(feat(remote): 保存的连接带颜色和分组,列表按 Core 算好的分区显示(#2231) Lithe-IDEA/Lithe-core-rust#152,已合入)。[Bug] git记录偶发性无法滚动 #152 给保存的连接加了color、group,并在连接列表里返回sections(分组按首次使用的顺序、未分组的在最后,分组名只差大小写视为同一个,最长 64 个字符)。开发时固定的是 [Bug] git记录偶发性无法滚动 #152 分支上的57230e6,它和53c7cfa的文件树完全相同(be3a71a)。桌面端 Core 绑定(
desktop/internal/core/remote.go、desktop/internal/remoteconn/remoteconn.go)SavedRemoteConnection加Color、Group;新增RemoteConnectionColor及红、橙、黄、绿、蓝、紫六个常量和RemoteConnectionColors。RemoteConnectionSection{Group *string; IDs []string},连接状态和发布结果带Sections;RemoteConnectionSave加Color、Group。remoteconn.Source读取时带上Sections。窗口状态与操作(
desktop/internal/workbench/remote.go)sections生成分组标题行和连接行(remoteListRow);已有分组列表供下拉框使用。remote.connection.new、remote.connection.edit、remote.connection.edit.cancel(沿用app.action.performed事件,只记动作名和入口)。窗口界面(
desktop/internal/workbench/remote_view.go,整体重写)界面文案(
shared/i18n/features/remote-connections.json及生成的desktop/internal/i18n/shared.generated.go)desktop.remote.cancel的说明(现在也用于取消编辑)。测试与截图
remote_test.go:新增可替换测试连接结果的remoteProbeKernel和remoteHarnessWith;新增TestRemoteConnectionsColorAndGroup(颜色、新建分组、选已有分组、分组标题数量、日志不含主机)、TestRemoteCancelGoesBackToTheSavedConnection、TestRemoteOverviewShowsTheTestedHost(测试结果显示在概览,关窗再开仍在,新连接显示“尚未测试”);保存、编辑、删除测试改为先进概览再点“编辑”。remote_connections_visual_test.go:改用remoteProbeKernel,保存四个虚构连接(两个分组加一个未分组),场景改为概览、编辑(展开高级)、新建被拒绝、密码询问。docs/assets/remote-connections/:删除旧的tested截图,新增overview、edit,更新refused、password和 README。功能矩阵
shared/platform-feature-matrix/features/remote-connections.json:更新能力描述、验证动作(概览、编辑、取消、颜色与分组、新日志动作)和说明;两端仍为 implemented / pending。不在本 PR 范围内 / Out of scope
以下都属于 #2231 的后续,原型里已有设计、本 PR 没有实现:
remote.connect);连接步骤视图,以及连接过程中在右侧内联回答 SSH 询问。ssh -G读取并显示实际生效值(现在显示的是回退规则)。user@host:port时自动拆分。~/.ssh/config导入连接。类型专属:feat
多平台对齐
两端共用同一份 Viva 实现;两端都还没有做原生窗口验收,功能矩阵两端保持
pending。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/remote-connections.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending./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
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 SkillUI 验证 / UI evidence
desktop/下运行LITHE_VISUAL_OUTPUT_DIR=<仓库>/docs/assets/remote-connections ../scripts/desktop/desktop-go.sh test -tags vivahead,lithevisual ./internal/workbench -run '^TestVisualRemoteConnections$' -count=1,提交a90f9df;场景:已测试连接的概览、编辑(展开高级)、新建连接被拒绝、SSH 密码询问;浅色英文与深色中文;无头窗口 1200×760,远程开发窗口 980×660改动前(main
0a3dbee,选中已保存的连接直接是表单)改动后
截图里的主机、用户和路径都是虚构的;“测试连接”的结果由测试替换的内核返回,不启动 OpenSSH。英文界面下端口字段的占位符较长,在 210 宽的端口框里会截断,完整内容在概览的“连接设置”里显示。
统一日志系统 / Structured logging
app.action.performed事件(action字段为remote.connection.new/remote.connection.edit/remote.connection.edit.cancel),没有新增事件、没有手写事件 IDTestRemoteConnectionsSaveEditAndDelete与TestRemoteConnectionsColorAndGroup断言日志里没有主机和连接名scripts/logging/)已移除,等价检查恢复前在“验证”一节写明日志门禁未完成,不记为通过界面文案 / i18n
shared/i18n/补齐中英词条,运行node scripts/i18n/generate-i18n.mjs并提交生成结果,没有手改生成文件;Viva 代码通过desktop/internal/i18n/的接口读取node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
sections展示性能与内存 / Performance and memory
设置 / Settings
ssh -G读取实际生效值是后续工作(见“不在本 PR 范围内”)插件契约 / Plugin contract
N/A:不涉及插件契约、能力版本、插件函数协议或宿主方法;Core #152 只改了
crates/remote与crates/workspace的连接列表。发行包与资源 / Bundle and resources
N/A:没有新增或修改运行时资源;仍运行了
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过。无用代码与重构 / Dead code and refactoring
tested截图、视觉测试里的remoteVisualKernel已删除;核对过remote.go/remote_view.go的每个函数都有调用方,remote-connections.json的 106 个词条都仍在使用验证 / Verification
gofmt -l desktop/internal/workbench/../scripts/desktop/desktop-go.sh vet ./internal/workbench/ ./internal/core/ ./internal/remoteconn/../scripts/desktop/desktop-go.sh test ./internal/workbench/ ./internal/remoteconn/ ./internal/core/ -run Remote -count=1../scripts/desktop/desktop-go.sh test ./... -count=1(提交d091178,pin57230e6,文件树与53c7cfa相同)localshell的TestClosingAnIntegratedShellRightAfterACommandHangsUpItsJobs失败一次,单独-count=3重跑全过,属已知偶发,本 PR 没有改终端代码。之后的a90f9df(换 pin 53c7cfa、测试结果只为已保存连接保留)重跑了-run Remote的 workbench 与 core 测试,通过TestVisualRemoteConnections(命令见“UI 验证”)node scripts/i18n/verify-app-language-localization.mjsnode scripts/i18n/generate-i18n.mjs --checknode --test scripts/i18n/test-i18n.mjs./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/desktop/verify/verify-runtime-bundle-immutability.shdevelop-lithe第三节插件归属自查rgsections)未能执行的检查和原因:
提交前确认 / Final checks
main创建;目标分支:feat、fix、docs 为main,release 以发布流程要求为准(已变基到 main0a3dbee).build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图