fix(tui): skip project-scope config merge when workspace is home directory#2055
Open
Lellansin wants to merge 1 commit into
Open
fix(tui): skip project-scope config merge when workspace is home directory#2055Lellansin wants to merge 1 commit into
Lellansin wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a check in merge_project_config to skip merging the project-scope configuration when the workspace is the user's home directory, which prevents redundant processing and misleading warnings. Feedback indicates that the home directory resolution should be updated to use effective_home_dir() for consistency with the rest of the application. Additionally, the new unit test is currently non-deterministic as it relies on the actual user's home directory; it should be refactored to use a mocked environment and temporary directories for better isolation.
…ctory When the workspace is the user's home directory, the project-scope config file (~/.deepseek/config.toml) is also the global config file. Skip the merge to avoid redundant processing and a misleading "project-scope config key ignored" warning on every launch from ~. Fixes the home-directory false-positive in the Hmbown#417 deny-list check: the deny-list correctly refuses dangerous keys at project scope, but when cwd == $HOME the project file *is* the global file so the warning is noise.
be0c999 to
3b1fc5c
Compare
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
.codewhale/config.toml, then fall back to legacy.deepseek/config.tomlcwd == $HOMESupersedes #1664, which GitHub cannot reopen after the branch was force-pushed/recreated.
Tests
cargo fmt --all -- --checkcargo test -p codewhale-tui project_overlay_skips_when_workspace_is_home_directory --locked