Skip to content

fix: discover WSL profiles on Windows - #11

Merged
brettheap merged 6 commits into
mainfrom
fix/windows-wsl-profile-discovery
Jul 26, 2026
Merged

fix: discover WSL profiles on Windows#11
brettheap merged 6 commits into
mainfrom
fix/windows-wsl-profile-discovery

Conversation

@brettheap

@brettheap brettheap commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • enumerate registered WSL distributions with wsl.exe --list --quiet instead of attempting to enumerate the unsupported bare WSL UNC server root
  • discover both Codex and Claude profile stores through distro-specific UNC paths
  • decode UTF-16LE and UTF-8 WSL output safely and suppress console-window creation
  • release the correction as openProfiler 0.1.1

Root cause

Windows can access \\wsl.localhost\Ubuntu-24.04\home\brett\..., but cannot enumerate bare \\wsl.localhost or \\wsl$. The previous fallback therefore found no distro and silently used absent Windows-local profile stores.

Validation

  • confirmed the native Windows UNC paths contain 54 Codex and 96 Claude profile directories
  • pnpm format:check
  • pnpm test
  • pnpm build
  • cargo fmt --all --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings

Summary by Sourcery

Improve Windows WSL-based profile discovery and bump openProfiler to version 0.1.1.

New Features:

  • Support WSL-backed discovery of Claude profile stores on Windows alongside Codex.

Bug Fixes:

  • Fix Windows profile discovery to enumerate registered WSL distributions instead of relying on unsupported bare WSL UNC roots.
  • Handle WSL command output decoding robustly for both UTF-16LE and UTF-8 to avoid misparsed distribution names.

Enhancements:

  • Unify WSL profile discovery logic across providers using provider-specific defaults and manifest paths.

Build:

  • Bump crate, application, and npm package versions from 0.1.0 to 0.1.1 to release the WSL discovery correction.

Documentation:

  • Update README to document the revised WSL discovery behaviour and new release version example.

Copilot AI review requested due to automatic review settings July 26, 2026 03:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes Windows WSL-backed profile discovery by enumerating installed WSL distributions via wsl.exe and using distro-specific UNC paths, while also bumping release versions to 0.1.1.

Changes:

  • Replace Windows WSL discovery from UNC root enumeration to wsl.exe --list --quiet + distro-specific UNC probing.
  • Extend WSL default discovery to cover both Codex and Claude stores, including safer output decoding and hidden-console execution.
  • Bump app/crate/npm versions from 0.1.0 to 0.1.1 and update README release example.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src-tauri/tauri.conf.json Bumps Tauri app version to 0.1.1.
src-tauri/Cargo.toml Bumps Tauri crate version to 0.1.1.
README.md Updates Windows WSL discovery documentation and release tag example.
package.json Bumps npm package version to 0.1.1.
crates/open-profiler-core/src/lib.rs Implements new Windows WSL distro enumeration + provider-specific default discovery; adds decoding/parsing helpers and tests.
crates/open-profiler-core/Cargo.toml Bumps core crate version to 0.1.1.
Cargo.lock Updates locked versions for 0.1.1 release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/open-profiler-core/src/lib.rs
Copilot AI review requested due to automatic review settings July 26, 2026 03:47
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Comment thread README.md Outdated
Copilot AI review requested due to automatic review settings July 26, 2026 03:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Comment thread crates/open-profiler-core/src/lib.rs
Comment thread crates/open-profiler-core/src/lib.rs
Copilot AI review requested due to automatic review settings July 26, 2026 03:57
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Comment thread crates/open-profiler-core/src/lib.rs
Copilot AI review requested due to automatic review settings July 26, 2026 04:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

crates/open-profiler-core/src/lib.rs:263

  • wsl_distribution_names() can be called more than once during startup (e.g., when both Codex and Claude defaults are absent), which spawns wsl.exe multiple times. Also, hardcoding %SystemRoot%\System32\wsl.exe can fail in 32-bit builds on 64-bit Windows due to file-system redirection (the 32-bit view may not contain wsl.exe). Consider caching the discovered distro list and probing Sysnative as a fallback when System32 doesn't contain the executable.
    let Some(system_root) = env::var_os("SystemRoot") else {
        return Vec::new();
    };
    let wsl_executable = PathBuf::from(system_root).join("System32").join("wsl.exe");
    let mut command = std::process::Command::new(wsl_executable);

Copilot AI review requested due to automatic review settings July 26, 2026 04:03
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

@brettheap
brettheap merged commit f501f47 into main Jul 26, 2026
9 checks passed
@brettheap
brettheap deleted the fix/windows-wsl-profile-discovery branch July 26, 2026 04:07
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.

2 participants