GeezerVison is showing github.com — fix(desktop): skip WSL distro probing while the WSL backend is off by hoop-ai · Pull Request #41351 · pingdotgg/t3code
Conversation
hoop-ai
commented
Nov 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
On Windows PCs without WSL installed, the desktop app opens a console window saying WSL must be updated and asking to press any key to install it. Windows ships a wsl.exe stub in System32 even when WSL is not installed. readWslState only checks that this file exists before running wsl.exe --list --verbose. So the stub runs every time the WSL state is read: opening Settings, the project picker or the command palette, and again on each refresh while they stay open. Each run can open the install prompt. Expected: no WSL process starts unless the user has turned on the WSL backend.
Fixes #27723
Change
apps/desktop/src/ipc/methods/wsl.ts: list distros only when WSL is available and settings.wslBackendEnabled is true. With the backend off, the state comes back with distros: []. available and the saved distro are still reported.
apps/desktop/src/ipc/methods/wsl.test.ts: a regression test. It reads the state with the backend off and fails if listDistros runs. Then it turns the backend on and checks that the distros are listed.
apps/web/src/components/settings/ConnectionsSettings.tsx: while the distro list is empty, the backend picker still shows the saved distro next to "Default distro". A saved distro selection stays visible and selectable before the backend is enabled.
This is the change from #22493 (first merged as #21225, then reverted in the bulk revert #22222), re-applied on current main. It keeps the merge fix from #22493 that trims the comment to one line. It also keeps main's <T> translation wrapper on "Default distro". The tests that #22557 deleted are not brought back. Authorship stays with @only21mil.
Scope
A bug fix. #22493 was closed as stale, and the maintainer note there says "If the change still matters, open a fresh PR from current main." This is that fresh PR. #27734 (the same fix) was closed as a duplicate of #22493.
Verification
Run on current main with this commit on top:
vp test run src/ipc/methods/wsl.test.ts (in apps/desktop): 3 passed (3).
- Same command with the gate reverted to
available ? yield* wslEnvironment.listDistros : []: 1 failed, 2 passed. × does not enumerate distros until the WSL backend is enabled, Unknown Error: must not enumerate distros. Passes again once the gate is restored.
vp test run --project unit src/components/settings/ConnectionsSettings.logic.test.ts (in apps/web): 30 passed (30).
vp run check:changed: format, lint, knip (2/2), typecheck (3 packages), test (3 files) and react compiler all pass.
Not checked: a run of the packaged desktop app on a Windows PC without WSL, and before/after screenshots of the Settings picker. The picker change only affects the backend-off state with a saved distro.
Model and harness: Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Windows ships a wsl.exe stub even when WSL is not installed. Reading the
desktop WSL state ran `wsl.exe --list --verbose` whenever the stub existed,
so opening Settings, the project picker or the command palette could open
the "WSL must be updated / Press any key to install" console on PCs without
WSL. Only enumerate distros once the WSL backend is enabled, and keep the
saved distro selectable in the Settings picker while the list is empty.
Originally pingdotgg#21225 (reverted in pingdotgg#22222), then pingdotgg#22493; re-applied on
current main.
Fixes pingdotgg#27723
Co-authored-by: maria-rcks <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
When the WSL backend is disabled, state reads no longer enumerate distros. When the distro list is empty, the Connections selector can show the configured distro alongside “Default distro.”
Changes: WSL state and distro selection
| Layer / File(s) |
Summary |
Gate distro enumeration on backend state apps/desktop/src/ipc/methods/wsl.ts, apps/desktop/src/ipc/methods/wsl.test.ts |
readWslState lists distros only when the local environment and WSL backend are enabled. Tests check that the disabled state returns no distros and that the enabled state returns the available list. |
Show the configured distro for an empty list apps/web/src/components/settings/ConnectionsSettings.tsx |
When no distros are listed, the selector shows “Default distro” and, if configured, the selected distro. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
Suggested labels: bugfix
Suggested reviewers: macroscopeapp, maria-rcks, juliusmarminge
Merge Risk: Minimal · up to e40db
-
With the WSL backend off, the desktop no longer enumerates distros, and the settings picker still shows the saved distro. The change is small and tested, and no merge-blocking risk was found. Packaged Windows behavior on a machine without WSL was not verified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the change: WSL distro probing is skipped while the WSL backend is off. It matches the diff, which gates listDistros on settings.wslBackendEnabled in wsl.ts, and uses a conventional co… |
| Linked Issues check |
 |
Issue #27723 asks that the desktop not run wsl.exe while the WSL backend is off. The reported case is the backend-off case, and the issue names restoring the wslBackendEnabled gate as the fix for it. … |
| Out of Scope Changes check |
 |
All three changed files connect to issue #27723. wsl.ts contains the gate. wsl.test.ts covers the gate. ConnectionsSettings.tsx keeps a saved distro visible in the backend picker when the distro list … |
| Description check |
 |
The description follows the repository template closely. It has a Problem section that explains the stub-triggered install prompt and expected behavior, a Change section that lists each modified file,… |
Full details: Title check
-
Explanation
The title names the change: WSL distro probing is skipped while the WSL backend is off. It matches the diff, which gates listDistros on settings.wslBackendEnabled in wsl.ts, and uses a conventional commit format with a clear scope. It is specific and concise.
Full details: Linked Issues check
-
Explanation
Issue #27723 asks that the desktop not run wsl.exe while the WSL backend is off. The reported case is the backend-off case, and the issue names restoring the wslBackendEnabled gate as the fix for it. At head, apps/desktop/src/ipc/methods/wsl.ts line 26 reads const distros = available && settings.wslBackendEnabled ? yield* wslEnvironment.listDistros : [];, so listDistros (which runs wsl.exe --list --verbose) does not run with the backend off. wsl.test.ts adds a regression test that fails if listDistros runs with the backend off and checks that distros are listed once the backend is on. The issue's broader expected behavior (never run wsl.exe on a host without WSL) and its suggested stronger detection (checking for a real WSL install such as Microsoft.WSL or the Lxss registry key) are not implemented. With the backend enabled on a host without WSL, wsl.exe still runs. The PR description states this scope. The issue presents detection as an optional stronger fix, so the remaining gap is noted but does not fail the backend-off requirement. Packaged-app behavior on a machine without WSL was not verified.
Full details: Out of Scope Changes check
-
Explanation
All three changed files connect to issue #27723. wsl.ts contains the gate. wsl.test.ts covers the gate. ConnectionsSettings.tsx keeps a saved distro visible in the backend picker when the distro list is empty. The gate makes the list empty while the backend is off, so without this change the saved selection would disappear from the picker. This follows directly from the gate and does not add unrelated behavior. The comment change and the retained <T> translation wrapper are minor and tied to the same code.
Full details: Description check
-
Explanation
The description follows the repository template closely. It has a Problem section that explains the stub-triggered install prompt and expected behavior, a Change section that lists each modified file, a Scope section that calls this a bug fix and links issue #27723, and a Verification section with the commands run, observed results, and a note on what was not checked. It also names the model and harness. Minor gaps: the Scope section does not state the prior revert history in template terms, and no UI before/after screenshots are included for the Settings picker change. The author states screenshots were not captured. The description is mostly complete, so the check passes.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 7180578 and e40db1b.
Files selected for processing: 3
-
apps/desktop/src/ipc/methods/wsl.test.ts
apps/desktop/src/ipc/methods/wsl.ts
apps/web/src/components/settings/ConnectionsSettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|