Skip to content

fix(git): complete Git Log reference actions on Windows and macOS - #298

Merged
1lck merged 19 commits into
1lck:previewfrom
puppyben1:codex/fix-issue-293-windows
Aug 30, 2026
Merged

fix(git): complete Git Log reference actions on Windows and macOS#298
1lck merged 19 commits into
1lck:previewfrom
puppyben1:codex/fix-issue-293-windows

Conversation

@puppyben1

@puppyben1 puppyben1 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the application context menu for Windows Git Log references
  • expose the same applicable local, remote, and tag actions in the macOS Git Log context menu
  • preserve complete Git reference identity through React/Swift, Tauri/Rust adapters, and shared Rust Core
  • add shared checkout-and-rebase semantics with a clean-working-tree guard
  • add explicit remote pull by rebase or merge without reconstructing refs as local branches
  • add reference-to-working-tree comparison on Windows and current-branch comparison on both platforms
  • block self checkout, merge, and rebase actions while keeping tag menus limited to supported operations
  • add Windows English/Chinese strings, confirmations, progress disabling, notifications, refresh, and conflict reporting

Addresses all implementation items in #293.

Validation

  • Rust Core comment verification passed
  • Rust Core: 267 unit tests and 5 integration tests passed
  • Windows Tauri Rust: 97 tests passed
  • Windows frontend typecheck passed
  • Windows frontend: 451 tests passed
  • Windows Release build completed successfully
  • test stability static gate passed
  • git diff --check passed

Environment limitation

The current host is Windows and has no Swift or zsh toolchain, so scripts/test-macos.sh, the macOS timing harness, and Swift compilation could not be run locally. A deterministic macOS GitFeatureModel test was added for full remote reference identity and both pull strategies; macOS CI should execute it.

@puppyben1
puppyben1 requested a review from 1lck as a code owner August 28, 2026 06:45
@puppyben1 puppyben1 changed the title fix(windows): add Git Log reference actions fix(git): complete Git Log reference actions on Windows and macOS Aug 28, 2026

@1lck 1lck left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体方向是对的,分层和完整 ref 传递也比较清楚。不过下面几个边界场景会直接影响功能正确性,建议合并前修掉。测试也建议从“只看参数”补到真实本地 remote 和实际菜单行为,这样后面排错会轻松很多。

Comment thread rust/lithe-core/src/git/mod.rs Outdated
Comment thread windows/tauri/src/features/git/api/git-diff-api.ts
Comment thread windows/tauri/src/features/git/api/git-diff-api.ts Outdated
Comment thread windows/tauri/src/features/git/api/git-integration-api.ts
Comment thread macos/Sources/LitheGitModule/Application/GitFeatureModel.swift
Comment thread rust/lithe-core/src/git/mod.rs Outdated
/// Checks out a local or remote branch, then rebases it onto the branch that
/// was current before the switch. A dirty tree is rejected before checkout so
/// the composite operation cannot leave the repository half-switched.
fn checkout_and_rebase(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段流程继续放进 3400+ 行的 git/mod.rs,后面会越来越难维护,也不符合仓库的 facade 约定。建议移到 git/mutations.rs(或现有 owning module),这里保留 dispatch 就够了。

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这条目前还没有完全解决:remote_branch_components 已经移到了 git/mutations.rs,但新增的 checkout_and_rebase 复合 mutation 流程仍然放在 git/mod.rs。请把这部分流程也移到 git/mutations.rs(或对应的 owning module),让 git/mod.rs 只保留 dispatch/facade;完成后再标记此讨论为 resolved。

Comment thread rust/lithe-core/src/tests/git.rs
@1lck
1lck merged commit bdb9e10 into 1lck:preview Aug 30, 2026
12 checks passed
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