Repository navigation
feat(wsl-host): point the WSL chat refusal at adding the distro as a WSL host - #34804
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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'swslrefusal 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: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_HOSTSoff the WSL-hosts API isn't exposed and the old copy shows. User risk is wording only.Agent skill upstream boundary
Notes
Windows-only in practice: the
wslrefusal comes only from desktops that open WSL folders through the bridge.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)