GeezerVison is showing github.com — fix(desktop): skip WSL distro probing while the WSL backend is off by only21mil · Pull Request #21225 · pingdotgg/t3code
Conversation
only21mil
commented
Oct 18, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
Opening Settings or the command palette could enumerate WSL distros while the backend was off. On Windows 11 without WSL installed, that runs the system wsl.exe stub and can trigger its install prompt.
Only enumerate when WSL is available and enabled. Keep availability unchanged so users can enable it. While enumeration is off, the Connections picker offers the saved distro alongside Default distro. Re-enabling the saved choice preserves it; explicitly choosing Default still clears the saved name. Enabling then loads installed distros normally.
Based on @only21mil’s focused fix in #21225, with the saved-distro reset tradeoff corrected. Fixes #21038; thanks @rabranruken for reporting and tracing the cause.
Verification on headless Linux:
- 8 IPC tests + 20 existing Connections logic tests: 28 → 28 passed. The single PR regression now includes saved Debian with Ubuntu as default. Main production fails that regression because disabled reads evaluate enumeration.
- Desktop and web scoped typechecks, focused lint and formatting passed. IPC tests use an Electron import-path override without launching Electron.
- The actual Connections page, picker, and confirmation dialog were driven through T3’s Browser panel with a controlled desktop bridge. Disabled + saved Debian + empty list offers Debian; selecting it and Run both backends preserves the saved name without calling setWslDistro. Explicit Default calls setWslDistro(null) and selects Ubuntu after enablement.
- Independent whole-diff reviews: Opus and Sol returned no required code changes in one round. An uninstalled saved distro uses existing preflight recovery.
Before — current main picker with the same saved Debian / empty-list snapshot:

After — saved Debian can be selected without enumeration:

Recording: select saved Debian and enable both backends. Both use the same controlled snapshot and viewport. The browser fixture uses a temporary font override because this host does not render its default system fonts correctly.
Native Windows was not available: install-prompt suppression, real distro enumeration/startup, and WSL-only relaunch were not exercised. macOS, iOS, Android, and the Electron desktop process were not run. Browser proof covers the UI flow; mocked IPC regression proves the enumeration gate. Neither substitutes for Windows runtime validation. A saved distro may have been uninstalled while WSL was off; enabling it then uses existing preflight error recovery.
Implementation: GPT-6.1 Sol via Codex; tests: GPT-6 Astra via Codex; adversarial review: Claude Opus 5.5 via Claude Code and GPT-6 Sol via Codex, orchestrated in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at f1059b5
Macroscope's review found this PR approvable — This is a narrowly scoped WSL bug fix that prevents unnecessary wsl.exe distro probing while the backend is disabled, without changing availability detection or the existing product default. A regression test verifies that probing resumes when the backend is enabled.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 11 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d926a394-0f1d-4ff2-b8e2-d6bc828cbb57
📥 Commits
-
Reviewing files that changed from the base of the PR and between f1059b5 and d4cdad3.
📒 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
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b1bcda22-d911-4e0a-aeb5-9dfa68cfe494
📥 Commits
-
Reviewing files that changed from the base of the PR and between 9c16146 and f1059b5.
📒 Files selected for processing: 2
-
apps/desktop/src/ipc/methods/wsl.test.ts
apps/desktop/src/ipc/methods/wsl.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
-
readWslState now skips distro enumeration when the WSL backend is disabled. A test verifies the empty distro list in that state and the configured list after enabling the backend.
Changes: WSL state
| Layer / File(s) |
Summary |
Gate distro enumeration apps/desktop/src/ipc/methods/wsl.ts, apps/desktop/src/ipc/methods/wsl.test.ts |
readWslState calls listDistros only when the local environment is available and the WSL backend is enabled. The test checks that enumeration is skipped while disabled and returns the configured distros when enabled. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: jgratton24
Merge Risk: ⚪ Minimal · up to f1059
-
With the WSL backend off, the app skips distro enumeration without starting wsl.exe; enabling the backend allows the distro list to populate. No actionable merge risk remains.
### Architecture Summary
Architecture risk: 🔵 Low · up to f1059
The change affects 1 system.
Changed systems: apps/desktop
Architecture concerns
No architecture-level concerns identified.
Review details
-
Systems and components
- observed — apps/desktop (service) was modified; 2 changed files map to changed impact.
Before / after behavior
- observed — Modified behavior in apps/desktop/src/ipc/methods/wsl.test.ts: Adds a test that makes distro enumeration fail if attempted while the backend is disabled, verifies WSL remains available with no listed distros, then enables the backend and checks that the configured distro list is returned.
- observed — Modified behavior in apps/desktop/src/ipc/methods/wsl.ts:
readWslState now calls listDistros only when available and settings.wslBackendEnabled are both true; otherwise, it returns an empty distro list. Previously, an available local environment triggered enumeration even when the WSL backend was disabled. The comments now describe the Windows 11 wsl.exe stub and its install prompt.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
Issue #21038 requires the desktop to avoid starting WSL when the backend is off, while keeping the local environment available. readWslState now calls listDistros only when available and `settin… |
| Out of Scope Changes check |
 |
The pull request changes only the WSL state gate and its regression test. The implementation change directly addresses issue #21038. The test supports the required behavior and does not add unrelated … |
| Title check |
 |
The title clearly and concisely describes the primary change: preventing WSL distro probing when the WSL backend is disabled. |
| Description check |
 |
The description provides a clear problem statement, explains the implementation and scope, links the related issue and prior fix, reports detailed verification results, includes UI evidence, and docum… |
Full details: Linked Issues check
-
Explanation
Issue #21038 requires the desktop to avoid starting WSL when the backend is off, while keeping the local environment available. readWslState now calls listDistros only when available and settings.wslBackendEnabled are true. The test verifies that an available WSL environment returns no distros and makes no enumeration call while the backend is off, then returns the configured distros after enabling the backend. The change keeps available unchanged, so Settings can still enable WSL.
Full details: Out of Scope Changes check
-
Explanation
The pull request changes only the WSL state gate and its regression test. The implementation change directly addresses issue #21038. The test supports the required behavior and does not add unrelated scope.
Full details: Description check
-
Explanation
The description provides a clear problem statement, explains the implementation and scope, links the related issue and prior fix, reports detailed verification results, includes UI evidence, and documents untested Windows scenarios and agent usage. Although it does not use the template's exact section headings, the required information is present and complete.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Taking over this one as maintainer for batch desktop-app-02. I will keep it on the original PR, preserve the disabled-backend probe gate, and correct re-enablement so a saved non-default distro is retained. Thanks @only21mil for the focused diagnosis and regression test.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Reverting this in #22222 together with the other desktop fixes the takeover campaign merged yesterday. Nothing was wrong with the review of this change; it was merged on CI and code audits only, and after #20907 from the same batch broke existing installs the maintainer decided that desktop changes do not ship without being run on a real desktop build. To bring it back: open a fresh PR from the original commit, run it on a real build that already has user state on each platform it touches, and put the before/after proof in the body.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
|