Summary
On grida.co/downloads, the primary hero button ("Download for macOS", also triggered by the D shortcut) serves an arm64 DMG to all Mac users — including Intel Macs, where an arm64 binary cannot launch (Rosetta 2 translates x64→arm64, not the reverse). Intel users must instead scroll to the secondary list and click the explicit "Download for macOS (Intel-based Macs)" button.
Surfaced by a Codex review on #953 (the PR that restored x64 builds). Restoring x64 (#947) fixed the availability but not the primary download path for the exact users it set out to unblock.
Root cause
The default is chosen server-side by pickDefault() in downloads.ts, which hard-codes mac → mac_dmg_arm64. It can't do better: the macOS user-agent cannot distinguish Intel from Apple Silicon — Apple reports Intel Mac OS X in the UA on both architectures. So no server-side default is universally correct:
- default arm64 (current) → wrong for Intel (won't launch),
- default x64 → wrong for the Apple Silicon majority (runs, but under Rosetta — slower, non-native).
Proposed fix (client-side arch detection)
PrimaryDownloadButton in download-button.tsx is already a client component with an effect. Detect Apple Silicon on the client and pick the arch accordingly:
- Read the WebGL unmasked renderer string (
WEBGL_debug_renderer_info → UNMASKED_RENDERER_WEBGL). Apple Silicon reports Apple GPU / Apple M…; Intel Macs report Intel … / AMD …. (Works on Safari, which navigator.userAgentData does not.)
- Thread
mac_dmg_x64 into the component as a prop; when os === "mac" and the GPU is not Apple, swap the hero href to the x64 DMG.
- Fallback: if WebGL is blocked / renderer unavailable, keep the arm64 default (safe — matches today's behavior).
Alternative (the "real" fix)
A universal binary (single fat DMG native on both arches) removes the choice entirely. It was explicitly scoped out of #947 (Option C) for the extra moving parts (ASAR merge, signing/notarizing a universal bundle, GRIDA-SEC-004 sidecar + unpacked native-dep validation). If we adopt universal later, this issue and the per-arch download buttons collapse into one.
Acceptance
References
Summary
On
grida.co/downloads, the primary hero button ("Download for macOS", also triggered by theDshortcut) serves an arm64 DMG to all Mac users — including Intel Macs, where an arm64 binary cannot launch (Rosetta 2 translates x64→arm64, not the reverse). Intel users must instead scroll to the secondary list and click the explicit "Download for macOS (Intel-based Macs)" button.Surfaced by a Codex review on #953 (the PR that restored x64 builds). Restoring x64 (#947) fixed the availability but not the primary download path for the exact users it set out to unblock.
Root cause
The default is chosen server-side by
pickDefault()indownloads.ts, which hard-codesmac→mac_dmg_arm64. It can't do better: the macOS user-agent cannot distinguish Intel from Apple Silicon — Apple reportsIntel Mac OS Xin the UA on both architectures. So no server-side default is universally correct:Proposed fix (client-side arch detection)
PrimaryDownloadButtonindownload-button.tsxis already a client component with an effect. Detect Apple Silicon on the client and pick the arch accordingly:WEBGL_debug_renderer_info→UNMASKED_RENDERER_WEBGL). Apple Silicon reportsApple GPU/Apple M…; Intel Macs reportIntel …/AMD …. (Works on Safari, whichnavigator.userAgentDatadoes not.)mac_dmg_x64into the component as a prop; whenos === "mac"and the GPU is not Apple, swap the hero href to the x64 DMG.Alternative (the "real" fix)
A universal binary (single fat DMG native on both arches) removes the choice entirely. It was explicitly scoped out of #947 (Option C) for the extra moving parts (ASAR merge, signing/notarizing a universal bundle, GRIDA-SEC-004 sidecar + unpacked native-dep validation). If we adopt universal later, this issue and the per-arch download buttons collapse into one.
Acceptance
Dshortcut download the x64 DMG.Dshortcut download the arm64 DMG.References
editor/app/(www)/(downloads)/downloads/downloads.ts(pickDefault),editor/app/(www)/(downloads)/downloads/download-button.tsx(PrimaryDownloadButton).