Skip to content

Add WSL2 Claude Code detection and sync support#149

Open
tylergraydev wants to merge 1 commit intomainfrom
feat/wsl2-support
Open

Add WSL2 Claude Code detection and sync support#149
tylergraydev wants to merge 1 commit intomainfrom
feat/wsl2-support

Conversation

@tylergraydev
Copy link
Owner

Summary

  • Detects Claude Code installations inside WSL2 distros from the Windows host via wsl.exe
  • Each WSL distro appears as a separate toggleable editor (e.g., "Claude Code (WSL: Ubuntu)") in the settings UI
  • MCP config sync writes ~/.claude.json inside WSL distros through wsl.exe commands
  • Users with both native Windows and WSL Claude Code can independently enable/disable sync to each
  • All WSL code is #[cfg(target_os = "windows")] gated — no-ops on other platforms
  • Fixes 12 preexisting TypeScript errors across analytics, sessions, skills, and test files

New files

  • src-tauri/src/utils/wsl.rs — WSL2 detection, distro listing, file I/O through wsl.exe, UTF-16LE decoding
  • src-tauri/src/services/wsl_config.rs — Config writer for WSL distros (same claude.json format)

Modified files

  • Backend: settings.rs, config.rs, models.rs, lib.rs, mod.rs files — WSL editor detection, sync, and command registration
  • Frontend: SettingsEditorSyncTab.svelte — WSL editors get amber "W" badge with proper display names
  • Type fixes: skill.ts, usageStore.svelte.ts, invokeMock.ts, skillLibrary.test.ts, sessions/+page.svelte

Test plan

  • All 859 Rust tests pass
  • svelte-check reports 0 errors (down from 12)
  • Manual test on Windows with WSL2 installed — verify distros appear in editor list
  • Manual test toggling WSL editor and syncing MCPs
  • Verify no impact on macOS/Linux builds (WSL code is cfg-gated)

… errors

Adds support for detecting and managing Claude Code installations inside
WSL2 distros from the Windows host. Each WSL distro appears as a
separate toggleable editor in the settings UI, enabling independent
MCP config sync to both native Windows and WSL Claude Code.

Also fixes 12 preexisting TypeScript errors across analytics, sessions,
skills, and test files.
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