You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(wsl): say WSL hosts are paused in serve-only (kill switch 3) - #34868
Based on main at 0cca424b515 (after #34683 and #34694 merged).
ELI5
In serve-only (the internal WSL hosts switch is off, but this profile already has WSL hosts or moved projects), the previous PRs keep saved hosts working and quietly remove Add WSL distro and the Move entries. This PR tells the user why: their saved hosts and projects keep working, and adding hosts and moving projects is paused.
What Changed
Settings → WSL hosts: in serve-only, the section's description line reads "WSL hosts are paused in this build. Your saved hosts and their projects keep working; adding hosts and moving projects onto them is paused." It uses the same line the section already uses for "turned off" and "server files missing", and those keep precedence. The host rows are unchanged: status, Connect and Remove.
Add a project → Add remote host: where "Add WSL distro" would be, a muted line says "Adding WSL distros is paused in this build." It's a new optional prop on AddRepoHostSelector, wslHostsPausedNote, passed only by AddRepoHostSelectorSlot.
State:
Store:wslHostsNewWorkPaused is true only once main's capability answers acceptsNewWork: false. It starts false, so neither an open gate nor a closed one ever shows it.
Hook:useWslHostsPaused() also requires the WSL API to be exposed.
Labels and strings: two labels in wsl-host-row-status.ts. Their English strings were added to en.json with sync:localization-catalog.
Not on terminals or the file explorer.selectWslHostUnavailableReason drives a blocking notice there that takes over the pane. Paused hosts work, so adding "paused" as an unavailable reason would hide working terminals. The notice stays where users look for the missing Add and Move entries.
Flag-off: with the gate open or closed, wslHostsNewWorkPaused stays false and nothing renders.
Why
Without it, a user in serve-only sees Add WSL distro and Move silently disappear. The copy follows the existing description slot and the muted secondary-text pattern in the same menu (docs/STYLEGUIDE.md). It adds no new primitive or color.
Linked Issue
N/A (WSL hosts kill switch, PR3 of the design).
Visual Proof
Taken by the hidden e2e serve-only case through CDP (ORCA_BACKGROUND_LAUNCH=1): wsl-hosts-serve-only-settings.png (Settings with the paused line, and the saved Ubuntu host Connected) and wsl-hosts-paused-add-host-menu.png (the add-host menu with the paused line instead of Add WSL distro). The gh image upload failed here because there's no browser session token, so the images are in the e2e test results and will be attached by hand.
Testing
use-wsl-hosts-enabled.test.tsx:
no paused notice before main answers or with the gate open;
shown once main answers serve-only;
never shown where the WSL API isn't exposed (closed).
AddRepoHostSelector.test.tsx: the paused line renders only when given, in place of Add WSL distro.
e2e wsl-host-fake-transport.spec.ts:
the serve-only case asserts both lines and takes both screenshots, and now closes the add-project dialog before the Settings screenshot;
the closed case asserts no paused text.
Both pass locally, hidden.
pnpm tc, typecheck:ci, oxlint, the anti-slop lint, ast-grep-gates.mjs, check:code-quality:changed, check:process-host-imports and the localization checks (catalog, extraction, runtime catalog) pass. The 7 affected suites pass (45 tests).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Risk: low.
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
Renderer-only. There's no wire, SSH or mobile impact. Not here: the remote policy fetcher (PR4/5 of the design), which needs owner sign-off.
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)
Review was skipped as selected files did not have any reviewable changes.
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: 797bba38-dc9b-4a23-b5c6-98aeb4f35028
Commits
Reviewing files that changed from the base of the PR and between 3f4f244 and b723640.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
Walkthrough
The WSL hosts slice now tracks whether new work is paused. A hook exposes that state when WSL-host APIs are available. Settings and the add-host menu display translated paused-status messages. Tests cover the hook state and verify the notices in component and end-to-end scenarios.
Priority: Low
Merge Risk: Low · previous review 3f4f2
Users may receive misleading WSL availability guidance in these configurations; the localized gating fix is small and should be applied.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
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 checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly identifies the main change: showing that WSL hosts are paused in serve-only mode.
Description check
The description follows the required structure and explains the user-facing behavior, implementation, rationale, testing, scope, and compatibility impact. It notes that the linked issue is N/A, visual…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description follows the required structure and explains the user-facing behavior, implementation, rationale, testing, scope, and compatibility impact. It notes that the linked issue is N/A, visual attachments still need manual upload, and the full lint, typecheck, test, and build checklist remains unchecked, but the description is otherwise complete and focused.
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 4 functions across 10 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 2
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks: 💡
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Supported by static analysis
Script executed:
sed -n '1,90p' src/renderer/src/components/sidebar/AddRepoHostSelectorSlot.tsx
sed -n '170,225p' src/renderer/src/components/sidebar/AddRepoHostSelector.tsx
rg -n "serverFiles|experimentalWslHosts|WslHostsPaused|paused.*WSL|Add WSL distro|Turn on in Experimental" src/renderer/src/components/sidebar src/renderer/src/components/settings src/renderer/src/components/sidebar/*.test.tsx tests/e2e/wsl-host-fake-transport.spec.ts
Repository: stablyai/orca
Length of output: 14974
Script executed:
set -o pipefail
printf'%s\n''--- use-wsl-hosts-enabled.ts ---'
nl -ba src/renderer/src/components/sidebar/use-wsl-hosts-enabled.ts | sed -n '1,80p'printf'%s\n''--- use-wsl-hosts-enabled.test.tsx ---'
nl -ba src/renderer/src/components/sidebar/use-wsl-hosts-enabled.test.tsx | sed -n '1,110p'printf'%s\n''--- AddRepoHostSelector.test.tsx relevant block ---'
nl -ba src/renderer/src/components/sidebar/AddRepoHostSelector.test.tsx | sed -n '130,255p'printf'%s\n''--- WSL host file hook and selector-related consumers ---'
rg -n -F -- 'useWslHostServerFilesMissing' src/renderer/src/components/sidebar src/renderer/src/components/settings
printf'%s\n''--- e2e state cases ---'
nl -ba tests/e2e/wsl-host-fake-transport.spec.ts | sed -n '480,710p'
Repository: stablyai/orca
Length of output: 21591
Gate the paused note by the active WSL state.
useWslHostsPaused() does not check whether the experiment is enabled or whether server files exist. When the API is exposed, the add-host menu can therefore show “Adding WSL distros is paused” while WSL hosts are turned off, or while the build cannot support WSL hosts. This replaces the existing disabled or unavailable behavior.
Settings → WSL hosts explains that saved hosts and their projects keep working
while adding hosts and moving projects is paused, and the add-host menu says
where Add WSL distro went. Shown only after main answers serve-only, so open
and closed gates never show it.
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
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
In serve-only (the internal WSL hosts switch is off, but this profile already has WSL hosts or moved projects), the previous PRs keep saved hosts working and quietly remove Add WSL distro and the Move entries. This PR tells the user why: their saved hosts and projects keep working, and adding hosts and moving projects is paused.
What Changed
AddRepoHostSelector,wslHostsPausedNote, passed only byAddRepoHostSelectorSlot.wslHostsNewWorkPausedis true only once main's capability answersacceptsNewWork: false. It starts false, so neither an open gate nor a closed one ever shows it.useWslHostsPaused()also requires the WSL API to be exposed.wsl-host-row-status.ts. Their English strings were added toen.jsonwithsync:localization-catalog.Not on terminals or the file explorer.
selectWslHostUnavailableReasondrives a blocking notice there that takes over the pane. Paused hosts work, so adding "paused" as an unavailable reason would hide working terminals. The notice stays where users look for the missing Add and Move entries.Flag-off: with the gate open or closed,
wslHostsNewWorkPausedstays false and nothing renders.Why
Without it, a user in serve-only sees Add WSL distro and Move silently disappear. The copy follows the existing description slot and the muted secondary-text pattern in the same menu (
docs/STYLEGUIDE.md). It adds no new primitive or color.Linked Issue
N/A (WSL hosts kill switch, PR3 of the design).
Visual Proof
Taken by the hidden e2e serve-only case through CDP (
ORCA_BACKGROUND_LAUNCH=1):wsl-hosts-serve-only-settings.png(Settings with the paused line, and the saved Ubuntu host Connected) andwsl-hosts-paused-add-host-menu.png(the add-host menu with the paused line instead of Add WSL distro). Thegh imageupload failed here because there's no browser session token, so the images are in the e2e test results and will be attached by hand.Testing
use-wsl-hosts-enabled.test.tsx:AddRepoHostSelector.test.tsx: the paused line renders only when given, in place of Add WSL distro.e2e
wsl-host-fake-transport.spec.ts:pnpm tc,typecheck:ci, oxlint, the anti-slop lint,ast-grep-gates.mjs,check:code-quality:changed,check:process-host-importsand the localization checks (catalog, extraction, runtime catalog) pass. The 7 affected suites pass (45 tests).I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Risk: low.
Agent skill upstream boundary
Notes
Renderer-only. There's no wire, SSH or mobile impact. Not here: the remote policy fetcher (PR4/5 of the design), which needs owner sign-off.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)