Skip to content

feat: desktop v2 everything WSL - #23407

Merged
Hona merged 16 commits into
anomalyco:devfrom
Hona:desktop-wsl-onboarding
Jun 6, 2026
Merged

feat: desktop v2 everything WSL#23407
Hona merged 16 commits into
anomalyco:devfrom
Hona:desktop-wsl-onboarding

Conversation

@Hona

@HonaHona commented Apr 19, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@HonaHona changed the title wip wsl onboarding stufffeat: desktop WSL onboarding + happy experienceMay 4, 2026
@Hona
Hona marked this pull request as ready for review May 4, 2026 21:10
@Hona
Hona requested a review from adamdotdevin as a code ownerMay 4, 2026 21:10
CopilotAI review requested due to automatic review settings May 4, 2026 21:10
@HonaHona added the beta label May 4, 2026

CopilotAI 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.

Pull request overview

This PR adds Electron-side WSL server onboarding and multi-distro support, replacing the old single on/off WSL toggle with discoverable WSL sidecars that can be added and selected like other servers. It also updates the app UI so WSL-backed sessions use WSL-aware path handling and server management flows.

Changes:

  • Replaces boolean WSL enablement with a new Electron WSL servers API, controller, IPC surface, and WSL process helpers.
  • Adds app-side WSL state/context plus new server-selection/onboarding UI for adding, updating, retrying, and displaying WSL servers.
  • Adjusts routing, picker behavior, and a few supporting utilities/refactors to fit WSL-backed local workflows.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 9 comments.

Show a summary per file
FileDescription
packages/desktop/src/index.tsxRemoves legacy Tauri-side WSL picker/config behavior.
packages/desktop-electron/src/renderer/index.tsxWires Electron renderer platform to active WSL server state and WSL server list.
packages/desktop-electron/src/renderer/env.d.tsAdds activeServer to renderer window globals.
packages/desktop-electron/src/preload/types.tsDefines WSL server/runtime/state IPC types and expands wslPath.
packages/desktop-electron/src/preload/index.tsExposes WSL server IPC methods in preload.
packages/desktop-electron/src/main/wsl.tsAdds WSL command helpers, probing, install, upgrade, and terminal utilities.
packages/desktop-electron/src/main/wsl-servers.tsImplements WSL server controller/state management and persistence.
packages/desktop-electron/src/main/server.tsAdds WSL sidecar spawn logic and shared port allocation.
packages/desktop-electron/src/main/ipc.tsRegisters WSL server IPC handlers and routes relaunch through injected deps.
packages/desktop-electron/src/main/index.tsBoots/stops WSL servers from Electron main process and hooks new IPC deps.
packages/desktop-electron/src/main/constants.tsReplaces old WSL enabled store key with WSL servers store key.
packages/desktop-electron/src/main/apps.tsMakes WSL path conversion distro-aware and handles WSL UNC paths.
packages/app/src/utils/solid-dnd.tsxSimplifies drag constraint transformer registration.
packages/app/src/pages/layout.tsxUses web picker for WSL sidecars and passes home-navigation callback to server dialog.
packages/app/src/pages/home.tsxMirrors WSL-aware picker/server-dialog behavior on home page.
packages/app/src/index.tsRe-exports WSL context/types from app package surface.
packages/app/src/context/wsl-servers.tsxAdds query-backed WSL servers context/provider.
packages/app/src/context/server.tsxTracks active server globally and treats sidecars as local servers.
packages/app/src/context/platform.tsxExtends platform contract with WSL server management types/API.
packages/app/src/context/global-sync/child-store.tsExtracts reusable child disposal helper and disposeAll.
packages/app/src/context/global-sync.tsxUses new disposeAll cleanup path.
packages/app/src/components/status-popover.tsxPasses close handler into popover body.
packages/app/src/components/status-popover-body.tsxUpdates server switching flow to close popover and coordinate route changes.
packages/app/src/components/server/server-row.tsxDisplays WSL badge and supports explicit version override.
packages/app/src/components/dialog-wsl-server.tsxAdds multi-step WSL onboarding/install/update wizard UI.
packages/app/src/components/dialog-select-server.tsxIntegrates WSL server add/manage/update/remove flows into server selection dialog.
packages/app/src/app.tsxMounts WSL servers provider and adjusts keyed app/router rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +503 to +506
const handleAddedWsl = async (distro: string) => {
const key = ServerConnection.Key.make(`wsl:${distro}`)
setStore("addWsl", "showWizard", false)
const conn = items().find((item) => ServerConnection.key(item) === key)
</Show>

<Show when={i.type === "http"}>
<Show when={i.type === "http" || i.type === "sidecar"}>
Comment threadpackages/app/src/wsl/dialog-add-server.tsx
Comment threadpackages/app/src/wsl/dialog-add-server.tsx Outdated
Comment threadpackages/desktop/src/main/wsl/runtime.ts Outdated
Comment threadpackages/desktop/src/main/wsl/servers.ts
Comment on lines +347 to +350
for (const item of wslServers.data?.servers ?? []) {
const runtime = item.runtime
if (runtime.kind !== "ready") continue
list.push({
Comment on lines +389 to +401
const navigateHome = () => props.onNavigateHome?.()

const apply = () => {
dialog.close()
if (persist && conn.type === "http") {
server.add(conn)
navigateHome()
return
}

batch(() => {
navigateHome()
server.setActive(nextKey)
Comment threadpackages/desktop/src/main/apps.ts Outdated

CopilotAI 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.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/app/src/context/server.tsx Outdated
Comment threadpackages/desktop/src/main/apps.ts Outdated
Comment threadpackages/desktop/src/main/wsl/runtime.ts Outdated
Comment threadpackages/app/src/wsl/dialog-add-server.tsx
Comment threadpackages/app/src/wsl/dialog-add-server.tsx Outdated
Comment on lines +252 to +257
aria-disabled={blocked()}
onClick={() => {
if (blocked()) return
props.close?.()
navigate("/")
queueMicrotask(() => server.setActive(key))
const activate = () => {
Comment threadpackages/app/src/components/dialog-select-server.tsx Outdated
Comment on lines 728 to 739
@@ -579,35 +737,54 @@ export function DialogSelectServer() {
/>
<DropdownMenu.Portal>
<DropdownMenu.Content class="mt-1">
@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

3 similar comments
@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

3 similar comments
@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch

Please resolve this issue to include this PR in the next beta release.

Comment threadpackages/app/src/context/server.tsx Outdated
Comment threadpackages/desktop/src/main/wsl.ts Outdated
Comment threadpackages/app/src/wsl/dialog-add-server.tsx Outdated
Comment threadpackages/app/src/wsl/dialog-add-server.tsx
Comment threadpackages/app/src/wsl/context.tsx
Comment threadpackages/desktop/src/main/wsl/servers.ts
Comment threadpackages/app/src/context/server.tsx Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Hona@neriousy@kommander