fix(marketing): detect Mac chip on homepage download button#4197
fix(marketing): detect Mac chip on homepage download button#4197mahdibm-dev wants to merge 1 commit into
Conversation
The hero "Download for macOS" button hardcoded arch: "arm64", so Intel
Macs were handed an arm64 build that won't launch ("can't run on this
Mac"). Detect Apple Silicon vs Intel via the WebGL GPU renderer, since
navigator.userAgent reports "Intel" on both chip types.
Fixes pingdotgg#4196
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix that adds Mac chip detection for the homepage download button. The change is self-contained to the marketing page, has proper error handling, and carries minimal risk. You can customize Macroscope's approvability policy. Learn more. |
Problem
On an Intel Mac, the hero Download for macOS button on t3.codes serves the
arm64DMG, which won't launch — macOS reports "can't run on this Mac" (Intel Macs can't run arm64 binaries, and Rosetta only translates the other direction).In
apps/marketing/src/pages/index.astro,detectPlatform()hardcodedarch: "arm64"for all Macs, sopickAsset()always preferred-arm64.dmg.navigator.userAgentreports"Intel Mac OS X"on both Intel and Apple Silicon Macs, so the chip can't be told apart from the UA string alone.Closes #4196
Fix
Add
detectMacArch(), which probes the GPU via the WebGLWEBGL_debug_renderer_inforenderer string:"Apple"→arm64(Apple Silicon)intel/amd/radeon/nvidia/geforce→x64(Intel)arm64(matches prior behavior; most current Macs are Apple Silicon)detectPlatform()now calls it instead of hardcoding the arch. The/downloadpage already lists both builds explicitly, so it needed no change.UI note (per CONTRIBUTING.md)
This is a behavior-only change — the button's text and styling are unchanged, so before/after screenshots would be identical. Only the download URL it resolves to changes:
T3-Code-*-arm64.dmg(won't launch)T3-Code-*-x64.dmgT3-Code-*-arm64.dmgT3-Code-*-arm64.dmg(unchanged)Testing
pnpm --filter @t3tools/marketing typecheck(astro check) → 0 errors, 0 warnings, 0 hints.-x64.dmgasset; Apple Silicon still resolves to-arm64.dmg.🤖 Generated with Claude Code