Skip to content

fix(desktop): 固定 Core main 2e4be2c,连接接受 Windows 域用户,Motty 导入把被拒的设置标到对应字段 (#2231) - #2296

Merged
xiaoyumuxi merged 1 commit into
mainfrom
fix/2231-motty-windows-user
Nov 22, 2026
Merged

xiaoyumuxi merged 1 commit into
mainfrom
fix/2231-motty-windows-user

Conversation

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

关联 Issue / Linked issue

PR 类型 / Type

  • feat:新功能或用户可见的改进
  • fix:缺陷修复
  • docs:文档、Agent Note、Skill 等规则文件
  • release:稳定版发布准备

改动说明 / 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

不在本 PR 范围内 / Out of scope


类型专属:fix

复现与根因

检查项

  • 已先写回归测试,确认它在修复前失败、修复后通过:
    • 测试是 desktop/internal/core/remote_helpers_test.go 的 TestRemoteConnectionsKeepWindowsDomainUsers。
    • 把固定版本临时改回 57e55d6 时失败,输出为 save domain user #13: err = lithe core: remote.editConnections: Invalid remote connection (invalid_request)。
    • 改回 2e4be2c 后通过。
    • Motty 状态的回归测试在 Core fix(windows): complete Simplified Chinese UI #166 中,见下方“验证”。
  • [N/A] 无法自动化时的手动复现与验证步骤:已自动化。
  • 已搜索被修改的状态和字段的调用方:
    • RemoteImportInvalid 和 RemoteImportUnsupported 只在 desktop/internal/workbench/remote_import.go(标签和颜色)与 remote_list.go(remoteImportable)中使用。
    • 桌面端没有自己的用户名校验,全部交给 Core。
  • 已检查另一平台是否有同类缺陷:Windows 客户端用的是同一份 Go 和 Core 代码,本 PR 一并生效。
  • 只改了修复所需的代码,没有夹带重构;没有发现新的问题。
  • [N/A] 行为约束已记录在 Core 契约 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/ 下生成的矩阵视图。
  • [N/A] 已更新矩阵。

插件归属 / Plugin ownership

  • 已在仓库根目录运行 develop-lithe 第三节的自查命令,结果为空。
  • 新增的测试只使用真实 Core 和占位地址,与插件无关。
  • 没有为具体插件提供的能力新建或更新宿主功能矩阵条目。
  • 没有插件文案或插件构建说明。
  • [N/A] 没有修改通用扩展点。

UI 验证 / UI evidence

N/A:桌面端的布局、控件和文案都没有改动。

统一日志系统 / Structured logging

N/A:没有新增或改动日志路径。

界面文案 / i18n

  • 没有新增文案;“无效”沿用已有词条 desktop.remote.import.status.invalid。
  • [N/A] 插件文字:不涉及。
  • 已运行 node scripts/i18n/verify-app-language-localization.mjs 和 node scripts/i18n/generate-i18n.mjs --check,都通过。

逻辑归属 / Logic placement

性能与内存 / Performance and memory

  • Core feat(windows): publish signed in-app updates #165 在会话结束时释放搜索索引,减少重连后的常驻内存;本 PR 没有新增后台任务、子进程或缓存。
  • 主线程没有新增文件读写或进程启动。
  • [N/A] 不涉及启动、输入、滚动、大文件、长输出或搜索的热路径。

设置 / Settings

N/A:没有改设置。

插件契约 / Plugin contract

N/A:Core #165 和 #166 没有改插件契约、能力版本或插件函数协议。

发行包与资源 / Bundle and resources

  • 没有新增运行时资源;已运行 zsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh,通过。
  • [N/A] 没有新的下载、解压或生成资源。

无用代码与重构 / Dead code and refactoring

  • 没有因本次改动变成无用的代码。
  • [N/A] 没有发现既有的无用代码。

验证 / Verification

命令或操作 平台 结果
scripts/desktop/build-desktop-core.sh(Core 检出 HEAD 为 2e4be2c) macOS arm64 通过
scripts/desktop/desktop-go.sh vet ./internal/core/ ./internal/workbench/ macOS arm64 通过
scripts/desktop/desktop-go.sh test -count=1 ./internal/core/ macOS arm64 ok(21.8s)
scripts/desktop/desktop-go.sh test -count=1 -run 'Remote|Motty|Import' ./internal/workbench/ macOS arm64 ok(29.0s)
scripts/desktop/desktop-go.sh test -count=1 -run 'Search|Index|Session|Trust' ./internal/workbench/(覆盖 Core #165) macOS arm64 ok(20.1s)
固定版本临时改回 57e55d6,运行 TestRemoteConnectionsKeepWindowsDomainUsers macOS arm64 失败(Invalid remote connection),符合预期
Core #166:cargo test -p lithe-remote --all-features,包括 motty::tests::other_protocols_and_refused_settings_are_not_imported 和 windows_domain_users_are_imported macOS arm64 通过
gofmt -l desktop/internal/core/ macOS arm64 无输出
bash scripts/platform-feature-matrix/verify-platform-feature-matrix.sh macOS arm64 通过
node scripts/i18n/generate-i18n.mjs --check、node scripts/i18n/verify-app-language-localization.mjs macOS arm64 通过
zsh scripts/desktop/verify/verify-runtime-bundle-immutability.sh macOS arm64 通过

未能执行的检查和原因:

  • Windows 客户端没有在本机虚拟机上运行,由 CI 的 Windows 检查覆盖。
  • 没有用真实的 Motty 数据库和 Windows 域主机做人工验收。

提交前确认 / Final checks

  • 分支从最新的 main(5b72074c9)创建,目标分支 main
  • 以 Draft 提交
  • 没有无关改动,没有提交产物、凭据或个人路径;测试只用 192.0.2.10、CONTOSO、contoso.example 等占位值
  • 本次没有启动 Lithe 应用,没有进程残留

…应字段 (#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 写明域用户导入和“无效”状态。
@ghfind-review ghfind-review Bot added the review: high ghfind author score; see https://ghfind.com label Nov 22, 2026
@xiaoyumuxi
xiaoyumuxi marked this pull request as ready for review November 22, 2026 02:34
@xiaoyumuxi
xiaoyumuxi merged commit a9611cd into main Nov 22, 2026
9 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant