Skip to content

feat: unify Windows and Linux Coder Desktop in a single repo - #173

Closed
ibetitsmike wants to merge 3 commits into
mainfrom
mike/unify-linux-windows
Closed

ibetitsmike wants to merge 3 commits into
mainfrom
mike/unify-linux-windows

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Merges the coder-desktop-linux Avalonia port back into this repo so one codebase builds and ships Coder Desktop for both Windows and Linux, sharing the VPN service, RPC protocol, and SDKs.

What changed

  • Imported from coder-desktop-linux: App.Avalonia (Avalonia UI), App.Shared (UI-agnostic ViewModels/services), App.Linux (Linux service impls), Vpn.Linux (Unix socket RPC transports), Packaging.Linux (deb/rpm/tar/AUR scripts), scripts/run-linux-dev.sh, and the release-linux.yaml workflow.
  • Adopted platform-aware versions of shared sources (Vpn.Service/*, MutagenSdk/MutagenClient.cs, Vpn.DebugClient): runtime OS checks plus WINDOWS conditional compilation preserve existing Windows behavior. Only 27 existing files are touched, each with a focused diff.
  • Multi-targeted Vpn, Vpn.Service, Tests.Vpn, Tests.Vpn.Service as net8.0;net8.0-windows. ManagerRpc now uses an IRpcServerTransport abstraction: named pipes (extracted to NamedPipeServerTransport) on Windows, Unix domain sockets on Linux.
  • Added Coder.Desktop.Linux.slnf (excludes WinUI App, Tests.App, Installer), Directory.Build.props (EnableWindowsTargeting on non-Windows hosts only), and NuGet lock files for the new projects.
  • CI: Windows fmt/test/build jobs preserved (fmt passes the solution explicitly since the repo now has both a .sln and a .slnf); added test-linux and build-linux jobs.
  • Removed end_of_line = crlf from .editorconfig: the repo is stored with LF line endings and newer dotnet format versions treat the rule as a hard error, which would have forced a whole-repo whitespace rewrite. Existing file bytes are untouched.
  • Deflaked SpeakerTest.SendMessageWriteError (shutdown race, ~50% failure rate on Linux).
  • The WinUI App and Avalonia App.Avalonia/App.Shared remain separate; converging the Windows app onto App.Shared is follow-up work.

Validation

  • All 5 CI checks green: fmt, test-windows, build-windows, test-linux, build-linux.
  • Linux (local + fresh dev.coder.com aws-linux workspace): locked-mode restore of Coder.Desktop.Linux.slnf, Release build, all test projects green, format verification clean.
  • Linux end-to-end smoke on the workspace: ran CoderVpnService under sudo, drove it via Vpn.DebugClient over the Unix socket. VPN started against https://dev.coder.com, downloaded the tunnel binary, and streamed live workspace/agent peer updates with successful P2P handshakes.
  • Windows (dev.coder.com aws-windows-desktop workspace): full-solution restore, dotnet test -p:Platform=x64 on the shared test projects, Release publish of Vpn.Service (net8.0-windows). The WinUI App publish failures there reproduce identically on unmodified main (environment/SDK drift); CI is authoritative and passes.

This PR was prepared by Mux (AI agent) on behalf of Mike.

Loading
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