Skip to content

fix(tui): skip project-scope config merge when workspace is home directory#2055

Open
Lellansin wants to merge 1 commit into
Hmbown:mainfrom
Lellansin:fix/home-dir-project-scope-warning
Open

fix(tui): skip project-scope config merge when workspace is home directory#2055
Lellansin wants to merge 1 commit into
Hmbown:mainfrom
Lellansin:fix/home-dir-project-scope-warning

Conversation

@Lellansin
Copy link
Copy Markdown

Summary

  • skip project-scope config merge when the workspace root resolves to the user home directory
  • preserve the current CodeWhale project config lookup: prefer .codewhale/config.toml, then fall back to legacy .deepseek/config.toml
  • avoid redundant processing and the misleading project-scope deny-list warning when cwd == $HOME

Supersedes #1664, which GitHub cannot reopen after the branch was force-pushed/recreated.

Tests

  • cargo fmt --all -- --check
  • cargo test -p codewhale-tui project_overlay_skips_when_workspace_is_home_directory --locked

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread crates/tui/src/main.rs Outdated
Comment thread crates/tui/src/main.rs
…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.
@Lellansin Lellansin force-pushed the fix/home-dir-project-scope-warning branch from be0c999 to 3b1fc5c Compare May 25, 2026 03:43
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.

1 participant