Skip to content

feat(git): 优化状态与日志控制 - #269

Merged
1lck merged 8 commits into
previewfrom
codex/split-git-status-controls
Aug 27, 2026
Merged

feat(git): 优化状态与日志控制#269
1lck merged 8 commits into
previewfrom
codex/split-git-status-controls

Conversation

@xiaoyumuxi

@xiaoyumuxi xiaoyumuxi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

变更内容

  • 为 Git 日志添加分支、作者、日期和路径筛选
  • 优化 Git 提交图的泳道呈现
  • 调整现有引用列表和详情面板的尺寸与布局
  • 为 Today、Last 7 Days 和 Last 30 Days 增加明日零点排他上界,避免未来日期提交误入筛选结果
  • 修正日期边界测试的时区依赖,并补充未来提交回归测试

验证

  • ./scripts/test-macos.sh(632 项测试)
  • ./scripts/verify-service-boundaries.sh
  • ./scripts/verify-git-graph.sh

@xiaoyumuxi
xiaoyumuxi requested a review from 1lck as a code owner August 27, 2026 01:19
@xiaoyumuxi

Copy link
Copy Markdown
Collaborator Author

@lithe review

@xiaoyumuxi xiaoyumuxi changed the title feat(git): refine status and log controls feat(git): 优化状态与日志控制 Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Lithe Review

结论: ⚠️ 建议修改
依据: 无关联 Issue · 61b99b1 ← 67193a2 · head: 67193a2

变更理解

本 PR 为 Git 日志新增分支、作者、日期和路径筛选控件,并调整提交图及面板布局。筛选沿用现有 applyGitLogFilter 调用链及 generation 过期结果保护。

发现

  1. [P2] “Today”日期预设没有排除未来日期的提交
    macos/Sources/Lithe/Views/Git/GitLogView.swift:1441

    .today 只生成当天零点的 after: 下界,而 GitLogQuery.matchesMetadata 仅检查 commitDate >= afterDate,没有次日零点的 before: 上界。因此,只要仓库中存在因系统时钟错误、时区差异或保留作者日期而落在明天及更晚时间的提交,选择 “Today” 仍会显示这些提交;“Last 7 Days”和“Last 30 Days”同样会包含未来提交。建议像 .yesterday 一样为这些日历区间生成排他的次日 before: 边界,并补充未来日期不匹配的测试。

验证

  • 检查了四个确定性变更文件,并沿 GitLogView → AppModel → GitFeatureModel.applyGitLogFilter → GitService/Rust Git history 调用链核对筛选、日期格式、路径加载、取消和过期结果处理;同时检查了 Git 图布局实现、相关测试 target 与 macOS CI 接入。
  • 已提供的 CI:Windows CI gate、Plugin CI gate、Database CI gate 和变更分类成功;Swift tests 与 Release package verification 仍在进行;其余列出的实现测试被跳过。
  • 本次审查未运行测试。

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator Author

@lithe review

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Lithe Review

结论: ❓ 审查未完成

审查状态:cancelled
请查看本次 Actions 日志与诊断附件后重新召唤。

@1lck

1lck commented Aug 27, 2026

Copy link
Copy Markdown
Owner

@lithe review

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Lithe Review

结论: ⚠️ 建议修改
依据: 无关联 Issue · 1668f65 ← 4f235cd · head: 4f235cd

变更理解

本 PR 为 Git 日志新增分支、作者、日期和路径筛选控件,并调整提交图与面板布局;筛选复用现有查询解析和异步 generation 过期结果保护。

发现

  1. [P2] 作者下拉选项没有按所选作者精确筛选
    macos/Sources/Lithe/Views/Git/GitLogView.swift:1393

    下拉框表示一个具体的作者,但这里将其转换成普通 author:<email> 查询;GitLogQuery.matchesMetadata 对该值使用 localizedCaseInsensitiveContains。因此仓库若同时包含 dev@example.comdev@example.com.invalid,选择前者仍会显示两者的提交;空邮箱回退到姓名时,AliceAlice Smith 也会误匹配。建议让下拉选择携带并精确比较作者身份,或增加专用于精确匹配的查询形式,同时保留手工输入 author: 的模糊搜索语义,并补充相似姓名/邮箱的回归测试。

验证

  • 检查了全部 5 个确定性变更文件,并沿 GitLogView → AppModel → GitFeatureModel.applyGitLogFilter → GitService/Rust Core history 核对筛选、日期格式、取消和过期结果处理;同时检查了 Git 图布局服务及相关测试范围。
  • 已提供的 CI:macOS、Windows、Plugin、Database gate、Swift tests 和 Release package verification 成功;其余列出的平台或数据库测试被跳过。
  • 本次审查未运行测试。

Comment thread macos/Sources/Lithe/Views/Git/GitLogView.swift Outdated
Comment thread macos/Sources/Lithe/Views/Git/GitLogView.swift Outdated
@1lck
1lck merged commit b732584 into preview Aug 27, 2026
14 checks passed
@xiaoyumuxi
xiaoyumuxi deleted the codex/split-git-status-controls branch August 30, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants