Repository navigation
feat(git): 多仓库推送预览 git.workspacePushPreview - #74
Merged
Merged
Conversation
参照 IDEA 的推送对话框:一次读取所有绑定仓库,逐个给出 ready / upToDate / noRemote / emptyRepository / detachedHead / failed 状态、当前分支和 git.pushPreview 结果;列表按 gitlink 关系排序(子仓库先于记录它的父仓库), records 列出父仓库记录的子仓库,客户端在子仓库推送失败时跳过父仓库。 分歧上游未指定目标时 needsTarget 为 true。 Refs 1lck/Lithe-IDEA#2013
xiaoyumuxi
marked this pull request as ready for review
November 16, 2026 14:06
31 of 37 tasks
xiaoyumuxi
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 16, 2026
* feat(desktop): 多仓库 Git Log 每个仓库各列本地/远程/标签,点仓库名切换,勾选多个仓库按时间混合显示 * feat(desktop): 混排日志不超过 Core 的 2 万条上限,固定 Core #71,补截图 - 混排日志按剩余额度取页:各仓库已加载的提交合计到 2 万条(git.workspaceHistoryMerge 和 git.graphProjection 的上限)后,仍有下一页的仓库关闭游标并按已读完处理,列表在这里正常结束, 和单仓库日志读满 5000 条后结束一样;之前勾选 5 个以上历史很长的仓库时,滚到底会停在 “加载失败 / 重试”,重试也不会成功。新增 TestMergedLogReadsNoMoreThanCoreMerges。 - PINNED_CORE_REVISION 暂时固定到 Lithe-core-rust #71 分支的 0315efd(含 workspaceHistoryMerge 与 selection 的 chosen),#71 合入后改为 Core main 的 commit。 - 截图测试固定提交日期,新增“点击仓库名弹出仓库列表”和“两个仓库按时间混排”两个场景; 重新生成 docs/assets/workspace-repositories 的全部截图并更新 README。 Refs #2013 * feat(desktop): Git Log 读取上限可在设置里调整,读满提示超出可读取范围;提交面板仓库行显示各自分支、复选框更紧凑 - 设置 › 版本控制 › Git 日志:单个仓库(默认 5000)与多个仓库混排(默认 20000)的读取上限, 可选 1000–100000,“恢复默认”一并恢复;改动后正在显示的日志按新上限重读 - 上限交给 Core git.historyPage 的 maxCommits(Lithe-IDEA/Lithe-core-rust#71);读到上限且 还有更早提交时,日志末尾显示“已读取 N 条提交,更早的提交超出可读取范围”和“调整上限…”, 不再显示加载失败 / 重试 - 提交面板每个仓库组去掉“提交此仓库”按钮,改为该仓库当前分支的标签(与 IDEA 一致), 主提交按钮本来就提交所有有暂存更改的仓库;删掉随之无用的单仓库提交目标和词条 - 变更树的复选框只占方块本身的宽度,离折叠箭头和后面的颜色、文件图标更近 * feat(desktop): 提交并推送先提交再打开 IDEA 式“推送提交”对话框,按 Core 顺序推送多个仓库 - 提交并推送先只提交,成功后打开“推送提交”对话框,本次提交过的仓库默认勾选;确认前不推送 - 左侧每个仓库一行:勾选框、仓库名、“分支 → 远程 : 分支”(推送新建远程分支时有标记),下面列出待推送提交; 没有远程显示“定义远程”、空仓库、分离 HEAD、读取失败都不能勾选;分叉时可选推送目标 - 右侧列出选中提交的变更文件,双击打开该提交的比较 - 底部“推送标记(T)”可选“当前分支 / 所有”,切换后重新读取预览 - 推送逐个调用 git.push 并开启子模块发布检查,顺序由 Core git.workspacePushPreview 决定; 子模块推送失败时记录它的父仓库跳过,其余仓库继续,对话框保留每个仓库的结果 - 内核不支持 workspacePushPreview 时沿用原来的推送确认 - 固定 Core 到 373b038(Lithe-IDEA/Lithe-core-rust#74,含 #71) - 新增中英词条、可视化截图场景 push-commits 和截图说明;功能矩阵 git-workspace-staged-commit 补证据与验证步骤 - 截图说明里提交窗口一行已过时(“提交此仓库”按钮早已移除),一并改正 * chore(desktop): Core #74 已合入,固定版本改为 Core main 的 d8b89b0(与 373b038 同一棵树) * fix(desktop): 提交面板与 Git Log 引用树按 IDEA 网格对齐 - Git Log 引用树:HEAD、分支、标签等叶子行留出箭头位置,图标与同级分组的名称、文件夹图标对齐; 每一级缩进一个图标加间距,子级的箭头或图标落在父级名称下方 - 提交面板:每级缩进一个复选框加间距,折叠按钮占一个复选框加两侧间距的槽位; 仓库行的箭头居中在更改列表复选框下方、复选框对齐列表标题,文件复选框对齐仓库色块 - 多仓库时“默认更改列表”行也有折叠箭头,可整体收起;无障碍名称复用 git.log.collapse/expand(加入 desktop 平台) - 单仓库更改列表、更改列表视图、工作树更改的文件复选框改为对齐标题 - 重新生成多仓库截图(commit-groups 此前未更新,仍是旧的“提交此仓库”按钮)
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 16, 2026
#74 合入的 PreviewResponse.repositories 与 RepositoryPush.state 没有文档注释, Rust Core CI 的 Check comments(rustdoc -D missing-docs)在 PR 覆盖到 lithe-git 时失败。
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 16, 2026
…#77) * refactor(execution): 删除内置运行发现探测器,运行入口只来自插件 buildSystems[].run (#1856) Core 不再自己识别可运行入口。生成层只由构建插件声明的 run(providerRuns)组成, 模型何时过期由各插件的 sync.watch 决定。 - 删除 execution 的 detectors/(cargo、compose、go、make、npm、procfile、python、shell)、 指纹输入 inputs.rs、工具链要求 requirements.rs,以及随之失去用途的 regex、serde_yaml_ng、 toml、lithe-diagnostics 依赖。 - runConfig.generate 只把 providerRuns 生成为 build.provider 条目;未提供时等同 []。 生成层只留在内存,不写工作区、不写缓存,也不再读取旧版的 .lithe/run/generated.json; 响应为 { generated, entryCount }。 - runConfig.inspect 只在给了 providerRuns 且快照不同时报告 staleProviderModel; 删除 checkFingerprint、staleFingerprint、incompleteProjectScan 与 cacheDirectory。 - runConfig.resolve 不再匹配工具链版本、不再归一化 npm 条目:删除 toolchainCandidates 和工具链诊断,默认项为项目默认、首个生成的服务、首个非 Current File 的生成条目。 - 重名只按工作目录区分(provider 条目没有 source)。 - workspace_scan 只保留一种有界扫描(6 层、隐藏目录与 Git 忽略、最多 4000 个目录), 供 build.detect 使用;删除不限层数模式、unreadablePaths 与提前停止。 - 契约:rust-core-api.md、application-boundary.md、run-configuration-v2 schema 的 generator 只剩 providerRunFingerprint;删除 toolchain-requirements-v1 schema 与 hybrid-service-web fixture。 - 测试:删除内置探测器测试,新增 provider run 生成的重名与过期快照测试, Cargo 静态模型测试改为直接断言 run 条目。 * docs(plugins): 协议更新记录登记 #77 (#1856) * docs(git): 补齐多仓库推送预览两个公开字段的文档注释 #74 合入的 PreviewResponse.repositories 与 RepositoryPush.state 没有文档注释, Rust Core CI 的 Check comments(rustdoc -D missing-docs)在 PR 覆盖到 lithe-git 时失败。
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.
Refs 1lck/Lithe-IDEA#2013
改动
新增只读命令
git.workspacePushPreview,供桌面端的多仓库「推送提交」确认对话框使用(参照 IDEA 的推送对话框)。repositories: [{ id, root }](与git.workspaceCommitPrepare相同的绑定),可选limit(默认 100)、pushTags、pushTargets: { <id>: "publish" | "upstream" }。{ id, state, branch?, preview?, needsTarget, records, detail? }。state:ready/upToDate/noRemote/emptyRepository/detachedHead/failed。由 Core 分类,客户端不需要解析 Git 的错误文本。preview就是该分支的git.pushPreview,客户端原样作为expectedPush发给git.write push,并带上checkSubmodules: true。needsTarget:上游分支名不同(divergent)而且还没有选目标。relations/commit_order(这两个函数和validate_bindings改成pub(crate))。records列出父仓库记录的子仓库,子仓库推送失败时客户端跳过对应的父仓库。pushTags不支持、pushTargets指向未列出的仓库、出现未知字段或 gitlink 循环时,返回invalid_request。rust/contracts/rust-core-api.md补了命令表行和说明段落。验证
crates/core/tests/git_push.rs新增 3 个集成测试:checkSubmodules推送被 Git 拒绝;按列表顺序推送则成功,再次预览时两个仓库都是upToDate。needsTarget,以及请求校验。cargo test -p lithe-git -p lithe-core全部通过。cargo fmt --all -- --check和cargo clippy -p lithe-git -p lithe-core --all-targets -D warnings都干净。