fix: read/write global CLAUDE.md via WSL on Windows #264

Merged
naomi merged 1 commits from fix/global-claude-md-wsl into main 2026-04-13 15:56:53 -07:00
Owner

Summary

  • get_global_claude_md and save_global_claude_md were using dirs::home_dir() which resolves to the Windows home directory (C:\Users\accou) on Windows builds
  • The actual ~/.claude/CLAUDE.md lives in the WSL home directory, so the editor was always showing an empty text box and would have written to the wrong location on save
  • Added get_global_claude_md_via_wsl() and save_global_claude_md_via_wsl() helpers that shell out to WSL (matching the existing pattern used by list_skills and list_memory_files)
  • Both Tauri commands now branch on cfg!(target_os = "windows") to use the appropriate path

Test plan

  • Open Settings sidebar on a Windows build — Global Instructions textarea should load the contents of ~/.claude/CLAUDE.md from WSL
  • Edit the content and click Save — verify the WSL file is updated
  • Verify Linux/macOS builds are unaffected (native filesystem path unchanged)

This issue was created with help from Hikari~ 🌸

## Summary - `get_global_claude_md` and `save_global_claude_md` were using `dirs::home_dir()` which resolves to the Windows home directory (`C:\Users\accou`) on Windows builds - The actual `~/.claude/CLAUDE.md` lives in the WSL home directory, so the editor was always showing an empty text box and would have written to the wrong location on save - Added `get_global_claude_md_via_wsl()` and `save_global_claude_md_via_wsl()` helpers that shell out to WSL (matching the existing pattern used by `list_skills` and `list_memory_files`) - Both Tauri commands now branch on `cfg!(target_os = "windows")` to use the appropriate path ## Test plan - [ ] Open Settings sidebar on a Windows build — Global Instructions textarea should load the contents of `~/.claude/CLAUDE.md` from WSL - [ ] Edit the content and click Save — verify the WSL file is updated - [ ] Verify Linux/macOS builds are unaffected (native filesystem path unchanged) ✨ This issue was created with help from Hikari~ 🌸
hikari added 1 commit 2026-04-13 14:42:46 -07:00
fix: read/write global CLAUDE.md via WSL on Windows
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m3s
CI / Lint & Test (pull_request) Successful in 16m28s
CI / Build Linux (pull_request) Successful in 20m15s
CI / Build Windows (cross-compile) (pull_request) Successful in 30m25s
645f5037d3
dirs::home_dir() returns the Windows home (C:\Users\accou) on Windows
builds, but the global CLAUDE.md lives in the WSL home directory.
Route both get_global_claude_md and save_global_claude_md through WSL
on Windows, matching the pattern used by list_skills and list_memory_files.
naomi merged commit c4af551375 into main 2026-04-13 15:56:53 -07:00
naomi deleted branch fix/global-claude-md-wsl 2026-04-13 15:56:53 -07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#264