Skip to content

fix(marketing): detect Mac chip on homepage download button#4197

Open
mahdibm-dev wants to merge 1 commit into
pingdotgg:mainfrom
mahdibm-dev:fix/homepage-mac-arch-detection
Open

fix(marketing): detect Mac chip on homepage download button#4197
mahdibm-dev wants to merge 1 commit into
pingdotgg:mainfrom
mahdibm-dev:fix/homepage-mac-arch-detection

Conversation

@mahdibm-dev

@mahdibm-dev mahdibm-dev commented Jul 20, 2026

Copy link
Copy Markdown

Problem

On an Intel Mac, the hero Download for macOS button on t3.codes serves the arm64 DMG, 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() hardcoded arch: "arm64" for all Macs, so pickAsset() always preferred -arm64.dmg. navigator.userAgent reports "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 WebGL WEBGL_debug_renderer_info renderer string:

  • renderer contains "Apple"arm64 (Apple Silicon)
  • renderer contains intel/amd/radeon/nvidia/geforcex64 (Intel)
  • inconclusive / WebGL unavailable → default to arm64 (matches prior behavior; most current Macs are Apple Silicon)

detectPlatform() now calls it instead of hardcoding the arch. The /download page 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:

Machine Before After
Intel Mac T3-Code-*-arm64.dmg (won't launch) T3-Code-*-x64.dmg
Apple Silicon T3-Code-*-arm64.dmg T3-Code-*-arm64.dmg (unchanged)

Testing

  • pnpm --filter @t3tools/marketing typecheck (astro check) → 0 errors, 0 warnings, 0 hints.
  • On an Intel Mac (MacBookPro16,1), the WebGL renderer resolves to an Intel GPU, so the button now points at the -x64.dmg asset; Apple Silicon still resolves to -arm64.dmg.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0a0339d1-1db2-478b-bda4-3346ffea8079

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:S 10-29 changed lines (additions + deletions). label Jul 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homepage "Download for macOS" button always serves arm64, breaking Intel Macs

1 participant