The best way to control Claude Code, Codex and more from any computer or phone
fix(marketing): route mobile downloads to app stores (#24577)
Julius Marminge committed
Nov 13, 2026 at 23:38 UTC
82479522cb667e09616a04705648ac4fab68b997
17 files changed
+127
-40
apps/marketing/package.json
+2
-1
@@ -7,7 +7,8 @@
7
"stage:install-scripts": "node scripts/stage-install-scripts.mjs",
8
"dev": "node scripts/stage-install-scripts.mjs && astro dev",
9
"build": "node scripts/stage-install-scripts.mjs && astro build",
10
- "preview": "astro preview"
10
+ "preview": "astro preview",
11
+ "test": "vp test run"
12
},
13
"dependencies": {
14
"@fontsource-variable/inter": "^5.3.0",
apps/marketing/src/i18n/de.ts
+2
@@ -27,6 +27,8 @@ export const de: Messages = {
27
downloadForMac: "Für macOS herunterladen",
28
downloadForWindows: "Für Windows herunterladen",
29
downloadForLinux: "Für Linux herunterladen",
30
+ downloadForIos: "Für iOS herunterladen",
31
+ downloadForAndroid: "Für Android herunterladen",
32
sourceLink: "Klau unseren Code (legal)",
33
alsoOnPhone: "Auch auf deinem Handy:",
34
screenshotAlt: "T3 Code führt Subagents von Claude, Codex, Muse und Gemini in einem Thread aus",
apps/marketing/src/i18n/en.ts
+2
@@ -27,6 +27,8 @@ export const en = {
27
downloadForMac: "Download for macOS",
28
downloadForWindows: "Download for Windows",
29
downloadForLinux: "Download for Linux",
30
+ downloadForIos: "Download for iOS",
31
+ downloadForAndroid: "Download for Android",
32
sourceLink: "Steal our code (legally)",
33
alsoOnPhone: "Also on your phone:",
34
screenshotAlt: "T3 Code running Claude, Codex, Muse, and Gemini subagents in one thread",
apps/marketing/src/i18n/es.ts
+2
@@ -28,6 +28,8 @@ export const es: Messages = {
28
downloadForMac: "Descargar para macOS",
29
downloadForWindows: "Descargar para Windows",
30
downloadForLinux: "Descargar para Linux",
31
+ downloadForIos: "Descargar para iOS",
32
+ downloadForAndroid: "Descargar para Android",
33
sourceLink: "Roba nuestro código (legalmente)",
34
alsoOnPhone: "También en tu teléfono:",
35
screenshotAlt: "T3 Code ejecutando subagentes de Claude, Codex, Muse y Gemini en un mismo hilo",
apps/marketing/src/i18n/fr.ts
+2
@@ -27,6 +27,8 @@ export const fr: Messages = {
27
downloadForMac: "Télécharger pour macOS",
28
downloadForWindows: "Télécharger pour Windows",
29
downloadForLinux: "Télécharger pour Linux",
30
+ downloadForIos: "Télécharger pour iOS",
31
+ downloadForAndroid: "Télécharger pour Android",
32
sourceLink: "Volez notre code (légalement)",
33
alsoOnPhone: "Aussi sur votre téléphone :",
34
screenshotAlt:
apps/marketing/src/i18n/ja.ts
+2
@@ -28,6 +28,8 @@ export const ja: Messages = {
28
downloadForMac: "macOS 版をダウンロード",
29
downloadForWindows: "Windows 版をダウンロード",
30
downloadForLinux: "Linux 版をダウンロード",
31
+ downloadForIos: "iOS 版をダウンロード",
32
+ downloadForAndroid: "Android 版をダウンロード",
33
sourceLink: "コードを盗もう(合法的に)",
34
alsoOnPhone: "スマホでも使えます:",
35
screenshotAlt:
apps/marketing/src/i18n/ko.ts
+2
@@ -27,6 +27,8 @@ export const ko: Messages = {
27
downloadForMac: "macOS용 다운로드",
28
downloadForWindows: "Windows용 다운로드",
29
downloadForLinux: "Linux용 다운로드",
30
+ downloadForIos: "iOS용 다운로드",
31
+ downloadForAndroid: "Android용 다운로드",
32
sourceLink: "코드 훔쳐 가기(합법적으로)",
33
alsoOnPhone: "휴대폰에서도:",
34
screenshotAlt: "하나의 스레드에서 Claude, Codex, Muse, Gemini 서브에이전트를 실행 중인 T3 Code",
apps/marketing/src/i18n/pt-BR.ts
+2
@@ -27,6 +27,8 @@ export const ptBR: Messages = {
27
downloadForMac: "Baixar para macOS",
28
downloadForWindows: "Baixar para Windows",
29
downloadForLinux: "Baixar para Linux",
30
+ downloadForIos: "Baixar para iOS",
31
+ downloadForAndroid: "Baixar para Android",
32
sourceLink: "Roube nosso código (legalmente)",
33
alsoOnPhone: "Também no seu celular:",
34
screenshotAlt:
apps/marketing/src/i18n/ru.ts
+2
@@ -27,6 +27,8 @@ export const ru: Messages = {
27
downloadForMac: "Скачать для macOS",
28
downloadForWindows: "Скачать для Windows",
29
downloadForLinux: "Скачать для Linux",
30
+ downloadForIos: "Скачать для iOS",
31
+ downloadForAndroid: "Скачать для Android",
32
sourceLink: "Украдите наш код (легально)",
33
alsoOnPhone: "Есть и для телефона:",
34
screenshotAlt: "T3 Code запускает субагентов Claude, Codex, Muse и Gemini в одном треде",
apps/marketing/src/i18n/zh.ts
+2
@@ -27,6 +27,8 @@ export const zh: Messages = {
27
downloadForMac: "下载 macOS 版",
28
downloadForWindows: "下载 Windows 版",
29
downloadForLinux: "下载 Linux 版",
30
+ downloadForIos: "下载 iOS 版",
31
+ downloadForAndroid: "下载 Android 版",
32
sourceLink: "来偷我们的代码(合法的)",
33
alsoOnPhone: "手机上也能用:",
34
screenshotAlt: "T3 Code 在同一个线程中运行 Claude、Codex、Muse 和 Gemini 子智能体",
apps/marketing/src/layouts/Layout.astro
+1
-1
@@ -7,8 +7,8 @@ import {
7
ANDROID_PLAY_STORE_URL,
8
GITHUB_REPOSITORY_URL,
9
IOS_APP_STORE_URL,
10
- MARKETING_STATS,
10
} from "../lib/site";
11
+import { MARKETING_STATS } from "../lib/stats";
12
import { type JsonLd, jsonLdGraph, organizationJsonLd, websiteJsonLd } from "../lib/seo";
13
import { messagesFor } from "../i18n";
14
import {
apps/marketing/src/lib/platform.test.ts
new
+45
@@ -0,0 +1,45 @@
1
+import { expect, it } from "vite-plus/test";
2
+
3
+import { detectPlatform, getMobileStoreUrl } from "./platform";
4
+import { ANDROID_PLAY_STORE_URL, IOS_APP_STORE_URL } from "./site";
5
+
6
+it.each([
7
+ {
8
+ // Android user agents also contain "Linux".
9
+ name: "Android",
10
+ userAgent:
11
+ "Mozilla/5.0 (Linux; Android 15; Pixel 9) AppleWebKit/537.36 Chrome/140.0.0.0 Mobile Safari/537.36",
12
+ maxTouchPoints: 5,
13
+ os: "android",
14
+ storeUrl: ANDROID_PLAY_STORE_URL,
15
+ },
16
+ {
17
+ name: "iPhone",
18
+ userAgent:
19
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 Version/18.6 Mobile/15E148 Safari/604.1",
20
+ maxTouchPoints: 5,
21
+ os: "ios",
22
+ storeUrl: IOS_APP_STORE_URL,
23
+ },
24
+ {
25
+ // iPad Safari sends a desktop Mac user agent by default.
26
+ name: "iPad with a desktop user agent",
27
+ userAgent:
28
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 Version/18.6 Safari/605.1.15",
29
+ maxTouchPoints: 5,
30
+ os: "ios",
31
+ storeUrl: IOS_APP_STORE_URL,
32
+ },
33
+ {
34
+ name: "macOS",
35
+ userAgent:
36
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 Version/18.6 Safari/605.1.15",
37
+ maxTouchPoints: 0,
38
+ os: "mac",
39
+ storeUrl: null,
40
+ },
41
+])("$name visitors get the $os download", ({ userAgent, maxTouchPoints, os, storeUrl }) => {
42
+ const platform = detectPlatform(userAgent, maxTouchPoints);
43
+ expect(platform?.os).toBe(os);
44
+ expect(platform && getMobileStoreUrl(platform)).toBe(storeUrl);
45
+});
apps/marketing/src/lib/platform.ts
new
+22
@@ -0,0 +1,22 @@
1
+import { ANDROID_PLAY_STORE_URL, IOS_APP_STORE_URL } from "./site";
2
+
3
+export type Platform = { os: "mac" | "win" | "linux" | "ios" | "android" };
4
+
5
+export function detectPlatform(userAgent: string, maxTouchPoints: number): Platform | null {
6
+ // Mobile checks come first: Android user agents contain "Linux" and iOS
7
+ // user agents contain "Mac OS X".
8
+ if (/Android/i.test(userAgent)) return { os: "android" };
9
+ if (/iPhone|iPad|iPod/i.test(userAgent)) return { os: "ios" };
10
+ if (/Win/i.test(userAgent)) return { os: "win" };
11
+ // iPadOS Safari sends a Mac user agent by default; only the touch screen
12
+ // tells it apart from a Mac.
13
+ if (/Mac/i.test(userAgent)) return { os: maxTouchPoints > 1 ? "ios" : "mac" };
14
+ if (/Linux/i.test(userAgent)) return { os: "linux" };
15
+ return null;
16
+}
17
+
18
+export function getMobileStoreUrl(platform: Platform): string | null {
19
+ if (platform.os === "ios") return IOS_APP_STORE_URL;
20
+ if (platform.os === "android") return ANDROID_PLAY_STORE_URL;
21
+ return null;
22
+}
apps/marketing/src/lib/site.ts
-23
@@ -5,26 +5,3 @@ export const IOS_APP_STORE_URL =
5
6
export const ANDROID_PLAY_STORE_URL =
7
"https://play.google.com/store/apps/details?id=com.t3tools.t3code";
8
-
9
-// Runs at build time, so each deploy picks up the current count.
10
-async function fetchGithubStars(): Promise<string> {
11
- const token = process.env.GITHUB_TOKEN;
12
- try {
13
- const response = await fetch("https://api.github.com/repos/pingdotgg/t3code", {
14
- headers: token ? { Authorization: `Bearer ${token}` } : {},
15
- });
16
- if (!response.ok) throw new Error(`GitHub API responded ${response.status}`);
17
- const { stargazers_count: stars } = (await response.json()) as { stargazers_count: number };
18
- return stars < 1000 ? String(stars) : `${Math.floor(stars / 1000)}k+`;
19
- } catch (error) {
20
- // A deploy must not ship a made-up count; offline dev should still render.
21
- if (import.meta.env.PROD) throw new Error("Could not fetch GitHub stars", { cause: error });
22
- console.warn("Could not fetch GitHub stars", error);
23
- return "?";
24
- }
25
-}
26
-
27
-export const MARKETING_STATS = {
28
- githubStars: await fetchGithubStars(),
29
- users: "500,000",
30
-} as const;
apps/marketing/src/lib/stats.ts
new
+22
@@ -0,0 +1,22 @@
1
+// Runs at build time, so each deploy picks up the current count.
2
+async function fetchGithubStars(): Promise<string> {
3
+ const token = process.env.GITHUB_TOKEN;
4
+ try {
5
+ const response = await fetch("https://api.github.com/repos/pingdotgg/t3code", {
6
+ headers: token ? { Authorization: `Bearer ${token}` } : {},
7
+ });
8
+ if (!response.ok) throw new Error(`GitHub API responded ${response.status}`);
9
+ const { stargazers_count: stars } = (await response.json()) as { stargazers_count: number };
10
+ return stars < 1000 ? String(stars) : `${Math.floor(stars / 1000)}k+`;
11
+ } catch (error) {
12
+ // A deploy must not ship a made-up count; offline dev should still render.
13
+ if (import.meta.env.PROD) throw new Error("Could not fetch GitHub stars", { cause: error });
14
+ console.warn("Could not fetch GitHub stars", error);
15
+ return "?";
16
+ }
17
+}
18
+
19
+export const MARKETING_STATS = {
20
+ githubStars: await fetchGithubStars(),
21
+ users: "500,000",
22
+} as const;
apps/marketing/src/pages/95.astro
+2
-1
@@ -1,7 +1,8 @@
1
---
2
import RetroIcon from "../components/RetroIcon.astro";
3
import RetroBox from "../components/RetroBox.astro";
4
-import { GITHUB_REPOSITORY_URL, MARKETING_STATS } from "../lib/site";
4
+import { GITHUB_REPOSITORY_URL } from "../lib/site";
5
+import { MARKETING_STATS } from "../lib/stats";
6
import "../styles/retro.css";
7
8
const agents = [
apps/marketing/src/pages/[...locale]/index.astro
+15
-14
@@ -6,8 +6,8 @@ import {
6
ANDROID_PLAY_STORE_URL,
7
GITHUB_REPOSITORY_URL,
8
IOS_APP_STORE_URL,
9
- MARKETING_STATS,
9
} from "../../lib/site";
10
+import { MARKETING_STATS } from "../../lib/stats";
11
import { tweets } from "../../lib/tweets";
12
import { softwareJsonLd } from "../../lib/seo";
13
import { messagesFor } from "../../i18n";
@@ -83,6 +83,8 @@ const mobileEndorsementRows = [
83
data-label-mac={t.downloadForMac}
84
data-label-win={t.downloadForWindows}
85
data-label-linux={t.downloadForLinux}
86
+ data-label-ios={t.downloadForIos}
87
+ data-label-android={t.downloadForAndroid}
88
>
89
<svg class="dl-icon dl-icon--apple" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 814 1000" aria-hidden="true"><path fill="currentColor" d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"/></svg>
90
<svg class="dl-icon dl-icon--windows" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88 88" aria-hidden="true"><path fill="currentColor" d="m0 12.402 35.687-4.86.016 34.423-35.67.203zm35.67 33.529.028 34.453L.028 75.48.026 45.7zm4.326-39.025L87.314 0v41.527l-47.318.376zm47.329 39.349-.011 41.34-47.318-6.678-.066-34.739z"/></svg>
@@ -413,16 +415,7 @@ const mobileEndorsementRows = [
415
<script>
416
import { fetchLatestRelease, RELEASES_URL, type ReleaseAsset } from "../../lib/releases";
417
import { startHomeMotion } from "../../lib/homeMotion";
416
-
417
- type Platform = { os: "mac" | "win" | "linux" };
418
-
419
- function detectPlatform(): Platform | null {
420
- const ua = navigator.userAgent;
421
- if (/Win/i.test(ua)) return { os: "win" };
422
- if (/Mac/i.test(ua)) return { os: "mac" };
423
- if (/Linux/i.test(ua)) return { os: "linux" };
424
- return null;
425
- }
418
+ import { detectPlatform, getMobileStoreUrl, type Platform } from "../../lib/platform";
419
420
// Browser architecture hints are unreliable; serve arm64 and let Intel users choose on /download.
421
function pickAsset(assets: ReleaseAsset[], platform: Platform): string | null {
@@ -445,14 +438,21 @@ const mobileEndorsementRows = [
438
const ctaLabel = document.getElementById("cta-download-label");
439
const kbd = document.getElementById("pr-button-kbd");
440
448
- const platform = detectPlatform();
441
+ const platform = detectPlatform(navigator.userAgent, navigator.maxTouchPoints);
442
if (!platform) return;
443
document.documentElement.dataset.platform = platform.os;
444
// Localized labels are rendered onto the hero button; the CTA reuses them.
445
const platformLabel = btn?.getAttribute(`data-label-${platform.os}`);
446
if (platformLabel && label) label.textContent = platformLabel;
447
if (platformLabel && ctaLabel) ctaLabel.textContent = platformLabel;
455
- if (kbd && platform.os !== "mac") kbd.textContent = "Ctrl ⏎";
448
+ if (kbd && platform.os !== "mac" && platform.os !== "ios") kbd.textContent = "Ctrl ⏎";
449
+
450
+ const storeUrl = getMobileStoreUrl(platform);
451
+ if (storeUrl) {
452
+ if (btn) btn.href = storeUrl;
453
+ if (ctaBtn) ctaBtn.href = storeUrl;
454
+ return;
455
+ }
456
457
try {
458
const release = await fetchLatestRelease();
@@ -650,7 +650,8 @@ const mobileEndorsementRows = [
650
flex-shrink: 0;
651
}
652
653
- :global([data-platform="mac"]) .dl-icon--apple { display: block; }
653
+ :global([data-platform="mac"]) .dl-icon--apple,
654
+ :global([data-platform="ios"]) .dl-icon--apple { display: block; }
655
:global([data-platform="win"]) .dl-icon--windows { display: block; }
656
:global([data-platform="linux"]) .dl-icon--linux { display: block; }
657
:global(html:not([data-platform])) .dl-icon--apple { display: block; }