Repository navigation
fix(desktop): 固定 Core main 2e4be2c,连接接受 Windows 域用户,Motty 导入把被拒的设置标到对应字段 (#2231) - #2296
Merged
Merged
Conversation
…应字段 (#2231) - Core #166:已保存的连接接受 DOMAIN\name 和 name@domain;remote.mottyHosts 对 Lithe 不接受的设置给 invalid 状态,并标在被拒的字段上,不再一律显示“非 SSH”、 错标在地址上。 - Core #165:远程会话结束时释放它建立的搜索索引 (#2277)。 - remote_helpers.go 更新 RemoteImportInvalid、RemoteImportUnsupported 和 Connection 为空时的注释。 - 新增 TestRemoteConnectionsKeepWindowsDomainUsers,经真实 Core 保存两种域用户写法, 只有域的写法报在 user 字段上。 - 功能矩阵 remote-connections 写明域用户导入和“无效”状态。
xiaoyumuxi
marked this pull request as ready for review
November 22, 2026 02:34
1 task done
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
在“远程开发”窗口从 Motty 导入时,用户名是 Windows 域账户的 SSH 主机(如
CONTOSO\admin、admin@contoso.example)被显示成“非 SSH”,展开后“地址”一行写着 Lithe 不接受这个值,不能导入。手动新建这样的连接也保存不了。根因在 Core,已在 Lithe-IDEA/Lithe-core-rust#166 修复;本 PR 把桌面端固定的 Core 升到包含这个修复的 main,同时带上 Core #165(#2277)。改动 / Changes
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION从57e55d6升到 Core main2e4be2c,比原来多两个 PR:DOMAIN\name、name@domain三种用户名写法。WSL 用户和跳板机里的用户仍然只接受登录名。remote.mottyHosts新增invalid状态:SSH 主机上有 Lithe 不接受的设置时,标在那个设置自己的字段上;unsupported只表示不是 SSH 主机。desktop/internal/core/remote_helpers.go:只改注释。RemoteImportInvalid也包括“Motty SSH 主机有被拒的设置”这种情况。RemoteImportUnsupported只表示不是 SSH 主机。RemoteMottyCandidate.Connection在invalid状态下也为空。desktop/internal/core/remote_helpers_test.go:新增TestRemoteConnectionsKeepWindowsDomainUsers。经真实 Core 保存CONTOSO\admin和admin@contoso.example,列出后用户名原样保留;只有域的CONTOSO\报在user字段上,reason 为invalid。shared/platform-feature-matrix/features/remote-connections.json:RemoteImportInvalid原来就有(~/.ssh/config导入在用),remote_import.go把它显示成红色的“无效”标签,remoteImportable只放行importable和partial。不在本 PR 范围内 / Out of scope
类型专属:fix
复现与根因
CONTOSO\admin。57e55d6。is_ssh_user只接受 POSIX 登录名,规则来自 SSH 选项白名单 feat(remote): 远程连接安全(SSH 选项白名单、安装校验、会话令牌、日志轮转) Lithe-IDEA/Lithe-core-rust#134(be62724)。candidate()把check()的任何拒绝都标在address上,状态给unsupported。检查项
desktop/internal/core/remote_helpers_test.go的TestRemoteConnectionsKeepWindowsDomainUsers。57e55d6时失败,输出为save domain user #13: err = lithe core: remote.editConnections: Invalid remote connection (invalid_request)。2e4be2c后通过。RemoteImportInvalid和RemoteImportUnsupported只在desktop/internal/workbench/remote_import.go(标签和颜色)与remote_list.go(remoteImportable)中使用。rust/contracts/rust-core-api.md(Core fix(windows): complete Simplified Chinese UI #166),桌面端没有新的约束要写进 bug-fix Note。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/remote-connections.json的验证步骤和备注;两端的实现状态和验证状态都不变。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh,validated 221 platform capabilities。.artifacts/下生成的矩阵视图。插件归属 / Plugin ownership
develop-lithe第三节的自查命令,结果为空。UI 验证 / UI evidence
N/A:桌面端的布局、控件和文案都没有改动。
~/.ssh/config导入一直在用。motty::tests覆盖。统一日志系统 / Structured logging
N/A:没有新增或改动日志路径。
界面文案 / i18n
desktop.remote.import.status.invalid。node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,都通过。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
N/A:Core #165 和 #166 没有改插件契约、能力版本或插件函数协议。
发行包与资源 / Bundle and resources
zsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过。无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/build-desktop-core.sh(Core 检出 HEAD 为2e4be2c)scripts/desktop/desktop-go.sh vet ./internal/core/ ./internal/workbench/scripts/desktop/desktop-go.sh test -count=1 ./internal/core/scripts/desktop/desktop-go.sh test -count=1 -run 'Remote|Motty|Import' ./internal/workbench/scripts/desktop/desktop-go.sh test -count=1 -run 'Search|Index|Session|Trust' ./internal/workbench/(覆盖 Core #165)57e55d6,运行TestRemoteConnectionsKeepWindowsDomainUsersInvalid remote connection),符合预期cargo test -p lithe-remote --all-features,包括motty::tests::other_protocols_and_refused_settings_are_not_imported和windows_domain_users_are_importedgofmt -l desktop/internal/core/bash scripts/platform-feature-matrix/verify-platform-feature-matrix.shnode scripts/i18n/generate-i18n.mjs --check、node scripts/i18n/verify-app-language-localization.mjszsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因:
提交前确认 / Final checks
main(5b72074c9)创建,目标分支main192.0.2.10、CONTOSO、contoso.example等占位值