Skip to content

fix(web): ask Safari users for Mac type#2090

Merged
baxen merged 2 commits into
mainfrom
mini/safari-invite-download
Jul 19, 2026
Merged

fix(web): ask Safari users for Mac type#2090
baxen merged 2 commits into
mainfrom
mini/safari-invite-download

Conversation

@baxen

@baxen baxen commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Why

Safari does not expose whether a Mac is Apple Silicon or Intel, so invite landing pages silently selected the Intel DMG.

What

  • ask unknown-architecture Mac users to choose a newer or older Mac
  • resolve the selected architecture to the matching release asset
  • keep automatic downloads for platforms whose architecture is known
  • open selected Mac downloads in a new tab, close the chooser immediately, and guard duplicate choices
  • preserve the invite page when release lookup falls back to GitHub Releases
  • cover the Safari chooser, selected-download fallback, Escape/focus behavior, and unsupported-device fallback in Playwright

Validation

  • pnpm typecheck
  • pnpm check
  • pnpm exec playwright test --project=smoke --grep 'invite asks Safari users|invite download falls back|invite requires age'\n\nPre-push also passed repository Rust tests; the unrelated desktop Tauri suite had 3 existing Codex adapter discovery failures under the hook environment.\n\nGenerated with mini

npub1qvn3cujt28pg06ehlstrxyz6ayzp06t4uc7r566vxwwgrv24hglq9zju0n and others added 2 commits July 18, 2026 15:25
Co-authored-by: npub1qvn3cujt28pg06ehlstrxyz6ayzp06t4uc7r566vxwwgrv24hglq9zju0n <03271c724b51c287eb37fc1633105ae90417e975e63c3a6b4c339c81b155ba3e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1qvn3cujt28pg06ehlstrxyz6ayzp06t4uc7r566vxwwgrv24hglq9zju0n <03271c724b51c287eb37fc1633105ae90417e975e63c3a6b4c339c81b155ba3e@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1rf6fvdj6ut0c4kcmjv4p5mmgh89nj58n69uu3fz3cvk3jn500hqs7emz79 <1a7496365ae2df8adb1b932a1a6f68b9cb3950f3d179c8a451c32d194e8f7dc1@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1rf6fvdj6ut0c4kcmjv4p5mmgh89nj58n69uu3fz3cvk3jn500hqs7emz79 <1a7496365ae2df8adb1b932a1a6f68b9cb3950f3d179c8a451c32d194e8f7dc1@sprout-oss.stage.blox.sqprod.co>
@baxen
baxen marked this pull request as ready for review July 18, 2026 23:28
@baxen
baxen requested a review from a team as a code owner July 18, 2026 23:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 591ffcf903

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

setShowMacChoice(false);
try {
const url = await resolveBuzzDownloadUrlForPlatform(platform);
downloadWindow?.location.replace(url);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back when the chooser popup is blocked

In browsers or managed environments that block window.open, selecting either Mac option still calls event.preventDefault() and then this optional call becomes a no-op because downloadWindow is null; the dialog closes but no download or releases page opens. Since the anchors already have href={BUZZ_RELEASES_URL}, fall back to same-tab navigation (or avoid preventing default) when the popup can't be created.

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks sound, and current-head CI is green. Before approval, please rebase onto current main and let CI rerun: this head is 8 commits behind (main at c81806d; merge base 5a656c9), so the existing checks do not validate the merged result.

@baxen
baxen merged commit 820d023 into main Jul 19, 2026
31 checks passed
@baxen
baxen deleted the mini/safari-invite-download branch July 19, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants