fix(shell): add ~/.local/bin to the Windows CLI resolver so native-installed providers are found
What Changed
Added %USERPROFILE%\.local\bin to the known-Windows-CLI-directory list in both the shared resolveKnownWindowsCliDirs (packages/shared/src/shell.ts) and its desktop twin knownWindowsCliDirs (apps/desktop/src/shell/DesktopShellEnvironment.ts). Updated both existing byte-for-byte tests.
Why
Closes #4846.
On Windows the process can start with a stale PATH that predates the installer writing to the User Path, so both resolvers merge a fixed list of known CLI install dirs into PATH. That list included Bun and Scoop but not %USERPROFILE%\.local\bin — the directory the Claude native installer uses on Windows. So claude.exe at %USERPROFILE%\.local\bin\claude.exe was never discovered even though it was installed (same PATH-resolution family as #4697).
The two copies are kept in sync (server-side resolver + desktop shell environment). Reverting either source file fails its updated test; both pass with the change.
Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] No UI changes
[!NOTE] Low Risk Small, additive PATH entry in two mirrored helpers with test-only verification; no auth or data handling changes.
Overview On Windows, when the process starts with a stale
PATH, the app merges a fixed list of known CLI install directories so tools like npm, Bun, and Scoop still resolve. That list did not include%USERPROFILE%\.local\bin, where the Claude native installer (and similar tools) place binaries on Windows—soclaude.execould be installed but never found.This PR adds
%USERPROFILE%\.local\binto that list in both places it is defined: sharedresolveKnownWindowsCliDirsand desktopknownWindowsCliDirs, placed before.bun\binandscoop\shims. Tests that assert the full mergedPATHwere updated accordingly.Reviewed by Cursor Bugbot for commit 57add958be818a889f9b92ae6674c009b13bbaa7. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Add
~/.local/binto Windows CLI resolver so natively-installed providers are foundAdds
%USERPROFILE%\.local\binto the known Windows CLI directories in bothshell.tsandDesktopShellEnvironment.ts. The path is inserted before.bun\binandscoop\shimsin the priority order, and is only included whenUSERPROFILEis set.Macroscope summarized 57add95.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
7a76db77-92a1-415e-8ba1-7b770f0b2acaYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Approved 57add95
This PR adds ~/.local/bin to the Windows CLI path resolver search list. It's a simple additive change to an existing path array with corresponding test updates — no logic or behavioral changes beyond expanding the search scope.
You can customize Macroscope's approvability policy. Learn more.