fix: discover Claude profile roots#126
Merged
Merged
Conversation
graykode
commented
May 24, 2026
Owner
Author
graykode
left a comment
There was a problem hiding this comment.
lgtm — security is clean (no new network/shell/deps, only adds read-only home-dir scanning). Discovery flow reuses the existing BTreeSet dedup + ConfigDir wrapping cleanly, and the #[cfg(test)] gating on the now-test-only constructors avoids dead-code noise. Build/clippy/143 tests all green, including the four new ones.
one minor inconsistency, not blocking: configured claude_config_dirs entries are dropped unless they pass is_claude_config_root (need both sessions/ and projects/), while env-based CLAUDE_CONFIG_DIR only checks is_dir(). A typo'd configured path is silently ignored with no warning — fine as a deliberate choice, just worth a note in the docs if users hit it.
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
claude_config_dirssupport for explicit Claude Code profile roots.~/.claudeand~/.claude-*roots that contain bothsessions/andprojects/.Fixes #123
Test Plan
cargo testcargo clippy -- -D warningscargo build