Repository navigation
fix(marketing): route mobile downloads to app stores - #24577
juliusmarminge wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Android visitors go to Google Play; iPhone and iPad visitors, including iPadOS Safari's desktop Mac user agent, go to the App Store. Desktop download routing is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package lost its test script with the low-signal test cleanup, so CI's change detection skipped the mobile store routing regression tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused marketing fix that routes mobile download CTAs to existing iOS and Android store listings while preserving desktop download behavior. The new platform detection is isolated and covered by tests, with no production configuration or sensitive-area changes. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Platform detection and store mapping apps/marketing/src/lib/platform.ts, apps/marketing/src/lib/platform.test.ts, apps/marketing/package.json |
The shared helper classifies Android, iOS, Windows, macOS, and Linux platforms and returns store URLs for Android and iOS. Tests cover Android, iPhone, touch-enabled iPad, and macOS. The package adds a test script. |
Homepage download integration apps/marketing/src/pages/index.astro |
The homepage uses the shared platform helper. When a mobile store URL exists, both download buttons use it and release lookup stops. Otherwise, the desktop release flow continues. The keyboard hint and Apple icon now account for iOS. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant Browser
participant MarketingPage
participant PlatformHelpers
participant ReleaseAssets
Browser->>MarketingPage: Load homepage
MarketingPage->>PlatformHelpers: Detect platform from user agent and touch points
PlatformHelpers-->>MarketingPage: Return platform
MarketingPage->>PlatformHelpers: Look up mobile store URL
PlatformHelpers-->>MarketingPage: Return store URL or null
alt Store URL exists
MarketingPage->>Browser: Set both download buttons to store URL
else No store URL
MarketingPage->>ReleaseAssets: Continue desktop release lookup
end
Possibly related PRs
- pingdotgg/t3code#18816: Changes the same marketing download behavior, including platform helpers, store routing, and iPad desktop-mode detection.
Suggested labels: bugfix, takeover, pr:in-progress, size:XS
Suggested reviewers: macroscopeapp, t3dotgg
Merge Risk: 
Minimal · up to 8e2e6
-
No download-routing issue is established that needs to be fixed before merging; the existing product-eligibility requirement still applies.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The pull request description covers the problem, change, scope, approval context, verification results, evidence, limitations, and agent details. The original description includes all required template headings. The scope section references the prior pull request and maintainer-requested takeover, although it does not include a direct approval comment link; this is non-critical because the focused bug fix and takeover context are explained.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- 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.
Mobile visitors to the marketing homepage receive desktop installers. Both download buttons now use the existing App Store and Google Play links, including iPad desktop mode; desktop downloads keep their current behavior.
Takeover
Based on @saphid's #18816, rebuilt against current main because homepage logic moved.
Reduced five platform cases to four meaningful regressions and restored the marketing test task so CI executes them. Existing store URLs and desktop release selection are retained.
Evidence
Final-head evidence index · Independent proof audit: SUFFICIENT
c4fa4629eb
69b0eb2c4c
Captured 16/16 matched full-page pairs, 32 diff images, 16 readable before/after section sheets, and 22 collapsed branch transcripts (11 inputs × both SHAs). No required static or B01–B05 case is missing. All 32 final page images passed two byte-identical frames at least 500 ms apart. Every final image and diff was opened for inspection. Headed Chrome for Testing 145.0.7632.6, Playwright 1.58.2 / CDP, Linux x86_64, Xvfb; reduced motion; bundled DM Sans and JetBrains Mono loaded; default font scaling and zoom 100%; no CSS/text autosizing override. All profile DPRs and actual UA/touch/UA-CH/media/viewport values are recorded in the sidecars. Safari UA rows are Chromium emulation, not native Safari/WebKit proof.
Browser DPR stays exactly 3/2/1 from the fixtures. PNG raster output is CSS pixels, CDP scale=1, so a 390-wide page image is 390 pixels wide. The requested 390×844 or 1440×900 viewport is used for page loading and the DOM/network transcript; then height expands once to document scrollHeight for full-document painting.
--hide-scrollbarskeeps layout width constant; the driver asserts both CTA and hint rectangles exactly match the requested viewport. Capture viewport dimensions are recorded too.--disable-gpuuses software compositing. Astro's unrelated dev toolbar is disabled using scratch-only XDG preferences. The fixed-dark site stays dark for L01/L02 light preference. No browser state injection, source edits, CSS animation override, T3 server or userdata is involved.Diff0 marks every nonzero maximum absolute RGB-channel delta in saturated magenta on black, amplifying even 1/255. DiffT uses the same algorithm with a strict >16/255 maximum-channel threshold. Comparison uses original CSS-raster pixels, with no alignment, resizing or crop. Both whole-page images and diffs are linked below; section sheets supplement them.
Reproduction instructions · Runner · Browser driver · Fixtures with exact replacement SHA · Rebound source-derived matrix · Rendering environment · Source/tree hashes · Diff generator · Transcript validator · Validation results · Pixel audit · Cleanup record · Capture log · Before server log · After server log · Xvfb log · Inspection record · Inspection helper · Pixel audit log
Every visible difference / what else changed
Exact CTA geometry, dimensions and counts; Pixel audit implementation. Hrefs are invisible and proven by the linked DOM/network logs: mobile after selects App Store / Play directly with zero release fetches; desktop success selects its fixed fixture asset; unknown and failed/missing assets retain Releases. The actual footer Download and nav Download remain
/download; explicit footer store links stay unchanged. No installer or external store was activated.Interaction and timing recordings
Recording index with steps and timestamps for every pair · Extended matrix · Audited row results: 34/34 · Independent proof audit: SUFFICIENT
Captured 34 requested recording rows as 47 matched pairs / 94 videos, including 13 supporting pairs that resolve lower-CTA timing and focus/resize/scroll framing. Headed Chromium on Xvfb, ffmpeg x11grab, identical scripts and inherited profiles at the exact before/after SHAs. All recordings were independently opened through temporal contact sheets and correlated with sidecars; 492 fresh contexts and 432 intercepted native navigation requests have zero oracle errors. Independent iPhone hero reproduction passed touch and real keyboard activation at both widths: four App Store requests, zero release fetches. Scripts, logs, hashes, cleanup records and reproduction footage are linked from the index and audit.
The recordings show existing macOS/Apple/Releases fallback before the page script executes on both revisions. Early activation then dispatches Releases; after initialization mobile selects its store without a release fetch. With JavaScript disabled, all profiles retain the default macOS/Releases markup. Webfont reflow also remains visible; these recordings do not establish no-flash or no-layout-shift behavior. Android's updated button has no platform glyph. The lower primary CTA is distinct from the actual footer Download link, which stays
/download. Navigation is intercepted before external delivery, proving target selection rather than store landing or installation.Supporting pairs, complete step/timestamp tables and sidecars are in the recording index above.
Explicitly unverified: native Safari/WebKit on an actual iPhone.
Verification log
Original description by @saphid
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
Android user agent — before / after
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.