Skip to content

feat(desktop): add Windows build machines like Linux ones - #3662

Merged
janicduplessis merged 3 commits into
feat/3649-linux-pool-and-suggestionsfrom
feat/3659-windows-desktop-wizard
Oct 13, 2026
Merged

janicduplessis merged 3 commits into
feat/3649-linux-pool-and-suggestionsfrom
feat/3659-windows-desktop-wizard

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Depends on #3653 (stack: #3610 -> #3618 -> #3621 -> #3631 -> #3638 -> #3639 -> #3647 -> #3653 -> this).

Windows machines can now take offloaded Android builds (#3640) and run stim-server service and stim-server setup --build as a per-user scheduled task (#3658). Stim Desktop still left them out:

  • The Add Remote Machine wizard listed only macOS and Linux tailnet peers.
  • The build tips, the Machine page empty state and the build suggestions did not count Windows peers.
  • A Windows row still showed the Simulators enabled toggle.

Solution

A Windows peer (Tailscale OS: "windows") gets the same treatment as a Linux one. TailnetOS gains windows, and the Linux-only branches now key on "not macOS" (buildsAndroidOnly). Setup-related functions take the peer's TailnetOS instead of a Linux flag.

For a Windows peer, the wizard:

  • Pick: lists it as Windows · Android builds only. The empty tailnet state also links the Windows Tailscale download.
  • What it does: offers Builds only; Hosted simulators is disabled because it needs a Mac.
  • Set it up:
    • The command is PowerShell and runs npx.cmd. Plain npx resolves to npm's npx.ps1, which the default script execution policy on Windows desktops (Restricted) blocks.
    • A backtick continues each line and the package is quoted. Without the quotes, PowerShell reads the leading @ of @stim-cli/server@… as its splatting operator.
    • It has no sudo or linger.
    • The text says PowerShell. The footnote says no administrator rights are needed and gives the --path-prepend remedy for a version manager's node.exe shim, as feat: run stim-server service and setup on Windows #3658 documents.
    • The preview and mirror say "scheduled task running" and hide the Apple tool lines.
  • Tools: judges Android only.
  • Test build: builds Android.

Outside the wizard, the remote machine tip, the Machine page empty state, and the new-peer and build-slot suggestions count Windows peers. A Windows row hides the Simulators toggle. The hosted-simulators tip and the device-limit suggestion stay Mac-only.

The CLI rules from #3639 and #3653 already key on "not macOS" (doctor's device-host ask, cannotHost, the device pool and hosting candidates). This PR adds Windows cases to their tests.

The generated npx --package "@stim-cli/server@<version>" command works on Windows only once a published server release includes #3658, which lives on its own branch off #3631.

Test plan

Fixture renders, and a real windows-latest runner on the tailnet as stim-windows-wizard, prepared from #3658's branch through a throwaway branch's windows-debug.yml.

This MacBook's screen was locked, so I drove AddMachineModel with its production dependencies from an uncommitted XCTest harness: real tailscale status, the HTTPS journal probe, this branch's CLI, and a scratch STIM_HOME.

  • The pick list showed stim-windows-wizard (and another agent's stim-windows-paths) as Windows peers. Picking it set Builds only.
  • The generated command, run in PowerShell over SSH:
    • I replaced npx --package with feat: run stim-server service and setup on Windows #3658's built server and added --yes, because npm has no release with Windows setup. The backtick continuation parsed.
    • Setup reused the scheduled task I had installed from that build, reused the route, and approved the build request. The wizard read every journal step.
    • stim-server devices listed only the build request, so no device-host request was sent.
    • Separately, npx --yes --package "@stim-cli/server@1.20.2" stim-server --version printed 1.20.2 in PowerShell, so the quoted form parses. The runner's command used npx, not npx.cmd; the switch to npx.cmd came after the runner was stopped, and it rests on npm installing npx.cmd next to npx.ps1.
  • Tools showed only the Stim build and Android rows. Stim build blocked, because the runner ran feat: run stim-server service and setup on Windows #3658's build and this Mac ran this branch. That mismatch also rules out a real test build here: this stack has neither feat: let Windows machines take offloaded Android builds #3640's Windows worker nor feat: run stim-server service and setup on Windows #3658.
Pick (real) What it does (real)
Set it up (real) Tools (real)
Pick (fixture) What it does (fixture) Set it up (fixture)

The real "Set it up" capture predates the mirror's "waiting for approval in PowerShell" wording, which a unit test covers.

Unit tests cover:

  • the Windows command, preview and mirror lines, and capability forcing;
  • peers: Windows in, other systems out, macs unchanged;
  • the model's Android-only Tools and command for Linux and Windows;
  • the CLI's pool validation and hosting candidates for a windows peer.

Fixes #3659

@janicduplessis
janicduplessis added this pull request to stack #3619 October 13, 2026 08:42
@janicduplessis
janicduplessis force-pushed the feat/3659-windows-desktop-wizard branch from 0341430 to a47ec29 Compare October 13, 2026 08:51
@janicduplessis janicduplessis added the review: ai-approved A fresh AI review found nothing left to fix label Oct 13, 2026
@janicduplessis
janicduplessis marked this pull request as ready for review October 13, 2026 16:50
@janicduplessis
janicduplessis added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 13, 2026
@janicduplessis
janicduplessis force-pushed the feat/3659-windows-desktop-wizard branch from a47ec29 to 0d2268a Compare October 13, 2026 17:58
@janicduplessis janicduplessis added review: ai-approved A fresh AI review found nothing left to fix and removed review: ai-approved A fresh AI review found nothing left to fix labels Oct 13, 2026
@janicduplessis
janicduplessis added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 13, 2026
@janicduplessis
janicduplessis force-pushed the feat/3659-windows-desktop-wizard branch from 0d2268a to 5b22003 Compare October 13, 2026 19:11
@janicduplessis
janicduplessis force-pushed the feat/3659-windows-desktop-wizard branch from 5b22003 to 4c47583 Compare October 13, 2026 20:29
@janicduplessis
janicduplessis added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 0828475 Oct 13, 2026
20 checks passed
@janicduplessis
janicduplessis deleted the feat/3659-windows-desktop-wizard branch October 13, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: ai-approved A fresh AI review found nothing left to fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: add Windows build machines like Linux ones

1 participant