Repository navigation
feat(desktop): 多仓库 Git Log 多选混排与读取上限,提交并推送后打开“推送提交”对话框 - #2059
Merged
Merged
Conversation
- 混排日志按剩余额度取页:各仓库已加载的提交合计到 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
- 设置 › 版本控制 › Git 日志:单个仓库(默认 5000)与多个仓库混排(默认 20000)的读取上限, 可选 1000–100000,“恢复默认”一并恢复;改动后正在显示的日志按新上限重读 - 上限交给 Core git.historyPage 的 maxCommits(Lithe-IDEA/Lithe-core-rust#71);读到上限且 还有更早提交时,日志末尾显示“已读取 N 条提交,更早的提交超出可读取范围”和“调整上限…”, 不再显示加载失败 / 重试 - 提交面板每个仓库组去掉“提交此仓库”按钮,改为该仓库当前分支的标签(与 IDEA 一致), 主提交按钮本来就提交所有有暂存更改的仓库;删掉随之无用的单仓库提交目标和词条 - 变更树的复选框只占方块本身的宽度,离折叠箭头和后面的颜色、文件图标更近
- 提交并推送先只提交,成功后打开“推送提交”对话框,本次提交过的仓库默认勾选;确认前不推送 - 左侧每个仓库一行:勾选框、仓库名、“分支 → 远程 : 分支”(推送新建远程分支时有标记),下面列出待推送提交; 没有远程显示“定义远程”、空仓库、分离 HEAD、读取失败都不能勾选;分叉时可选推送目标 - 右侧列出选中提交的变更文件,双击打开该提交的比较 - 底部“推送标记(T)”可选“当前分支 / 所有”,切换后重新读取预览 - 推送逐个调用 git.push 并开启子模块发布检查,顺序由 Core git.workspacePushPreview 决定; 子模块推送失败时记录它的父仓库跳过,其余仓库继续,对话框保留每个仓库的结果 - 内核不支持 workspacePushPreview 时沿用原来的推送确认 - 固定 Core 到 373b038(Lithe-IDEA/Lithe-core-rust#74,含 #71) - 新增中英词条、可视化截图场景 push-commits 和截图说明;功能矩阵 git-workspace-staged-commit 补证据与验证步骤 - 截图说明里提交窗口一行已过时(“提交此仓库”按钮早已移除),一并改正
- Git Log 引用树:HEAD、分支、标签等叶子行留出箭头位置,图标与同级分组的名称、文件夹图标对齐; 每一级缩进一个图标加间距,子级的箭头或图标落在父级名称下方 - 提交面板:每级缩进一个复选框加间距,折叠按钮占一个复选框加两侧间距的槽位; 仓库行的箭头居中在更改列表复选框下方、复选框对齐列表标题,文件复选框对齐仓库色块 - 多仓库时“默认更改列表”行也有折叠箭头,可整体收起;无障碍名称复用 git.log.collapse/expand(加入 desktop 平台) - 单仓库更改列表、更改列表视图、工作树更改的文件复选框改为对齐标题 - 重新生成多仓库截图(commit-groups 此前未更新,仍是旧的“提交此仓库”按钮)
1 task done
# Conflicts: # desktop/internal/core/repository_discovery_test.go # scripts/desktop/build-desktop-core.sh
xiaoyumuxi
marked this pull request as ready for review
November 16, 2026 14:53
This was referenced Nov 16, 2026
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
#2013 要求多仓库 Git 和 IDEA 的用法一致。#2038 已经接入了多仓库分组。用户在
~/Dev/lithe-multi-repo-demo里试用,还缺下面几项:混排、读取上限、推送预览和推送顺序都是通用逻辑,放在 Rust Core(#71、#74)。桌面端只做呈现和调用。
改动 / Changes
Git Log:每个仓库各自的引用,可切换、可多选混排(34e26cb)
git.workspaceHistoryMerge),各仓库内部保持 Git 的顺序,加载更多只在末尾追加;git.workspaceRepositorySelection的chosen决定。混排上限与截图(815ec37)
TestMergedLogReadsNoMoreThanCoreMerges。读取上限可设置;提交面板显示各仓库分支(dd5404e)
git.historyPage的maxCommits。读到上限且还有更早的提交时,日志末尾显示“已读取 N 条提交,更早的提交超出可读取范围”和“调整上限…”,不再显示加载失败 / 重试。提交并推送后的“推送提交”对话框(6a9efdb)
git.workspacePushPreview决定,子模块先于记录它的父仓库:git.push,并开启子模块发布检查(checkSubmodules);workspacePushPreview时,沿用原来先显示提交确认、再推送的流程。core包新增:WorkspacePushPreview和GitPushInWorkspace(git_workspace_push.go);GitPush与它共用pushRequest;gitWriteRequest新增checkSubmodules;WorkspaceCommitSession读出计划里的仓库绑定,用来把推送对话框绑到同一批仓库。desktop.git.pushAll.*中英词条。其它
PINNED_CORE_REVISION固定到 Core main 的d8b89b0,即 lithe 0.2.2 #74 的合入提交,含 fix: stop redundant Git refresh loops #69、ci: parallelize macOS validation and releases #71。它和测试时用的 lithe 0.2.2 #74 分支头373b038是同一棵树(d5e2345),scripts/desktop/validate-pins.mjs通过。脚本注释同步更新。docs/assets/workspace-repositories/README.md:git-multi-repository-references、git-history、git-multi-repository-change-groups补充日志多选、混排、读取上限和分支标签;git-workspace-staged-commit补充推送对话框的证据和验证步骤。两端验证状态都保持pending。TestCommitAndPushShowsTheReviewFirst,因为提交并推送不再先显示提交确认;TestCommitReviewNamesTheAuthorAndTheSignOff改为直接走prepareCommit的确认路径;gitpush_workspace_test.go,用真实的 bare 远程验证:不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
pending;Windows 实机还没运行。platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
git-multi-repository-references、git-history、git-multi-repository-change-groups、git-workspace-staged-commit。两端都如实填写证据、owner 和验证动作,验证状态保持pending。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(validated 194 platform capabilities)、generate-platform-feature-matrix.mjs --check,以及./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh <merge-base> HEAD(passed)。.artifacts/下生成的矩阵视图。插件归属 / Plugin ownership
develop-lithe第三节的自查命令,结果为空(rg退出码 1)。shared/i18n/。UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=… scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualWorkspaceRepositories$' -count=1;docs/assets/workspace-repositories/。推送提交(深色中文 / 浅色英文):
Git Log 每个仓库各自的本地 / 远程 / 标签:
点击仓库名选择仓库,勾选两个仓库后的混排:
提交面板的仓库行显示各自的分支:
其余场景和浅色英文截图见 docs/assets/workspace-repositories/README.md。
统一日志系统 / Structured logging
a.performed("git.workspacePush.open" / "git.workspacePush");operationFailed("git_workspace_push_preview"),读取提交文件失败用operationFailed("git_commit_files");runSyncAt的operationFailed("git_push")记录;runSyncAt记录一次。界面文案 / i18n
shared/i18n/,有中英词条,生成结果已提交:推送对话框 20 条desktop.git.pushAll.*,加上日志上限和日志多选的词条。node scripts/i18n/verify-app-language-localization.mjs通过;node scripts/i18n/generate-i18n.mjs --check通过(中英各 11394/11394)。逻辑归属 / Logic placement
git.workspaceHistoryMerge;git.workspaceRepositorySelection;limitReached:git.historyPage;git.workspacePushPreview;git.push的checkSubmodules。records和本次推送结果,不自己推断子模块关系。性能与内存 / Performance and memory
gen丢弃。没有新增轮询。desktop/internal/editor/**、editorview/**),不需要编辑器基线。设置 / Settings
插件契约 / Plugin contract
PINNED_CORE_REVISION的升级只是为了 Git 方法git.workspaceHistoryMerge、git.historyPage maxCommits和git.workspacePushPreview。发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh通过(desktop macOS and Windows sources)。无用代码与重构 / Dead code and refactoring
TestCommitAndPushShowsTheReviewFirst。验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/core/ ./internal/workbench/ -count=1(Core 用 #74 分支头373b038,与d8b89b0同一棵树)scripts/desktop/desktop-go.sh test ./internal/settingswindow/ -count=1go vet ./internal/core/ ./internal/workbench/、gofmt -l ./internal/TestCommitAndPushCommitsThenOpensThePushCommitsDialog、TestPushCommitsDialogPushesInOrderAndSkipsWhatAFailedSubmoduleBlocks(真实 bare 远程)TestVisualWorkspaceRepositories(8 个场景 × 深浅两种主题)node scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --checkverify-platform-feature-matrix.sh、generate-platform-feature-matrix.mjs --check、verify-platform-feature-matrix-change.sh efd00f3 HEADscripts/desktop/verify/verify-runtime-bundle-immutability.shnode scripts/desktop/validate-pins.mjsd8b89b0可达)rg …未能执行的检查和原因:
~/Dev/lithe-multi-repo-demo里试用过;推送对话框只做了无头和组件测试,整机推送到真实远程还没做。提交前确认 / Final checks
main(efd00f3),之后 main 新增的提交和本 PR 的文件没有重叠;目标分支main。