orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Windows onboarding saves WSL as the default shell, but Settings shows PowerShell

Open mistcoversmyeyes opened this issue 4 months ago • 1 comments

Summary

On Windows with WSL available, onboarding allows users to select WSL as the default shell and saves:

  • terminalWindowsShell: "wsl.exe"
  • terminalWindowsWslDistro: "<selected distro>"

Terminal Settings no longer offers WSL as a default-shell option. When terminalWindowsShell is stored as wsl.exe, Settings displays PowerShell instead.

This means a shell selection saved by onboarding cannot be accurately viewed or edited in Settings.

Steps to reproduce

  1. Start Orca with a fresh user profile on Windows with WSL installed.
  2. During onboarding, select WSL as the default shell.
  3. Select a WSL distribution and complete onboarding.
  4. Open Settings → Terminal → Default Shell.
  5. Observe that WSL is unavailable and PowerShell is shown as selected.

Expected behavior

The stored setting, the value displayed in Settings, and the shell used for new terminal panes should remain consistent.

This does not prescribe whether WSL should be restored as a terminal-shell option or whether onboarding should use the newer Project Runtime model.

Actual behavior

Onboarding saves WSL as the default shell, while Settings omits WSL and represents the stored setting as PowerShell.

Additional context

  • #5488 introduced the WSL onboarding option on 2026-06-16.
  • #5519 removed WSL from Terminal Settings on 2026-06-17 without updating onboarding.
  • The mismatch between the persisted configuration value and the Settings UI is confirmed from the current source.
  • The complete fresh-profile flow and resulting terminal runtime behavior were not manually reverified during this investigation.

mistcoversmyeyes avatar Jul 13 '26 09:07 mistcoversmyeyes

Agent reproduction package (Windows orchestration 2026-07-16)

Host context: Windows 11 / Orca 1.4.143.0 / repo path used: docs/bug-reproductions/
Labels applied: see issue labels (has_repro or cannot_repro).
Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.


Issue 8537 — Onboarding saves WSL as default shell, Settings shows PowerShell

Status: repro_confirmed
Host: Windows 11 10.0.26200, Orca 1.4.143, repo main
Label: has_repro

Summary

Onboarding still offers WSL as a Windows default shell and persists terminalWindowsShell: "wsl.exe" (+ optional distro). Terminal Settings omits WSL from the Default Shell control and coerces a stored wsl.exe value to PowerShell for display.

Source confirmation (definitive)

Onboarding still saves WSL

src/renderer/src/components/onboarding/WindowsTerminalStep.tsx:

  • showWslOption = capabilities.wslAvailable || windowsShell === 'wsl.exe'
  • Options include { value: 'wsl.exe', label: 'WSL' }
  • Updates terminalWindowsShell / terminalWindowsWslDistro on selection

Settings coerces WSL → PowerShell and has no WSL option

src/renderer/src/components/settings/TerminalPane.tsx:

const rawWindowsShell = settings.terminalWindowsShell ?? 'powershell.exe'
const windowsShell = rawWindowsShell === 'wsl.exe' ? 'powershell.exe' : rawWindowsShell

src/renderer/src/components/settings/TerminalWindowsShellSection.tsx options are only:

  • powershell.exe
  • cmd.exe
  • Git Bash (conditional)

No wsl.exe segment.

Runtime coerce probe

// evidence/8537-*.json coerceRuntime
{ raw: "wsl.exe", displayed: "powershell.exe", bug: true }

Host context

  • WSL available (wsl.exe --list succeeds)
  • Current profile shell: powershell.exe (not required to show coerce bug; code path is unconditional)

Repro (another agent)

# Static (always works)
Select-String -Path src/renderer/src/components/settings/TerminalPane.tsx -Pattern "wsl\.exe' \? 'powershell"
Select-String -Path src/renderer/src/components/onboarding/WindowsTerminalStep.tsx -Pattern "value: 'wsl\.exe'"
Select-String -Path src/renderer/src/components/settings/TerminalWindowsShellSection.tsx -Pattern "value: '(powershell|cmd|wsl)"

Optional live: set settings.terminalWindowsShell to wsl.exe (fresh profile / onboarding or temporary settings write), open Settings → Terminal → Default Shell, observe PowerShell selected and WSL absent.

Expected vs actual

Expected Stored shell, Settings display, and new-pane shell stay consistent
Actual Onboarding can store wsl.exe; Settings displays PowerShell and cannot show/edit WSL

Evidence

  • docs/bug-reproductions/evidence/8537-20260716-022018.json
  • Issue body references #5488 (add WSL onboarding) / #5519 (remove WSL from Settings)

Fix hint

Either restore WSL in Terminal Settings (and stop coercing), or remove WSL from onboarding and migrate stored wsl.exe to Project Runtime / host shell model with an explicit migration.


How another agent should use this

  1. Read this comment fully (status, expected vs actual, blockers).
  2. If a script is included above, copy it to a temp file and run it on a Windows 11 host with Orca installed (prefer production install under %LOCALAPPDATA%\Programs\orca).
  3. Capture evidence (CLI --json, screenshots, logs) under a local folder; optionally comment results back here.
  4. If status is cannot_repro / needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: remove cannot_repro, add has_repro when conclusive.

OrcaWin avatar Jul 17 '26 00:07 OrcaWin