feat: global default worktree root + grove config CLI#23
Merged
Conversation
Add an app-wide default for the worktree directory that applies to every repo unless a per-repo override is set. Config merge order is now builtin → app-global → per-repo. Also expose a `grove config` subcommand for viewing and editing both layers from the terminal (show/get/set/unset/path), so the same settings are reachable without opening the GUI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- store::trim_to_option for the trim → Option<String> pattern (used in the Tauri command and twice in the CLI) - print_global_layer helper to remove the duplicated `[global]` block in cmd_config_show - report_set helper to unify the global vs per-repo write paths in cmd_config_set and drop the unreachable match arms - cmd_hook_list / cmd_worktree_list now use the current_repo_root helper that was already introduced for the config commands - SettingsPage tracks the last-persisted global default in a ref, so blurring the field without a real change no longer triggers a full openRepo round-trip Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
grove configCLI 子命令(show/get/set/unset/path),可在终端直接读写这两层;--global操作全局层,缺省作用于 per-repo支持的 key:
worktree_root、default_base_branch(default_base_branch仅支持 per-repo)。CLI 示例
Test plan
cargo test(31/31 通过,含新增的合并层单测)cargo clippy --all-targets无 warningpnpm build+pnpm test --run通过set/get/unset全局往返、per-repo 往返、错误路径友好提示🤖 Generated with Claude Code