Skip to content

fix(marketing): route mobile download buttons to their app stores - #18816

Closed
saphid wants to merge 5 commits into
pingdotgg:mainfrom
saphid:t3code/sweep/marketing-mobile-downloads
Closed

saphid wants to merge 5 commits into
pingdotgg:mainfrom
saphid:t3code/sweep/marketing-mobile-downloads

Conversation

@saphid

@saphid saphid commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The marketing homepage treats mobile user agents as desktop systems, offering an AppImage to Android visitors and a DMG to iPhone or iPad visitors.

Change

Detect Android and iOS before desktop platforms and send both homepage download buttons to the existing app-store URLs. Recognize iPad desktop mode using its Mac user agent and touch points. Preserve desktop download behavior.

Scope and approval

This is a maintainer-requested takeover of the existing focused marketing download bug fix. Based on the original work by @saphid.

Verification

Five platform-routing regressions pass, reduced from nine overlapping cases. Marketing typecheck, scoped lint, and format checks pass.

In desktop Chromium with a mobile viewport, a temporary proxy supplied navigator user-agent and touch-point values before the unmodified page scripts. Both hero and footer buttons selected the correct stores for Android, iPhone, and desktop-mode iPad, without fetching GitHub releases. The iOS Apple icon and command-key hint were browser-verified. macOS arm64 DMG, Linux AppImage, and Windows x64 EXE selection remained intact.

This did not test real Safari or native mobile browsers. Store URLs were inspected without opening stores or downloading files. The existing human product-eligibility review remains a landing gate.

iPhone user agent — before / after

Before: macOS download After: iOS store link
Before: iPhone user agent receives Download for macOS After: iPhone user agent receives Download for iOS

Android user agent — before / after

Before: Linux download After: Android store link
Before: Android user agent receives Download for Linux After: Android user agent receives Download for Android

Taken over with Claude Opus 5.5 (tests and review), Claude Fable 5.1 (implementation), and GPT-6.1 Sol (review) through T3 Code; coordinated with Codex.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 12, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The marketing homepage now defaults Android and iOS visitors to external app stores instead of the GitHub release flow, while desktop routing remains unchanged. This product-facing default change warrants human review despite the focused implementation and tests.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c1434b0-d3e8-4569-8773-6cc02c32f5d3
📥 Commits

Reviewing files that changed from the base of the PR and between a72818c and 707797a.

📒 Files selected for processing: 2
  • apps/marketing/src/lib/platform.test.ts
  • apps/marketing/src/lib/platform.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The marketing homepage detects Android, iOS, Windows, macOS, and Linux. Android and iOS download buttons link to their mobile stores. Other platforms continue through the desktop release lookup.

Changes: Marketing platform detection and downloads

Layer / File(s) Summary
Platform detection and store URL selection
apps/marketing/src/lib/platform.ts, apps/marketing/src/lib/platform.test.ts
The shared helper detects platforms from user agents and touch-point counts, selects Android and iOS store URLs, and returns null for unmatched platforms or user agents. Tests cover these cases.
Homepage platform and download handling
apps/marketing/src/pages/index.astro
The homepage uses the shared detection and URL lookup. It updates platform labels and keyboard hints, routes mobile download buttons to the selected store, and continues desktop release lookup when no mobile store URL applies. The Apple icon also appears for iOS.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Homepage
  participant detectPlatform
  participant getMobileStoreUrl
  participant ReleaseAssets
  Homepage->>detectPlatform: user agent and touch-point count
  detectPlatform-->>Homepage: detected platform or null
  Homepage->>getMobileStoreUrl: detected platform
  getMobileStoreUrl-->>Homepage: mobile store URL or null
  alt Mobile store URL exists
    Homepage->>Homepage: Set both download buttons to the store URL
  else No mobile store URL
    Homepage->>ReleaseAssets: Fetch desktop release assets
  end
Loading
Merge Risk: ⚪ Minimal · up to 70779

No actionable download-routing issue is established; the change is mergeable after normal checks.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to a7281

Mobile visitors receive fixed app-store links, while desktop downloads retain their existing release path. The reviewed change does not introduce a material security risk or let device-identification input specify an arbitrary destination.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed authority is limited to choosing navigation destinations for the current homepage visitor. The inspected routing blocks do not write persistent state, operate across tenants, or grant service privileges.

Trust Boundaries and Controls

  • observed — Spoofable device-identification input controls classification, not URL construction. Mobile hrefs come only from fixed store constants. Desktop destinations still inherit trust from GitHub release metadata; that pre-existing trust path is not expanded by this PR.
Pre-merge checks: Passed 4
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: routing mobile download buttons to their app stores.
Description check Passed The description covers the problem, implementation, scope, verification results, limitations, and UI evidence. It explains the maintainer-requested takeover, although it does not link to the approval …
Full details: Description check

Explanation

The description covers the problem, implementation, scope, verification results, limitations, and UI evidence. It explains the maintainer-requested takeover, although it does not link to the approval comment or discussion.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@juliusmarminge juliusmarminge self-assigned this Oct 18, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Taking over this one. I’ll reduce the tests to the useful coverage, update the implementation against current main, and verify it before publishing the changes.

@juliusmarminge juliusmarminge added the takeover t3 automation: takeover label Oct 24, 2026 — with GitCafe Production
@juliusmarminge juliusmarminge added the pr:in-progress A lead is working on this PR label Oct 24, 2026

Copy link
Copy Markdown
Member

Taking over this one

Copy link
Copy Markdown
Member

Thank you @saphid for identifying the mobile download routing and iPad desktop-mode cases. Rebuilt against current main in #24577, preserving the proposed store destinations and desktop downloads. Compared the original diff against the replacement: both homepage buttons, platform detection, iOS icon, and keyboard hint are covered; five tests became four meaningful regressions with CI wiring. Final-head captures and independent proof audit are in the replacement body. Closing this superseded fork PR in favor of that credited replacement.

@juliusmarminge juliusmarminge removed the pr:in-progress A lead is working on this PR label Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). takeover t3 automation: takeover vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants