Skip to content

fix(settings): stop mislabeling a WSL default shell as PowerShell - #9779

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/wsl-command-wrapping-consistency
Jul 21, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/wsl-command-wrapping-consistency

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Problem

On Windows, the Settings → Terminal → Default Shell toggle silently misrepresented a WSL default. If a user picked WSL during onboarding (terminalWindowsShell = 'wsl.exe'), the Settings page:

  1. Showed "PowerShell" selected — because it coerced wsl.exe → powershell.exe for display (TerminalPane.tsx:60), and
  2. Surfaced irrelevant PowerShell-version sub-settings ("PowerShell 7 vs Windows PowerShell"), since the coerced value made showWindowsPowerShellImplementation true.

So the setting the user actually chose was invisible here, and the page claimed a shell they weren't using.

Fix

  • TerminalPane.tsx — remove the wsl.exe → powershell.exe coercion. The page now passes the real shell through, which both fixes the mislabel and correctly hides the PowerShell-version options for WSL users.
  • TerminalWindowsShellSection.tsx — surface WSL as a disabled, already-selected segment when it's the active default (mirroring the existing Git Bash disabled pattern). The segmented control renders a disabled+active option with the selected styling, so the toggle now tells the truth. Users can still switch away to PowerShell/cmd.

Reuses the existing b637dd57a7: "WSL" i18n key (already translated in all 5 locales) — no new string.

Deliberately out of scope

WSL is not made selectable from this toggle. Choosing WSL requires a companion distro (terminalWindowsWslDistro) that only the onboarding step configures, and WSL was intentionally modeled as a per-project runtime + onboarding concept in #5519. Wiring a full WSL picker (with distro selection) into Settings needs a design pass to reconcile the global-default / project-runtime / onboarding surfaces — tracked separately, not patched here.

Verification

  • oxlint clean on both files
  • tsc --noEmit (web project) passes
  • verify:localization-catalog passes (key parity across en/es/ja/ko/zh)

The Terminal settings shell toggle coerced a stored `wsl.exe` default to
`powershell.exe` for display, so a WSL default (set in onboarding) showed
"PowerShell" selected and wrongly surfaced the PowerShell-version options.

Drop the coercion and surface WSL as a disabled, already-selected segment
when it's the active default, so the control reflects the real shell. WSL
stays non-selectable here because choosing it needs a companion distro that
only the onboarding step configures; wiring a full WSL picker into Settings
is left for a deliberate design pass against the per-project runtime model.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@OrcaWin, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0f388bee-980b-4bb0-b180-e4630c594d9b

📥 Commits

Reviewing files that changed from the base of the PR and between dc00761 and 78075f6.

📒 Files selected for processing (2)
  • src/renderer/src/components/settings/TerminalPane.pwsh.test.ts
  • src/renderer/src/components/settings/TerminalWindowsShellSection.tsx
📝 Walkthrough

Walkthrough

TerminalPane now preserves the configured Windows shell instead of converting wsl.exe to powershell.exe. TerminalWindowsShellSection detects wsl.exe and adds a disabled WSL option to the shell segmented control, reflecting the active shell without permitting selection.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, but it does not follow the required template or include screenshots, AI review, security audit, or notes. Rewrite it using the repo template: add Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes sections with the requested details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the key change: correcting WSL default shell labeling in settings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit d8378e8 into main Jul 21, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…ablyai#9779)

* fix(settings): stop mislabeling a WSL default shell as PowerShell

The Terminal settings shell toggle coerced a stored `wsl.exe` default to
`powershell.exe` for display, so a WSL default (set in onboarding) showed
"PowerShell" selected and wrongly surfaced the PowerShell-version options.

Drop the coercion and surface WSL as a disabled, already-selected segment
when it's the active default, so the control reflects the real shell. WSL
stays non-selectable here because choosing it needs a companion distro that
only the onboarding step configures; wiring a full WSL picker into Settings
is left for a deliberate design pass against the per-project runtime model.

* test(settings): cover persisted WSL shell display
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