Skip to content

fix(macos): 独立多 Diff 标签与连续滚动、工作树管理体验 - #1555

Merged
xiaoyumuxi merged 3 commits into
previewfrom
codex/1210-disassembly-left-align
Oct 28, 2026
Merged

xiaoyumuxi merged 3 commits into
previewfrom
codex/1210-disassembly-left-align

Conversation

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

背景

统一连续浏览与编辑标签体验,解决反汇编位置不靠左、Git 历史滚动跳动/反复点击加载、工作树页面只有只读展示,以及不同 Diff 互相覆盖的问题。关联 #1210(不关闭该总 Issue)。

功能改动

独立的多 Diff 编辑标签

  • 工作区、linked worktree、目录、冲突、行标记、历史提交、Stash/Shelf、分支与引用比较进入普通编辑标签栏。
  • 每个标签具有独立 UUID、比较会话、缓冲区、加载代次、文件快照及空白符选项;不同文件/提交可以同时打开,同一比较再次打开聚焦已有标签。
  • 同组切换保留搜索、显示模式及原生滚动位置;隐藏标签不接受输入/焦点。沿用普通标签重排、拖动分屏与关闭,关闭一个不会清除其他比较,后台 Diff 不截获普通文件的关闭命令。
  • Git Log 切换提交不改写已经打开的比较;历史文件导航使用会话快照;异步结果仅回写所属标签,关闭后拒绝迟到结果。
  • 整文件暂存/取消暂存与块级动作显式使用当前显示的文件,避免分屏操作命中另一标签;打开的会话阻止 Git 模块提前休眠,工作区退出释放全部会话。

连续浏览与自动加载

  • 反汇编内容靠左;保留横向滚动,接近上下边缘自动扩展并锚定可见行,取代反复点击分页。针对适配器跨越不可读边界的请求采用有界窗口缩小,保留真实传输错误。
  • Git Log 接近底部自动加载旧提交,稳定保留已加载窗口及可见行像素锚点;后台刷新不再缩回第一页或改变页脚高度,避免滚动条跳动。
  • 后台历史读取不再作为用户 Git 命令刷屏;加载失败暂停自动重试并提供本地化重试入口,耗尽或无进展时停止。
  • 工作树历史使用同样的原生视口自动加载;VCS provider 历史和 MCP Registry 发现列表复用有界自动分页、去重、取消与失败重试,不为实现无限滚动一次读取全部数据。

工作树变更管理

  • 工作树 Changes 页面支持多选、勾选暂存/取消暂存、工具栏和右键动作、打开 Diff、刷新以及确认后丢弃更改,不再只是状态文字列表。
  • 写入使用所选 checkout 的仓库根,校验外来/过期/受保护目标,操作后刷新变更并保留已加载历史;不隐式切换主仓库。

规范、翻译与构建

  • 将 develop-lithe Skill 和入口说明整理为中文,把 macOS 共享控件规范拆到按需读取的参考页;明确连续列表自动加载、视口锚定和失败重试规则,保留 Rust Core 英文注释等既有约束。
  • 更新相关 Agent Notes、七项平台能力记录,以及新增用户文案的共享中英词条和生成字符串表。
  • 修复 SwiftPM 切换工具链后资源 bundle 混合旧/新布局导致 SwiftTerm codesign 失败:工具链身份和清理均使用实际 scratch 目录,每架构独立、失败不推进标记,不关闭代码签名。
  • 增加构建缓存回归测试及 macOS CI 计时报告;登记 SwiftPM 可变构建状态禁止跨 worktree 复用,同步资源清单、校验测试和本地编译文档。
  • 补齐固定 Swift 6.3.3 工具链所需的 actor/Sendable/显式捕获及插件本地化参数类型修正,包括 TCP 定时回调、日志、附件缩略图、远程连接、插件诊断、更新回滚及原生共享控件。

验证

已在固定 Swift 6.3.3 工具链、macOS SDK 26.5 下完成以下本地验证(提交 bfeaae4e4):

  • macOS 受影响范围:490 项测试 / 27 个 suite 全部通过,运行约 9.9 秒;参数化结果生成 489 条逐项计时记录,无失败/超时。应用与测试 targets 编译通过,但未替代完整签名打包验收。
    ./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh --report "$PWD/.artifacts/test-stability/macos-multi-diff.json" -- --jobs 6 --filter 'EditorTabOrderFeatureModelTests|GitModuleTests|DiffScrollSynchronizationTests|TerminalPlacementFeatureModelTests|DebugModuleTests|DebugDisassemblyLayoutTests|GitGraphInteractionTests|GitWorktreeAppearanceTests|McpRegistryTests|VcsProviderHostTests|VcsHistoryListTests|ScrollLoadTriggerTests'
  • 回归覆盖:独立 Diff 缓冲区/并发请求/关闭后迟到结果、八类入口×明暗主题/分组/原生焦点、真实多标签滚动保持、源标签返回,以及反汇编/Git/工作树/VCS/MCP 自动分页与取消。最慢相关参数化用例 allRepositoryDiffEntrypointsUseEditorGroups 1123 ms(性能警告,未超硬上限);原生多 Diff 滚动与焦点用例 471 ms。
  • Node:69 项全部通过(构建缓存 10、工作树资源复用 24、i18n 35);使用 node --test --test-timeout=60000 执行 scripts/build-macos.test.mjs scripts/test-reuse-worktree-resources.mjs scripts/test-i18n.mjs,生成 JUnit/HTML 报告。最慢用例 1414 ms。
  • ./scripts/verify-git-graph.sh:线性/merge/截断父节点/标签/泳道连续性与真实 fixture 校验通过。
  • 平台矩阵:./scripts/verify-platform-feature-matrix-change.sh origin/preview HEAD、./scripts/verify-platform-feature-matrix.sh 通过,211 项能力记录有效;已生成并核对矩阵产物。
  • verify-service-boundaries.sh、verify-runtime-bundle-immutability.sh、verify-shared-contracts.sh、verify-windows-boundaries.sh 通过。
  • verify-agent-notes.sh(163 篇)、测试稳定性静态门禁、verify-app-language-localization.mjs、generate-i18n.mjs --check(中英各 9444 条)、actionlint .github/workflows/ci-macos.yml、git diff --check 通过。

本地计时产物(未提交):.artifacts/test-stability/index.html、macos-multi-diff.{json,html,junit.xml}、pr-node-gates.{json,html,junit.xml}。未运行全部 macOS 测试或 Windows 运行时验收;不以组件测试冒充完整产品验收。

范围与限制

  • 本 PR 保持 Draft,不标记 ready,避免反复占用 macOS/Windows CI runner。
  • Windows 只核对既有实现与边界,不声明完成 Windows 运行时/视觉验收;矩阵保留 pending。
  • 原生组件测试不代替完整应用实机验收;完整签名打包流程尚未重新跑完,SwiftTerm 缓存修复有脚本回归证据,不声称发布包签名已通过。
  • 本次没有新增 Java class 字节码反汇编能力;此前讨论不作为已实现功能。

@ghfind-review ghfind-review Bot added the review: medium ghfind author score; see https://ghfind.com label Oct 28, 2026
@xiaoyumuxi
xiaoyumuxi marked this pull request as ready for review October 28, 2026 14:01
@lithe-code-review

lithe-code-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Lithe Review

结论: ⚠️ 有建议
范围: preview ← codex/1210-disassembly-left-align · head: bfeaae4

Findings

  1. [P2] 切换 worktree 后刷新会清空已打开的 Diff
    macos/Sources/LitheGitModule/Application/GitFeatureModel.swift:1025

    • 实际影响:Diff 标签仍在,但内容和会话状态被重置;用户需要重新打开该 Diff。
    • 触发条件:打开 linked worktree A 的文件 Diff,随后检查 worktree B,再刷新主仓库 Git 状态。主状态刷新会遍历所有 Diff 会话;A 不在当前检查快照中时,refreshWorkingDiff 找不到对应文件并调用 session.reset()。主仓库状态和当前 worktree 检查结果都不能证明 A 中的文件已变干净。
    • 复现步骤:按上述顺序打开 A 的 Diff、切换检查 B、刷新 Git 状态,观察 A 的 Diff 标签内容消失。
    • 来源:本次引入。新增的多会话刷新逻辑扩大了原先单一 Diff 的状态刷新范围。
  2. [P2] 分页失败重试会把已加载历史缩回第一页
    macos/Sources/LitheGitModule/Application/GitFeatureModel.swift:2235

    • 实际影响:已加载多页历史后,下一页失败并点击重试,会用默认 50 条窗口重新加载;成功后 gitCommits 被第一页替换,深处历史和当前视口锚点丢失。
    • 触发条件:加载超过一页后,历史游标请求失败,再点击图表中的重试入口。该分支调用默认 refreshGitHistory(),而默认 preservingLoadedHistory 为 false。
    • 复现步骤:滚动加载多页 Git 历史,令下一页读取失败,再点击重试;重试完成后检查已加载提交数和当前滚动位置。
    • 来源:本次引入。失败后的新重试分支没有沿用本 PR 新增的已加载窗口保留路径。

Scope Check

  • 关联 Issue 或需求是否完成:Issue [Feature] 类型化 DebugAdapter Registry 与第三方 DAP 接入现有 Debug UI #1210 的 DAP Registry 总体要求未完成;PR 声明不关闭该总 Issue,因此不作为本次增量变更的完成条件。
  • 已完成范围:审查了多 Diff 会话、工作树变更管理、历史与其他列表自动分页、反汇编视口、SwiftPM 缓存变更及其相邻契约和测试。
  • 未完成范围:PR 声明 Windows 运行时/视觉验收和完整签名打包验收未完成;该限制与本次 macOS 变更相符。
  • 是否复用了已有上游能力,或对自研边界给出充分证据:本次主要复用 Git 服务、SwiftPM 和现有原生视口;未发现新增并行 IDE 领域引擎。
  • 每个 Finding 是否由本次变更引入或加剧:是,均由新增的会话刷新或失败重试路径触发。
  • 是否属于本次变更职责范围:是,分别影响新增的独立 Diff 标签和连续历史加载体验。

Suggestions

  1. 对没有新鲜状态快照的 worktree 保留其 Diff 会话;只有确认读取了该仓库状态且文件已消失时才清空。补充切换检查 worktree 后刷新主状态的回归覆盖。
  2. 失败后重新打开历史游标时保留已有提交窗口,并增加多页加载后失败重试的测试。
  3. PR 未附受影响界面的截图。请补充 Diff、工作树 Changes 和自动分页界面的截图;已有界面改动提供前后对比。视觉效果尚未验证。

Summary

发现两项 P2 建议,没有 P0/P1 阻塞问题。未发现需要阻塞合并的问题。变更覆盖面较广,本次重点审查了核心用户路径与其直接调用链;其余低变更量文件未逐行展开。

Verification

  • 实际检查:给定 base...head 的文件清单与差异;GitFeatureModel、AppModel、编辑器标签与 Diff 视图、worktree 视图、Git/VCS/MCP 分页、反汇编模型与视口、构建缓存脚本、i18n 和相邻测试/笔记。
  • PR 描述提供的结果:声称 490 项 macOS 测试、69 项 Node 测试及若干静态门禁通过;head 没有提供 Check Run 结果。这些结果未在本次独立验证。
  • 本次未运行测试、脚本或应用,也未访问网络,符合远程只读审查限制。
  • 仍有平台与视觉验证缺口:Windows 运行时、完整签名打包和界面截图未提供;PR 描述也注明未运行完整 macOS 测试套件。

- isolate diff sessions, editor groups, focus, navigation and async reads
- auto-load disassembly, Git/worktree history, VCS and MCP discovery lists
- preserve scroll anchors and suppress background Git command noise
- add worktree change management and shared localized actions
- organize develop-lithe guidance in Chinese and update capability records
- repair per-toolchain SwiftPM resource caches and add regression coverage
- align affected macOS code with the pinned Swift 6.3.3 compiler

Refs #1210
工作树「更改」页
- 勾选复选框后立即显示目标暂存状态(乐观显示),Git 完成后以实际结果为准;
  仅等待本工作树状态扫描完成即恢复可点击,不再被全项目刷新阻塞。
- 工具栏只保留有实际动作的按钮:刷新、暂存全部、丢弃所选、显示 Diff;
  移除灰显无作用的占位按钮,启用条件与选区/可暂存项一致。
- 提交历史页脚在加载中/失败/空闲都有固定行高内容,不再留空白带。
- 概览动作改为自然宽度的单一换行流,宽窗口详情自适应两列。

Git 控制台
- 在任何命令启动前就被取消(被后续请求取代)的请求不再显示为失败行;
  已启动命令的取消仍保留并标注原因。同步更新共享契约、fixture 与 Windows journal。

其他
- Git Log 筛选弹窗/图/Diff 的布局与滚动细节调整,补充对应测试与中英词条。
- 同步 git-worktrees 平台能力记录。
@xiaoyumuxi
xiaoyumuxi force-pushed the codex/1210-disassembly-left-align branch from bfeaae4 to 5917de5 Compare October 28, 2026 16:04
- 状态刷新只在本次真正读取过状态的仓库内才把"缺席"当作文件已干净;链接工作树的标签不再被
  工作区刷新误关,由该工作树自己的状态读取(refreshWorktreeChanges)决定是否关闭
- 工作区/目录比较刷新内容未变时不再给会话的 @published 属性赋值(不重绘、不丢滚动位置);
  新增 GitRepositoryDiffSession.updateDocument,同时比较补丁与行(与 HEAD 的比较没有补丁文本)
- 目录比较刷新改为就地更新(showDirectoryDiff 增加 refreshingConfirmedRoots),不再清空行并闪现加载态
- 提交历史加载失败后的显式重试按已加载条数重新打开窗口,不缩回首页、不移动选择
- 反汇编列表只对最长候选行做文字测量,不再每次 body 求值都测量全部行
- 保存更改比较恢复"快照属于当前仓库"的校验,并在打开标签前校验版本与文件,避免留下空标签
- 补充回归测试,并更新两份 Agent Note
@xiaoyumuxi
xiaoyumuxi merged commit f0957b7 into preview Oct 28, 2026
13 of 16 checks passed
1lck added a commit that referenced this pull request Oct 29, 2026
* feat(debug): #1210 tcpLanguageServer 调试传输:调试适配器随插件语言服务器运行(Java 迁入插件的第一步) (#1520)

* feat(debug): #1210 tcpLanguageServer 调试传输:调试适配器随插件语言服务器运行(Java 迁入插件的第一步)

debugAdapters 新增 tcpLanguageServer 传输,用于调试服务寄居在同一插件语言服务器里的适配器(Java Debug Server 之于 JDT LS)。该传输没有 launch.process,endpoint 只有 {languageID, command}:languageID 必须是同一插件 languageServers[] 里声明过的,command 限 [A-Za-z0-9._:-]{1,128}。宿主不拉起进程,而是启动该插件的语言服务器,用 workspace/executeCommand 执行 command,把返回值解析成 1…65535 的端口后连接 127.0.0.1。

Rust Core:DebugLaunch.process 改为可选(其他传输仍必填),新增 DebugTransport::TcpLanguageServer 与 DebugEndpoint 校验;programs() 产出 languageServerDebugAdapter,命令变化需要重新批准;debug_adapter_launch_plan 对无进程适配器返回插件语言服务器的启动计划和 debugAdapter 描述符。

macOS:DebugAdapterProcess 换成 DebugAdapterLaunch(host 为 .process 或 .languageServer);MacJavaDebugAdapterTransport 改名 MacHostedPortDebugAdapterTransport,端口来源由宿主注入,不再知道 Java;LanguageToolingSessionManager 新增 startHostedDebugAdapter,校验语言服务器确由该插件拥有,内置 Java 语言服务被拒绝;端口解析抽成 debugAdapterPort(from:)。tcpPort、tcpAnnounced、attach 和 runSelectedRuntime 仍被拒绝,拒绝文案改为只支持 stdio 与语言服务器承载的适配器。

契约与文档:plugin-manifest.schema.json、契约 README、rust-core-api.md、声明草案和 #1210 Agent Note 同步,新增 debug-adapter-language-server 契约 fixture;功能矩阵补充证据与验证说明。i18n:3 条 Java 专属文案改为通用文案,新增 3 条,调整传输拒绝文案,并重新生成产物。

测试:Rust 新增 3 个 Core 测试;Swift 新增解析器、传输、端口解析(16 个用例)与语言服务器归属测试。

* fix(debug): activate hosted language servers and cancel stale adapter starts

* fix(ci): respect runtime boundaries and stabilize native regression tests

* Merge pull request #1534 from 1lck/codex/remove-bot-pr-workflow

chore(ci): remove unused GitHub App Bot PR workflow

* feat(debug): #1210 远程 attach 契约与普通 TCP 生命周期边界 (#1525)

* feat(debug): #1210 tcpLanguageServer 调试传输:调试适配器随插件语言服务器运行(Java 迁入插件的第一步)

debugAdapters 新增 tcpLanguageServer 传输,用于调试服务寄居在同一插件语言服务器里的适配器(Java Debug Server 之于 JDT LS)。该传输没有 launch.process,endpoint 只有 {languageID, command}:languageID 必须是同一插件 languageServers[] 里声明过的,command 限 [A-Za-z0-9._:-]{1,128}。宿主不拉起进程,而是启动该插件的语言服务器,用 workspace/executeCommand 执行 command,把返回值解析成 1…65535 的端口后连接 127.0.0.1。

Rust Core:DebugLaunch.process 改为可选(其他传输仍必填),新增 DebugTransport::TcpLanguageServer 与 DebugEndpoint 校验;programs() 产出 languageServerDebugAdapter,命令变化需要重新批准;debug_adapter_launch_plan 对无进程适配器返回插件语言服务器的启动计划和 debugAdapter 描述符。

macOS:DebugAdapterProcess 换成 DebugAdapterLaunch(host 为 .process 或 .languageServer);MacJavaDebugAdapterTransport 改名 MacHostedPortDebugAdapterTransport,端口来源由宿主注入,不再知道 Java;LanguageToolingSessionManager 新增 startHostedDebugAdapter,校验语言服务器确由该插件拥有,内置 Java 语言服务被拒绝;端口解析抽成 debugAdapterPort(from:)。tcpPort、tcpAnnounced、attach 和 runSelectedRuntime 仍被拒绝,拒绝文案改为只支持 stdio 与语言服务器承载的适配器。

契约与文档:plugin-manifest.schema.json、契约 README、rust-core-api.md、声明草案和 #1210 Agent Note 同步,新增 debug-adapter-language-server 契约 fixture;功能矩阵补充证据与验证说明。i18n:3 条 Java 专属文案改为通用文案,新增 3 条,调整传输拒绝文案,并重新生成产物。

测试:Rust 新增 3 个 Core 测试;Swift 新增解析器、传输、端口解析(16 个用例)与语言服务器归属测试。

* feat(debug): #1210 远程 attach 契约:attach 配置声明 connection 绑定,适配器在远端的设计 Note

- attach 配置的 targetBindings 新增 connection:host+port 或 address,目的地是适配器参数里的点分路径(最多 4 段),可选 pathMappings(objects/first 两种形状)
- 声明期拒绝目的地冲突(与其他目的地、processId/cwd 参数或默认 arguments 重名/包含),运行期 set_argument 只写空位
- debug.adapters.startArguments 支持 connection 目标,校验主机/端口/映射,返回 connection:{host,port,remote};回环只按字面量判断,其余一律 remote:true
- 适配器没有路径映射绑定而目标带了映射时拒绝,而不是悄悄丢弃
- plan 描述符新增 remoteAttach:{pathMappings},宿主据此决定界面,不按适配器名字判断
- 不新增权限,debug.attach 已覆盖;契约 README、schema、rust-core-api、fixture(含 22 条新拒绝用例)、功能矩阵同步
- 新增 Agent Note:适配器运行在远端——经 SSH 的 stdio 调试(仅设计,待确认四项默认选择后再实现),并更新统一调试 Note

* feat(debug): #1210 远程 attach 兼容性审计:路径映射补 dictionary / pairs 两种形状,缺口清单与路线图

按各调试器上游文档核对“附加到远端程序”的参数写法后,路径映射就四种写法:
- objects:对象列表(debugpy pathMappings、delve substitutePath)
- first:唯一一条映射写成两个字符串(js-debug localRoot/remoteRoot)
- dictionary:以 local 或 remote 一侧为键的对象(CodeLLDB sourceMap、PHP pathMappings)
- pairs:二元数组列表,order 为 remoteLocal 或 localRemote(lldb-dap sourceMap)

形状装不下用户给的映射就拒绝,不截断:first 只接受一条(此前只取第一条,与
“不悄悄丢映射”的原则矛盾,属于未发布 API 4 内的行为修正),dictionary 在键的
一侧不能出现同一个根两次,违反返回 debug.target.invalid(target.pathMappings)。
plan.debugAdapter.remoteAttach 增加 maxPathMappings,宿主据此决定最多显示几行。

契约与 fixture:schema 增加两个 oneOf 分支;remote-attach fixture 增加 keyed、
paired 两个适配器(共 6 个);拒绝用例新增 6 条(共 28 条)。

Note:#1210 统一 Note 新增“兼容性审计”,逐个适配器标注“已核对 / 待核验”,列出
G1–G11 缺口(空闲端口占位符、tcpConnect、监听 attach、URI 目标、命令模板等)的
现状、决定和触发条件,并更新后续路线;SSH Note 说明适配器原生映射与 Core 路径翻译
是叠加的两层,远端适配器必须由 Core 翻译。

* docs(debug): separate network paths from TCP lifecycle scope

* feat(debug): #1210 内置汇编级调试:反汇编、指令步进、指令断点、寄存器与只读内存 (#1527)

* feat(debug): #1210 内置汇编级调试:反汇编、指令步进、指令断点、寄存器与只读内存

内核按适配器能力开放汇编级调试,插件只负责启动 lldb-dap/gdb 等适配器;能力快照 supported = 适配器声明 ∧ 已注册扩展 ∧ 已授权。

- 无源码栈帧:栈帧不伪造文件和第 1 行,显示函数名与地址,暂停后自动打开反汇编

- 反汇编:debug.inspect disassemble 与反汇编视图,高亮当前指令,保持最小滚动,剩余不足时向后续读

- 指令步进:debug.execute 增加 granularity,仅适配器声明 supportsSteppingGranularity 时生效;反汇编打开时步过/步入按指令前进,面板头部与按钮提示同步变化,不支持时提示仍按源码行前进

- 指令断点:debug.setInstructionBreakpoints,点击地址栏设置或移除;只属于当前会话,不持久化、不重放

- 寄存器:作用域 presentationHint registers 显示为寄存器标签;宿主不内置 CPU 寄存器表

- 内存:debug.inspect readMemory,接受地址或保存着地址的表达式,从目标前 64 字节读起并分页;目标字节在十六进制和 ASCII 两侧高亮并滚入可见区;右侧显示设置可切换进制、每格字节数、每行字节数、字节序与 ASCII 列;读不到的字节显示为缺失;只读,不开放 writeMemory

- 单步局部刷新:next/stepIn/stepOut/stepBack 保留现有检查数据并原地替换,线程、调用栈、变量、反汇编、内存与 JSON 视图不再整面板清空,变化的内存字节被标出;继续、暂停、结束才清空

- 变量 JSON 视图:修复顶部空白带,key/value 分色高亮

- i18n:新增词条走 shared/i18n 并生成;功能矩阵新增 debug-disassembly(Windows 待实现);设计笔记补充真实 lldb-dap 验证结论

* fix(debug): #1210 guard retained inspection across steps and cancellation

Freeze the old variable tree before the next stop reloads scopes and keep inspection controls read-only until replacement. Retire disassembly and memory callbacks before synchronous cancellation, and reject stale disassembly retries after session changes. Clear retained inspection when transport fails or the session terminates.

Label memory offsets relative to the requested reference, use shared text-input and font owners, and update the owning decision note and platform verification steps.

Add four deterministic regressions reproduced against the original PR. Validation: 152 selected Swift tests and 72 Rust debug tests passed; i18n, shared contracts, platform boundaries, test stability, Agent Notes, matrix gates and runtime bundle immutability passed. Real GUI and Windows runtime validation remain pending.

* feat(debug): #1210 实现普通 TCP 调试连接与有界生命周期 (#1538)

* feat(debug): #1210 implement direct TCP adapter lifecycle

Unify hosted and external DAP byte streams behind a replaceable connection provider; reserve the seam for future network routes without adding proxy or tunnel behavior.

Add explicit endpoint validation, per-connection remote consent, a one-shot launch/attach entry, bounded startup/write buffering, generation-fenced callbacks, and bounded disconnect draining. Keep the debuggee target separate and external resources user-owned.

Cover routing, cancellation, queue limits, cleanup and real loopback Core DAP initialize/attach/disconnect. Update shared fixtures, localization, architecture notes and the platform capability matrix. Windows host and real debugger acceptance remain out of scope.

* fix(debug): #1210 修复 TCP 调试连接评审问题

- 被拒绝或不可达的端口立即以系统原因失败,不再停在 .waiting 等满超时
- 端点发现与建连各自独立计时:发现 120 秒(语言服务器冷启动),建连 10 秒
- 外部适配器会话初始化期限改为 10 秒建连加 10 秒握手,不再抢在建连之前结束
- 连接对话框在连接启动前保持打开,失败原因留在对话框内并保留已填内容
- connectExternalDebugAdapter 返回失败原因,不再静默丢弃请求
- 当前文件没有调试提供方时,"连接调试适配器…"菜单项不可用;主机名先去除首尾空白
- 删除宿主端口传输中无人使用的错误分支
- 补充发现/建连两段期限与真实回环拒绝连接的测试,同步 Agent Note 与功能矩阵

* refactor(debug): #1210 将 TCP 调试连接生命周期下沉到 Rust Core

连接状态转换、取消规则、代次令牌与过期结果拒绝、只结束一次、
建连/写入/排空期限、待发字节与消息预算、单个在途写入,原先都写在
macOS 的 MacTCPDebugAdapterTransport 里,Windows 接入要重写并重新
证明同一套规则。现在这些规则由 Core 的独立状态机持有,平台只做 I/O。

Core(rust/lithe-core/src/debug/transport_lifecycle.rs)
- 与 DAP 协议状态机独立,按 transportId 登记。
- 新增命令 debug.transport.policy / handle / release:平台发送事件,
  Core 返回新代次、阶段、结果和有序效果(发现端点、设置或取消计时器、
  连接、写入、投递数据、关闭、报告失败、通知终止)。
- Core 没有时钟,只决定期限长短和到期后的转换;待发数据只以字节数
  越过 JSON 边界,真实字节、socket 与计时器句柄留在平台。
- 共享 fixture shared/fixtures/debug/transport-lifecycle-v1.json 覆盖
  约 28 个场景,Rust 逐步回放;已登记到 v1-baseline。

macOS
- 新增 RustDebugTransportCore.swift 类型化桥接。
- MacTCPDebugAdapterTransport 只拥有 NWConnection、端点发现任务、待发帧
  字节和系统计时器,并执行 Core 返回的效果;core 参数贯穿托管端口、
  插件和外部端点三条传输,会话初始化期限改读 Core 策略。
- 计时器触发后也释放句柄,避免排空计时器继续持有传输。
- Core 调用本身失败时本地静默拆除并向所有者报告一次。

已接受的行为差异:观察者在错误输出回调里调用 stop() 时,终止通知
现在仍会送达(旧实现把它当作生命周期被替换而吞掉);重启仍会使旧
通知作废。

文档:更新 Agent Note、功能矩阵与 rust-core-api 契约。

* feat(plugins): Java Support 独立分发、迁移与按需安装 (#1483)

* feat(plugins): 支持 Java 签名安装与双架构独立发布基础

* feat(plugins): 完成 Java Support 迁移与按需分发入口

* fix(plugins): suggest Java restoration after completed removal

* docs(plugins): inventory Maven and Java migration for #1495 (#1513)

* fix(run): 统一跨平台启动环境、容错扫描与构建事件过滤 (#1543)

* fix(run): share launch environment and resilient workspace policies

* fix(run): stop shared Java enumeration at its source limit

* docs(plugins): plan macOS public APIs and SDK documentation (#1548)

* feat(plugins): #1495 原生 Provider 工作流与只读工程模型共享 (#1517)

* feat(plugins): execute native build tasks in workspace providers (#1495)

* feat(plugins): discover and execute native provider tests (#1495)

* feat(plugins): prepare and persist provider application runs (#1495)

* feat(plugins): prepare native provider debug sessions (#1495)

* feat(plugins): share read-only provider model inputs (#1495)

* fix(build): isolate producer revisions and own run saves

* feat(plugins): Java Support 独立分发、迁移与按需安装 (#1483)

* feat(plugins): 支持 Java 签名安装与双架构独立发布基础

* feat(plugins): 完成 Java Support 迁移与按需分发入口

* fix(plugins): suggest Java restoration after completed removal

* docs(plugins): inventory Maven and Java migration for #1495 (#1513)

* fix(run): 统一跨平台启动环境、容错扫描与构建事件过滤 (#1543)

* fix(run): share launch environment and resilient workspace policies

* fix(run): stop shared Java enumeration at its source limit

* docs(plugins): plan macOS public APIs and SDK documentation (#1548)

---------

Co-authored-by: Lichenkang <2188718831@qq.com>
Co-authored-by: Xiaoyumuxi <23722032@bjtu.edu.cn>

* fix(macos): 修复 Java 启动竞态、插件启动参数与无限重试 (#1526)

* fix(macos): stabilize Java startup and plugin launch (#1523, #1524)

* test(macos): bound language startup regression task waits

* test(macos): allow disk image creation margin within integration budget

* fix(macos): revoke deferred language activation when project session closes

* test(macos): cover production language launch and navigation evidence

* fix(ide-host): include ttlMs and cacheScope in MCP tools/list (#1545) (#1546)

The helper advertises protocol revision 2026-07-28 through server/discover.
For that revision ListToolsResult extends CacheableResult, where ttlMs and
cacheScope are required, but building the result with ..Default::default()
left both fields absent. Clients validating the negotiated wire shape
rejected the whole server with INVALID_RESULT (ZCode 0.17.0, Qoder).

The catalog describes live IDE state, so the result is immediately stale
(ttlMs 0) and private to the connected client.

Co-authored-by: jiaqizhang258 <321343564+jiaqizhang258@users.noreply.github.com>
Co-authored-by: Lichenkang <2188718831@qq.com>

* fix(mcp): 稳定 Windows 请求调度与授权生命周期 (#1549)

* fix(mcp): stabilize Windows request delivery and protocol discovery

* fix(mcp): recover independent notifications and enforce monotonic deadlines

* fix(macos): 独立多 Diff 标签与连续滚动、工作树管理体验 (#1555)

* fix(macos): support independent diff tabs and continuous Git browsing

- isolate diff sessions, editor groups, focus, navigation and async reads
- auto-load disassembly, Git/worktree history, VCS and MCP discovery lists
- preserve scroll anchors and suppress background Git command noise
- add worktree change management and shared localized actions
- organize develop-lithe guidance in Chinese and update capability records
- repair per-toolchain SwiftPM resource caches and add regression coverage
- align affected macOS code with the pinned Swift 6.3.3 compiler

Refs #1210

* fix(macos): 工作树更改页即时暂存、工具栏精简与 Git 控制台取消过滤

工作树「更改」页
- 勾选复选框后立即显示目标暂存状态(乐观显示),Git 完成后以实际结果为准;
  仅等待本工作树状态扫描完成即恢复可点击,不再被全项目刷新阻塞。
- 工具栏只保留有实际动作的按钮:刷新、暂存全部、丢弃所选、显示 Diff;
  移除灰显无作用的占位按钮,启用条件与选区/可暂存项一致。
- 提交历史页脚在加载中/失败/空闲都有固定行高内容,不再留空白带。
- 概览动作改为自然宽度的单一换行流,宽窗口详情自适应两列。

Git 控制台
- 在任何命令启动前就被取消(被后续请求取代)的请求不再显示为失败行;
  已启动命令的取消仍保留并标注原因。同步更新共享契约、fixture 与 Windows journal。

其他
- Git Log 筛选弹窗/图/Diff 的布局与滚动细节调整,补充对应测试与中英词条。
- 同步 git-worktrees 平台能力记录。

* fix(macos): 修复多 Diff 标签刷新、历史重试、反汇编宽度与保存更改比较的评审问题

- 状态刷新只在本次真正读取过状态的仓库内才把"缺席"当作文件已干净;链接工作树的标签不再被
  工作区刷新误关,由该工作树自己的状态读取(refreshWorktreeChanges)决定是否关闭
- 工作区/目录比较刷新内容未变时不再给会话的 @published 属性赋值(不重绘、不丢滚动位置);
  新增 GitRepositoryDiffSession.updateDocument,同时比较补丁与行(与 HEAD 的比较没有补丁文本)
- 目录比较刷新改为就地更新(showDirectoryDiff 增加 refreshingConfirmedRoots),不再清空行并闪现加载态
- 提交历史加载失败后的显式重试按已加载条数重新打开窗口,不缩回首页、不移动选择
- 反汇编列表只对最长候选行做文字测量,不再每次 body 求值都测量全部行
- 保存更改比较恢复"快照属于当前仓库"的校验,并在打开标签前校验版本与文件,避免留下空标签
- 补充回归测试,并更新两份 Agent Note

* fix(remote): #1507 远程工作区、构建与插件执行适配 (#1515)

* fix(remote): adapt workspace I/O and plugin execution for #1507

* fix(remote): continue #1507 common backend lifecycle and plugin validation

Integrate PR #1515 onto the preview baseline, preserving plugin live activation and shared i18n changes. Reserve pending process, terminal and watch starts before dispatch; retain cleanup ownership across cancellation, worker saturation, disconnect and session shutdown.

Add deterministic lifecycle and declarative remote launch regressions; isolate the empty connection registry test, fix Swift fixture shadowing and synchronize terminal resize with shell readiness. Update contracts, Agent Notes and partial/pending capability evidence. Java/JDT integration remains out of scope.

* fix(remote): own plugin snapshots and isolate upload I/O

Add session-owned run directory allocation and cleanup with retryable errors, original-session macOS deployment cleanup, and per-upload I/O isolation.

Cover lifecycle and upload ordering regressions, update contracts/resource boundaries and capability evidence, and record optional transfer/environment candidates without expanding Agent or Java scope.

* fix(remote): preserve repository identity and consolidate remote crate

Keep remote Git repository roots and external metadata bound to their original host, including parent repositories and symlink roots.

Consolidate client, protocol and server into lithe-remote with isolated client/server features, preserving the standalone server binary. Update consumers, packaging, CI selection, resource validation, contracts and regression coverage.

* fix(remote): 修复合并后的 Agent Notes 路径,补齐能力矩阵并收紧远程扫描失败判定

- 两条 proposed 笔记的适用范围仍指向已合并的 rust/lithe-remote-client,
  改为 rust/lithe-remote/src/client/,修复 Verify Agent Notes。
- 能力矩阵:remote-development-workspace 增加 BuildSystemService 与共享扫描证据,
  写明运行配置发现尚未接入远程(Core 对 runConfig.inspect 返回 NotSupported,
  仅 runConfig.selectJava 可用);run-discovery 增加同一说明。状态不变。
- 远程共享运行扫描只在链路取消、超时或中断时整体失败;主机对单个目录报告的
  错误仍记为扫描不完整,与本机一致。判断集中到 workspace_io::is_transport_failure,
  detectors/scan.rs 与 workspace_scan.rs 共用,修正此前两处不一致。
- 新增集成测试:读取主机目录树且占位目录保持为空、单目录错误记为不完整、
  根目录之下链路中断时扫描失败。

* fix(macos): avoid reentrant workbench hit testing (#1542) (#1557)

* chore(scripts): 按作用语义整理 scripts 目录层级 (#1563)

* chore(scripts): 按作用语义整理 scripts 目录层级

把 scripts/ 根目录下 127 个平铺脚本移入分类子目录,根目录不再放任何脚本。
全部使用 git mv,历史可追溯。

新目录:
- ci/{common,cancel-closed-pr-runs,update-repo-charts}:CI 脚本,按工作流名分目录
- macos/{build,package,prepare,test,verify,perf,probe}
- windows/{build,prepare,package,test,verify}
- release/{sparkle,macos,autobuild,windows,notes}
- rust-core、architecture、i18n、agent-notes、platform-feature-matrix、
  plugins、remote、ide-mcp、editor、git-graph、agent、resources

同步修改:
- classify-ci-changes.sh 路径模式、plan-ci-lane-reuse.mjs 基础设施规则、
  对应测试夹具(夹具复制脚本时按新目录深度建目录)
- ci-macos.yml 的 scripts/**/*.sh 循环、verify-i18n.yml 等工作流路径与 paths 过滤
- sparkle 的三个 Ruby 脚本改为 require_relative "../autobuild/autobuild-identity"
- tauri.conf.json 的 beforeDevCommand / beforeBuildCommand
- README、docs、Agent 笔记、Skill 和 Fonts NOTICE 中的脚本路径
- develop-lithe Skill 新增“脚本放置与分类”一节,AGENTS.md 增加入口提醒:
  脚本必须在 scripts/ 下按作用分类,不得放在 scripts/ 根目录

验证:
- 127 个脚本在旧分类器/新分类器下的 lane 结果一致,未知路径仍然 fail closed
- 127 个脚本的规划器基础设施规则一致
- 受影响的 node/bun/shell/ruby/python 测试与 i18n、特性矩阵、Agent 笔记、
  共享契约、模块/服务/编辑器边界、运行时 bundle 只读校验均通过

* fix(scripts): 修复 scripts 分类整理的评审问题

- Windows 前端安装测试移到 scripts/windows/build/,与被测脚本同目录,
  测试夹具里复制脚本的路径、ci-windows.yml 的运行命令、分类器 windows 分支
  和 Agent Note 里的路径同步更新
- 分类器空分支删除 3 个已不存在的平铺脚本名,避免过期名字被误当成已登记
- 规划器的 Windows 规则改为按目录匹配(windows/、release/windows/),
  并单独登记 ide-mcp/build-windows-ide-mcp.mjs,补齐测试期望,
  与分类器的路由保持一致
- develop-lithe Skill 补充:平台专属脚本留在所属跨平台领域目录的例外、
  手工验收脚本放 test/、tauri.conf.json / package.json / official-plugins.json
  inputPaths / worktree-resources.json 里硬编码脚本路径的检查清单

* fix(windows): 补全 JavaSelectionRequest.requirements,修复 Windows 安装包构建 (#1507) (#1565)

#1515 给 lithe-core 的 JavaSelectionRequest 新增了必填字段 requirements,
但 Windows 的 select_project_java 仍按旧字段构造,导致 Release AutoBuild
的 Windows 安装包步骤报 E0063 编译失败。

- windows/tauri/src-tauri/src/run.rs:Windows 传 root,requirements 与 root
  互斥,所以填 None
- develop-lithe Skill:补充 lithe-core 公开 Rust 类型/签名也是兼容面,
  Windows 直接链接 Core,改动时要同步检查调用点并给出检查方法

* docs: refresh WeChat community QR code (#1569)

---------

Co-authored-by: Xiaoyumuxi <23722032@bjtu.edu.cn>
Co-authored-by: muchen <145200703+Mucheen@users.noreply.github.com>
Co-authored-by: arkleselect <166632698+arkleselect@users.noreply.github.com>
Co-authored-by: jiaqizhang258 <549728022@qq.com>
Co-authored-by: jiaqizhang258 <321343564+jiaqizhang258@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant