Repository navigation
feat(desktop): SSH 身份验证加“记住密码/口令”;远端服务先构建再分架构测试,界面包只测一次 - #2333
Merged
Merged
Conversation
desktop-remote-server.yml 拆成两步:Build for linux amd64 and arm64 在一台 x86_64 runner 上编译两种架构并只做文件检查(--smoke none),随后 Test on linux amd64 / Test on linux arm64 并行下载同一份产物,各自在原生 runner 上冒烟测试本架构。Release 按“远端服务 → 各平台编译并打包应用 → 统一发布”三段注释说明顺序。 verify-remote-server-artifacts.mjs 的 --require-smoke 换成 --smoke <target>|all|none:指定目标只测这些且必须通过,其余报告 not run here;不传时仍对本机能运行的目标都测。
settingswindow、pluginview、workbench 在 dev 标签下只换掉 Viva 属性检查和 buildinfo.Development 两个文件,不带标签再跑一遍查不出更多问题, 却让 macOS 和 Windows 多花约 8 分钟。buildinfo 两种标签都跑。
- 弹窗和连接步骤卡片在密码、私钥口令询问下加“记住”勾选;只对已保存的 SSH 连接提供,主机上的容器用主机记住的答案;验证码、主机指纹、未保存的连接和 WSL、本机容器不提供。 - 答案按连接身份、提问类型和提问原文存进 @host/remote-answers(remoteconn/answers.go),每个连接最多 8 条;登录成功(Connected 或 UnsupportedPlatform)后才写入,取消勾选则删除。 - 只在 OpenSSH 第一次询问时自动填入;主机拒绝后改为询问并标明“主机没有接受记住的回答”,被拒或自动填入后认证失败就删除;后台自动重连只发记住的答案,其余问题取消。 - 连接步骤卡片第二次询问时不再误用“主机拒绝了回答”的文案。 - 概览“⋯”菜单加“清除记住的密码”,删除连接时一并清除。 - remoteconn.KeptSecrets 改名 Secrets,供保留会话和记住的答案共用。 - 更新 Agent Note、功能矩阵和截图;Go 侧按 S14 清零、删除连接时的保留会话令牌见 #2332。
xiaoyumuxi
marked this pull request as ready for review
November 23, 2026 06:22
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
settingswindow、pluginview、workbench每次都跑两遍,一遍不带标签、一遍带dev标签。main 最近一次 macOS 运行(45116356676)中,workbench两遍分别用了 499.7 秒和 493.7 秒。改动 / Changes
1. SSH 身份验证加“记住密码 / 记住口令”勾选(
e44d09c1c)desktop/internal/remoteconn/answers.go):@host/remote-answers命名空间里,按连接身份、提问类型和提问原文区分。forgetRemovedRemote)。remoteconn.KeptSecrets改名为Secrets,供保留会话和记住的答案共用。desktop.remoteAuth.rememberPassword、rememberPassphrase、rememberHint、rememberedRefused、rememberFailed、desktop.remote.forgetAnswers、answersForgotten。更新desktop.remote.storageHelp、authenticationHelp的说明,写明勾选后保存在系统凭据存储里。2026-11-21-remote-connections-window.md新增“勾选‘记住’后才把密码和口令存进钥匙串”一节,被否方案里加了“提交时立即写入,失败再删”。remote-connections补充能力描述、证据文件和验证动作。docs/assets/remote-connections/README.md和 4 张截图已更新。2. 远端服务先统一构建两种架构,再按平台分别测试(
9056a7bc2)desktop-remote-server.yml拆成两步:Build for linux amd64 and arm64:在一台 x86_64 runner 上编译两种架构,只做文件检查(--smoke none)。Test on linux amd64/Test on linux arm64:并行下载同一份产物,各自在原生 runner 上冒烟测试本架构。desktop-release.yml、desktop-ci.yml、desktop-autobuild.yml: 依赖和注释按“远端服务 → 各平台编译并打包应用 → 统一发布”三段排列。scripts/desktop/verify/verify-remote-server-artifacts.mjs:--require-smoke换成--smoke <target>|all|none。指定目标时只测这些目标,而且必须通过;其余目标报告 not run here。verify-remote-server-artifacts.test.mjs已同步更新。docs/ci-builds.md: gate 一条改为“构建任务和 amd64、arm64 两个测试任务都成功”。3. 界面包只在
dev标签下测试一次(24beeba3e)dev标签只换掉两个文件,一个是 Viva 属性检查,一个是buildinfo.Development。不带标签再跑一遍,查不出更多问题。scripts/desktop/check.sh:settingswindow、pluginview、workbench只在dev标签下跑一次。buildinfo两种标签都跑。workbench按顶层测试名分成三组(^Test[A-C]、^Test[D-P]、其余),原先普通和dev构建各跑三组。rebase 后只保留dev标签的三组,每组仍在 Go 默认的 10 分钟上限内。docs/ci-builds.md: 在 check.sh 一条里写清这个分工。CI 加速建议的调查结论(没有改动)
Add-MpPreference -ExclusionPath)Configure-WindowsDefender.ps1已经关闭实时防护(DisableRealtimeMonitoring),并把C:\、D:\整盘排除,再加排除不会变快。windows-2022x64 上跑。HOMEBREW_NO_AUTO_UPDATE=1brew。mdutil -i off)configure-system.sh)已经重建索引并等它完成。在工作目录上关索引能省多少还没测过,不为没有数据的收益新增 CI 步骤。workbench测试。不在本 PR 范围内 / Out of scope
[]byte持有秘密、用完清零。现在 Viva 输入框、core.Client的应答方法、credentials.Store和记住答案的 JSON 都经过string。另外,删除已保存的连接时,没有处理它(含它上面的容器)的保留会话令牌。这两项需要单独设计。pending。类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/remote-connections.json:能力描述、两端证据、验证动作(勾选记住、主机拒绝、取消勾选、清除)和 2026-11-23 的说明;两端验证状态保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(221 条通过)和./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD(通过).artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空shared/i18n/;docs/ci-builds.md只改了宿主自己的 CI 说明UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=<dir> scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualRemoteConnections$'。提交e44d09c1c;场景是 SSH 身份验证弹窗,以及带 OpenSSH 询问的连接步骤(第二次询问,记住的密码被主机拒绝);浅色 en-US、深色 zh-CN;尺寸为测试固定窗口。rebase 后在当前提交重跑,42 张截图与已提交的逐字节相同。125978bc3)e44d09c1c)统一日志系统 / Structured logging
app.action.performed事件记录,action为remote.connection.forgetAnswers。operationFailed/backgroundFailed记录(remoteAnswersSite)。print或直接写 stderr。remoteAnswersSettled这个边界记录一次。界面文案 / i18n
shared/i18n/features/remote-connections.json补齐中英词条,用node scripts/i18n/generate-i18n.mjs生成desktop/internal/i18n/shared.generated.go并提交,没有手改生成文件node scripts/i18n/verify-app-language-localization.mjs(通过)和node scripts/i18n/generate-i18n.mjs --check(en-US、zh-CN 均 12603/12603)逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
N/A:没有改插件契约、能力版本、插件函数协议或宿主方法。
发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh(通过,macOS 和 Windows 源码,5 个工作流保留安装包测试)docs/ci-builds.md已同步无用代码与重构 / Dead code and refactoring
KeptSecrets改名为通用的Secrets,没有留下旧名字;--require-smoke已删除,由--smoke取代验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/remoteconn ./internal/credentials ./internal/core -count=1scripts/desktop/desktop-go.sh test -tags dev ./internal/workbench -run 'Remote|GitAuth|Answer|Rememberable' -count=1scripts/desktop/desktop-go.sh vet ./...、vet -tags dev ./...、gofmt -lTestVisualRemoteConnections(vivahead lithevisual)./.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/mainTestRemoteRemembersAPasswordOnlyWhenTicked(690ms)和TestRemoteTestAsksInTheWindowAndReportsTheHost(500ms)node scripts/i18n/generate-i18n.mjs --check、verify-app-language-localization.mjsverify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/agent-notes/verify-agent-notes.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.shnode --test scripts/desktop/verify/verify-remote-server-artifacts.test.mjsactionlint(四个改动的工作流)、shellcheck scripts/desktop/check.sh、bash -npluginview、settingswindow、workbenchscripts/desktop/check.shTestProjectTreeDirectoryReadCancelsWhenProjectCloses失败。这是既有问题 #2221,main 的 macOS CI 上也出现过;单独跑 5 次都通过未能执行的检查和原因:
check.sh的 Windows 分支没有在本机虚拟机里跑。它只是把 main 的三组workbench测试改为只带dev标签运行,等 ready 后由 CI 的 Windows 任务验证。Build for linux amd64 and arm64、Test on linux amd64、Test on linux arm64)只能在 GitHub Actions 上跑。本 Draft 的第一次运行结果会在评论里补上。提交前确认 / Final checks
main(125978bc3),目标分支main