Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(marketing): Safari gets the arm64 Mac download (#7473)

Theo Browne5ea5a80a83c2
diff --git a/apps/marketing/src/lib/macArch.test.ts b/apps/marketing/src/lib/macArch.test.ts
index 24a03f2cf..f15c3c588 100644
--- a/apps/marketing/src/lib/macArch.test.ts
+++ b/apps/marketing/src/lib/macArch.test.ts
@@ -13,8 +13,11 @@ describe("macArchFromGpuRenderer", () => {
);
});
- it("uses x64 for ambiguous Safari and unavailable renderer values", () => {
- expect(macArchFromGpuRenderer("Apple GPU")).toBe("x64");
+ it("detects Safari's generic Apple Silicon renderer", () => {
+ expect(macArchFromGpuRenderer("Apple GPU")).toBe("arm64");
+ });
+
+ it("uses x64 when the renderer is unavailable", () => {
expect(macArchFromGpuRenderer("")).toBe("x64");
});
});
diff --git a/apps/marketing/src/lib/macArch.ts b/apps/marketing/src/lib/macArch.ts
index 8399c4adb..8b41ad141 100644
--- a/apps/marketing/src/lib/macArch.ts
+++ b/apps/marketing/src/lib/macArch.ts
@@ -1,5 +1,5 @@
const INTEL_GPU_PATTERN = /intel|amd|radeon|nvidia|geforce/i;
-const APPLE_SILICON_GPU_PATTERN = /\bapple\s+m\d/i;
+const APPLE_SILICON_GPU_PATTERN = /\bapple\s+(?:m\d|gpu)\b/i;
export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" {
if (INTEL_GPU_PATTERN.test(renderer)) {
@@ -9,8 +9,6 @@ export function macArchFromGpuRenderer(renderer: string): "arm64" | "x64" {
return "arm64";
}
- // Generic "Apple GPU" renderers are ambiguous on Safari. x64 is the safe
- // fallback because Apple Silicon can run it through Rosetta, while Intel
- // Macs cannot run an arm64 build.
+ // Keep the fallback compatible with Intel Macs when WebGL is unavailable.
return "x64";
}