Skip to content

fix(wsl-host): say which WSL distro an agent isn't installed in - #35800

Merged
nwparker merged 3 commits into
mainfrom
nwparker/wsl-host-cli-missing-distro
Oct 29, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/wsl-host-cli-missing-distro

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​199 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​196
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​68 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60

ELI5

On a WSL host, when Claude, Codex or another agent isn't installed inside the distro, the chat used to say "Claude wasn't found on the computer running this chat." That's confusing on Windows, because the user may well have Claude installed on Windows. Now the chat says "Claude isn't installed in the WSL distro Ubuntu. Install it inside Ubuntu, or check its Command in Settings → Agents."

What Changed

This is renderer-only wording. Nothing new crosses the wire: the host still reports the existing cliMissing reason, and the desktop already knows the chat's target is a WSL host and which distro it is.

  • Shared copy: a new piece, cliMissingInWslDistro. cliMissingSentence uses it when the words context carries a new desktop-only wslDistro field, and still adds the "Run /x again." retry when a command failed.
  • The failed-start row (NativeChatNoticeRow): for a cliMissing row on a WSL host, it re-says the host's plain English sentence with the distro named. It does this only when the host's text is exactly that plain sentence, the same match the row already uses for sign-in wording. Host text that carries more, such as a command retry, is kept as is.
  • The composer notice before a send (useNativeChatAvailabilityNotice): names the distro the same way. The hook now derives the agent's label from agent itself, so the chat pane passes the distro without growing past its line limit. Its only caller passed the same label anyway.
  • The distro lookup: comes from the WSL host's environment record (wslHostDistroForTarget), carried on the chat's existing host view (NativeChatOrcaStopView.wslDistro).
  • Localized: en plus all other locales: de, es, fr, ja, ko, pt, ru, tr, zh and zh-Hant. The runtime English catalog is regenerated.
  • e2e: a second case in tests/e2e/wsl-host-chat.spec.ts. The host (the HUB) finds no claude on its PATH, and the chat must say "Claude isn't installed in the WSL distro Ubuntu." and never "the computer running this chat".

Why

The generic sentence points Windows users at the wrong machine. Naming the distro on the client avoids a new refusal reason, which older clients couldn't render, and an older host still gets the new words. The alternative was host-side copy, but the host can't know it is reached as a "WSL host".

Release note

On a WSL host, a chat whose agent isn't installed in the distro now names the distro and says to install it there.

Linked Issue

N/A (maintainer).

Visual Proof

The e2e run saves wsl-host-chat-cli-missing.png. I'll attach it in a comment once CI produces it.

Testing

  • New unit tests:

    • the shared sentence with and without a distro, including a command retry;
    • the row re-says only the plain sentence, keeps the host words off a WSL host, and keeps host words that say more;
    • the composer notice on and off a WSL host.
  • The e2e case is described above.

  • The load rule passes: pnpm tc, typecheck:ci, the e2e-typecheck ratchet, the five localization verifiers, base/native-plugin/type-aware/anti-slop oxlint, check:code-quality:changed, ratchets and the ast-grep gates. The touched suites pass, 336 tests.

  • One dependency: if the host misclassifies a missing CLI as a start failure (being fixed separately), the transcript row keeps the start-failure words. The composer notice still names the distro.

  • I manually tested these changes locally

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

Review

Flag-off: without ORCA_INTERNAL_WSL_HOSTS there are no WSL host environments, so wslDistro is always absent and every chat shows exactly the old sentence.

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

SSH and paired hosts, and this computer, are unchanged.

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)

@nwparker
nwparker force-pushed the nwparker/wsl-host-cli-missing-distro branch from e5c42cc to 592c773 Compare October 29, 2026 07:29
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 7 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: 4c6c1e51-6ca8-46ca-aa37-c4422a78934a
Commits

Reviewing files that changed from the base of the PR and between 592c773 and f4a566a.

Files selected for processing: 1
  • tests/e2e/wsl-host-chat.spec.ts
Walkthrough

Native chat now resolves the WSL distro for a chat target and passes it to availability notices. When a distro is available, missing-CLI notices identify it and provide distro-specific guidance. Without a distro, the existing generic wording remains. The change adds translations and unit and end-to-end tests for both cases.

Priority: Low

Merge Risk: Low · previous review 592c7

A rejected WSL send can still show generic computer wording. The change is mergeable with that limited gap acknowledged.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: WSL-hosted chats now identify the distro where an agent is missing.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, testing, compatibility, and scope. The linked issue exception is appropriately explained for a maintainer. Visual pro…
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.
Full details: Description check

Explanation

The description is detailed and covers the user impact, implementation, rationale, testing, compatibility, and scope. The linked issue exception is appropriately explained for a maintainer. Visual proof is not yet attached, and the manual-testing and command-checklist boxes remain incomplete, but the description is otherwise substantially complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 13 files. (12 skipped: 12 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new defect was established.

Summary

WSL chats name the distro when an agent is missing, while other hosts keep the existing wording.

  • WSL chat notices name the distro missing an agent CLI.

No actionable new issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "test(wsl-host): reach the missing-agent ..." · Reviewed by Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Pass the distro to delivery notices too. · NativeChatStructuredSession.tsx:139

src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx:139
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Pass the distro to delivery notices too.

If a WSL send has a visible cliMissing rejection without a matching start row, the availability hook suppresses its notice. The delivery notice is built with only agentName and renders directly under the user message, so it retains the generic computer wording. Pass the distro through the delivery-notice failure context. (raw.githubusercontent.com)


Review info
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: 06b1e1ce-2b9a-4510-aae1-4f35d51d7b01
Commits

Reviewing files that changed from the base of the PR and between e6980de and 592c773.

Files selected for processing: 25
  • src/renderer/src/components/native-chat/NativeChatInterruptedContinue.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.wsl-cli-missing.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/agent-session-availability-words-text.ts
  • src/renderer/src/components/native-chat/native-chat-orca-stop-context.ts
  • src/renderer/src/components/native-chat/use-native-chat-availability-notice.test.tsx
  • src/renderer/src/components/native-chat/use-native-chat-availability-notice.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-session-availability-sentences-wsl.test.ts
  • src/shared/agent-session-availability-sentences.ts
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts
  • tests/e2e/wsl-host-chat.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@nwparker
nwparker merged commit 789f53f into main Oct 29, 2026
58 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