The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Web: a Download for Windows button on every visit (#3428)
lingrd787ed35456eb
diff --git a/website/src/app/desktop/DesktopDownload.spec.tsx b/website/src/app/desktop/DesktopDownload.spec.tsxindex 54f816c3c..988c68793 100644--- a/website/src/app/desktop/DesktopDownload.spec.tsx+++ b/website/src/app/desktop/DesktopDownload.spec.tsx@@ -26,11 +26,19 @@ describe("the /desktop download offer", () => {expect(document.body).not.toHaveTextContent("no Windows version");});- it("lists Windows among the other downloads on a Mac", () => {+ it("gives a Mac visitor a Windows download button too, not only a link", () => {platform = "macos-arm64";render(<DesktopDownload />);- expect(screen.getByRole("link", { name: "Windows" })).toHaveAttribute("href", "/desktop/download/windows");+ expect(screen.getByRole("link", { name: "Download for Windows" })).toHaveAttribute("href", "/desktop/download/windows");+ expect(screen.getByRole("link", { name: "Download for macOS (Apple silicon)" })).toBeInTheDocument();+ });++ it("keeps the Windows button when the platform is unknown, so a shared link never dead-ends", () => {+ platform = null;+ render(<DesktopDownload />);++ expect(screen.getByRole("link", { name: "Download for Windows" })).toHaveAttribute("href", "/desktop/download/windows");});it("names Windows among the computers a phone visitor can open the page on", () => {diff --git a/website/src/app/desktop/DesktopDownload.tsx b/website/src/app/desktop/DesktopDownload.tsxindex 5a863f3c0..309e69b46 100644--- a/website/src/app/desktop/DesktopDownload.tsx+++ b/website/src/app/desktop/DesktopDownload.tsx@@ -35,8 +35,10 @@ const WINDOWS_NOTE ="Requires Windows 10 or 11.";const MAC_OFFER: Offer = {- primary: [DESKTOP_BUILD.macos],- others: othersThan([DESKTOP_BUILD.macos]),+ // Windows is a button on every page, not a link buried under "Other downloads": a person sharing the+ // download with someone on a PC should not have to know the link exists.+ primary: [DESKTOP_BUILD.macos, DESKTOP_BUILD.windows],+ others: othersThan([DESKTOP_BUILD.macos, DESKTOP_BUILD.windows]),othersLabel: "Other downloads:",description: MAC_DESCRIPTION,note: `One download for Apple silicon and Intel Macs. ${MAC_TRUST}`,@@ -46,9 +48,9 @@ function offerFor(platform: VisitorPlatform | null): Offer {switch (platform) {case "macos-arm64":return {- primary: [DESKTOP_BUILD["macos-arm64"]],+ primary: [DESKTOP_BUILD["macos-arm64"], DESKTOP_BUILD.windows],// The universal build is still the Intel one, whatever else it runs on.- others: [{ ...DESKTOP_BUILD.macos, name: "macOS (Intel)" }, ...othersThan([DESKTOP_BUILD.macos])],+ others: [{ ...DESKTOP_BUILD.macos, name: "macOS (Intel)" }, ...othersThan([DESKTOP_BUILD.macos, DESKTOP_BUILD.windows])],othersLabel: "Other downloads:",description: MAC_DESCRIPTION,note: `Built for Apple silicon Macs. ${MAC_TRUST}`,@@ -56,14 +58,14 @@ function offerFor(platform: VisitorPlatform | null): Offer {case "linux-x64":case "linux-arm64":return {- primary: [DESKTOP_BUILD[platform]],- others: othersThan([DESKTOP_BUILD[platform]]),+ primary: [DESKTOP_BUILD[platform], DESKTOP_BUILD.windows],+ others: othersThan([DESKTOP_BUILD[platform], DESKTOP_BUILD.windows]),othersLabel: "Other downloads:",description: LINUX_DESCRIPTION,note: LINUX_NOTE,};case "linux": {- const primary = [DESKTOP_BUILD["linux-x64"], DESKTOP_BUILD["linux-arm64"]];+ const primary = [DESKTOP_BUILD["linux-x64"], DESKTOP_BUILD["linux-arm64"], DESKTOP_BUILD.windows];return {primary,others: othersThan(primary),