Skip to content

feat(wsl-host): point the WSL chat refusal at adding the distro as a WSL host - #34804

Merged
nwparker merged 1 commit into
mainfrom
nwparker/wsl-bridge-chat-copy
Oct 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/wsl-bridge-chat-copy

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13

ELI5

Sometimes a WSL folder is opened the old way, from Windows. Starting a chat there is refused with "Chat is not available in WSL. Open the agent in a terminal instead." But once WSL hosts are turned on, there is a real way to chat in that distro: add it as a WSL host. Now the message says so.

What Changed

structuredChatUnavailableText (src/renderer/src/lib/structured-agent-session-launch-failure.ts) handles the host's wsl refusal reason. When this desktop can add WSL hosts, meaning the internal gate exposes the WSL-hosts API and the Experimental switch is on, the refusal now reads:

"Chat is not available in a WSL folder opened from Windows. Add the distro as a WSL host (Add a project → Add remote host → Add WSL distro) to chat there, or open the agent in a terminal."

Otherwise the message is unchanged. That covers the flag off, or the gate open with the switch off, where the Add WSL distro button isn't shown. The SSH and generic refusals are unchanged. I added one new en.json key, explicitChatWslAddHost, so the existing key keeps its translations.

Why

The old copy sent users to the terminal even after Orca gained a way to chat in their distro. The pointer only shows when following it is actually possible. I used text rather than a button, because this string is also the description of the launch-refusal toast, which has no action slot. The menu path named in the text matches the real labels in the add-host flow, as exercised in wsl-host-fake-transport.spec.ts.

Linked Issue

N/A (maintainer).

Visual Proof

N/A: it's a copy-only change to an existing refusal string, and the unit test pins both variants.

Testing

  • New structured-agent-session-launch-failure-wsl.test.ts:

    • with the gate open and the setting on, the new pointer is shown;
    • with the gate closed, or with the gate open but the setting off, the old copy is unchanged;
    • SSH is unchanged.
  • The rest of the load rule passes: pnpm tc, typecheck:ci, base, native-plugin, type-aware and anti-slop oxlint, check:code-quality:changed, ratchets, the ast-grep gates, and the localization catalog checks.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Flag-off: there's no change, because with ORCA_INTERNAL_WSL_HOSTS off the WSL-hosts API isn't exposed and the old copy shows. User risk is wording only.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Windows-only in practice: the wsl refusal comes only from desktops that open WSL folders through the bridge.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b263f19e-19ca-40d3-b9a0-d130c5570e4f
Commits

Reviewing files that changed from the base of the PR and between 9588b53 and 4f2f0df.

Files selected for processing: 3
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/structured-agent-session-launch-failure-wsl.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-failure.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@nwparker
nwparker merged commit 5237d52 into main Oct 28, 2026
42 checks passed
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