Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): add platform download page (#1155)

Gener98d708080e50
diff --git a/DESIGN.md b/DESIGN.md
index 10332d9c6..e25522602 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -210,6 +210,10 @@ Component-only extension metadata and a self-contained source-row preview are re
## Patterns
+### Public download and contact pages
+
+Download and Contact share the Contact-style header and existing landing footer. Their public links have one owner, including Download, Pricing, Blog and Contact. Preserve the current landing green/CRT tokens and responsive gutter. The download page uses a lead action followed by desktop and mobile sections, with actual existing Alook product preview modules. Platform, architecture and installer format are explicit; all available links exist in server HTML. App Store and Google Play show noninteractive Coming soon states, while Android offers the actual APK. Keep the browser entrance visible and do not infer a Mac chip or automatically start a download.
+
### Progressive disclosure
Never show all options at once. Complexity exists but stays one interaction away.
diff --git a/src/web/public/download/character-blue.svg b/src/web/public/download/character-blue.svg
new file mode 100644
index 000000000..801c58c38
--- /dev/null
+++ b/src/web/public/download/character-blue.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-135.367 619.419 587.53 529.891" fill="none"><g data-face="blue">
+ <path d="M-109.988 949.35L-99.7556 851.999C-85.7718 718.952 24.7154 635.419 172.106 637.787C331.026 639.726 436.163 747.563 419.451 906.57L409.219 1003.92C399.839 1093.16 313.597 1133.31 135.12 1114.55C-43.357 1095.79 -119.367 1038.59 -109.988 949.35Z" fill="#6A8CAF" />
+ <g data-part="expression" opacity="1">
+ <path d="M96.9934 852.993C113.123 854.688 127.573 842.987 129.268 826.857C130.964 810.728 119.262 796.278 103.133 794.582C87.0029 792.887 72.5529 804.588 70.8576 820.718C69.1623 836.848 80.8637 851.298 96.9934 852.993Z" fill="black" />
+ <path d="M254.259 830.894C259.753 826.445 267.814 827.292 272.263 832.786C276.711 838.28 275.864 846.339 270.371 850.788C256.884 861.71 242.205 868.002 226.821 866.385C211.437 864.768 198.388 855.562 187.467 842.075C183.018 836.581 183.865 828.521 189.359 824.072C194.853 819.623 202.913 820.471 207.361 825.964C215.8 836.385 223.247 840.269 229.497 840.926C235.747 841.582 243.839 839.332 254.259 830.894Z" fill="black" />
+ <path d="M88.7148 884.932C130.907 930.924 177.419 935.813 228.252 899.598C219.15 944.573 193.506 964.844 151.321 960.41C109.135 955.977 88.2666 930.817 88.7148 884.932Z" fill="black" />
+ </g>
+ </g>
+ </svg>
diff --git a/src/web/public/download/character-purple.svg b/src/web/public/download/character-purple.svg
new file mode 100644
index 000000000..0d211ae4a
--- /dev/null
+++ b/src/web/public/download/character-purple.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="499.03 -54.4735 648.11 635.507" fill="none"><g data-face="purple">
+ <path d="M523.747 365.154L550.571 58.5595C556.271 -6.59189 611.194 -38.4735 678.261 -32.6059L1015.52 -3.09997C1082.58 2.76768 1131.14 43.7023 1125.44 108.854L1098.61 415.448C1089.89 515.091 998.635 565.034 797.433 547.431C596.23 529.828 515.03 464.797 523.747 365.154Z" fill="#8A5A9E" />
+ <g data-part="expression" opacity="1">
+ <path d="M746.769 191.001C764.76 192.575 780.621 179.267 782.195 161.276C783.769 143.285 770.46 127.424 752.469 125.85C734.478 124.276 718.618 137.585 717.044 155.576C715.47 173.567 728.778 189.427 746.769 191.001Z" fill="white" />
+ <path d="M900.067 204.413C918.058 205.987 933.918 192.679 935.492 174.688C937.066 156.697 923.758 140.836 905.767 139.262C887.776 137.688 871.915 150.997 870.341 168.988C868.767 186.979 882.076 202.839 900.067 204.413Z" fill="white" />
+ <path d="M879.218 239.983C885.568 236.076 893.884 238.055 897.791 244.405C901.699 250.755 899.719 259.07 893.37 262.978C867.707 278.77 841.761 286.237 815.871 283.972C789.981 281.707 765.725 269.847 743.194 249.839C737.62 244.888 737.114 236.355 742.065 230.78C747.016 225.206 755.549 224.7 761.124 229.651C780.399 246.769 799.403 255.428 818.224 257.075C837.045 258.721 857.264 253.493 879.218 239.983Z" fill="white" />
+ </g>
+ </g>
+ </svg>
diff --git a/src/web/public/download/character-red.svg b/src/web/public/download/character-red.svg
new file mode 100644
index 000000000..c8f749b48
--- /dev/null
+++ b/src/web/public/download/character-red.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-71.9935 -223.845 746.425 718.748" fill="none"><g data-face="red">
+ <path d="M-26.5996 311.221L-39.86 185.057C-55.9935 31.5572 22.3761 -72.3481 148.875 -102.651C194.472 -113.822 206.766 -178.893 309.8 -189.722C482.225 -207.845 613.345 -72.8086 633.015 114.335L646.275 240.499C658.431 356.149 559.924 430.282 328.623 454.592C97.3226 478.903 -14.4443 426.871 -26.5996 311.221Z" fill="#FE4365" />
+ <g data-part="expression" opacity="1">
+ <path d="M210.59 140.663C225.106 139.137 234.746 117.66 232.122 92.6914C229.498 67.7233 215.603 48.7195 201.086 50.2452C186.57 51.771 176.93 73.2485 179.554 98.2166C182.178 123.185 196.073 142.189 210.59 140.663Z" fill="white" />
+ <path d="M378.808 122.982C393.325 121.457 402.965 99.979 400.341 75.0109C397.717 50.0428 383.822 31.039 369.305 32.5647C354.789 34.0904 345.148 55.5679 347.773 80.536C350.397 105.504 364.292 124.508 378.808 122.982Z" fill="white" />
+ <path d="M328.063 167.848C333.26 162.502 341.807 162.382 347.153 167.579C352.499 172.777 352.619 181.324 347.421 186.67C334.382 200.08 319.562 208.689 302.962 210.434C286.361 212.178 270.075 206.839 254.533 196.433C248.337 192.284 246.678 183.899 250.826 177.704C254.974 171.509 263.36 169.849 269.555 173.997C281.456 181.966 291.507 184.489 300.139 183.581C308.771 182.674 318.079 178.117 328.063 167.848Z" fill="white" />
+ </g>
+ </g>
+ </svg>
diff --git a/src/web/public/download/character-teal.svg b/src/web/public/download/character-teal.svg
new file mode 100644
index 000000000..3c266c31d
--- /dev/null
+++ b/src/web/public/download/character-teal.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-109.045 193.42 595.427 567.179" fill="none"><g data-face="teal">
+ <path d="M-78.815 606.38L-85.9302 504.628C-93.0454 402.877 -38.9437 347.969 34.4882 325.793C26.946 266.675 72.4141 234.525 120.811 268.632C135.789 214.756 212.103 209.42 232.856 262.501C282.701 219.82 339.34 249.943 336.588 308.076C405.846 323.683 449.748 366.625 456.745 466.681L463.86 568.432C470.382 661.705 389.147 718.51 202.602 731.554C16.0577 744.599 -72.2928 699.652 -78.815 606.38Z" fill="#45ADA8" />
+ <g data-part="expression" opacity="1">
+ <path d="M112.83 422.564C129.98 421.365 145.457 430.644 158.934 444.695C164.133 450.116 163.953 458.725 158.532 463.924C153.111 469.123 144.502 468.944 139.303 463.523C128.271 452.021 120.188 449.315 114.727 449.697C109.266 450.079 101.638 453.884 92.3142 466.809C87.92 472.9 79.4196 474.276 73.3281 469.882C67.2366 465.488 65.8599 456.988 70.254 450.896C81.644 435.107 95.6792 423.763 112.83 422.564ZM248.498 413.077C265.649 411.878 281.126 421.157 294.603 435.208C299.802 440.629 299.621 449.238 294.201 454.437C288.78 459.636 280.171 459.457 274.972 454.036C263.94 442.534 255.857 439.828 250.396 440.21C244.935 440.592 237.307 444.397 227.983 457.322C223.589 463.414 215.088 464.789 208.997 460.395C202.905 456.001 201.529 447.501 205.923 441.409C217.313 425.62 231.348 414.276 248.498 413.077Z" fill="black" />
+ <path d="M237.886 492.175C243.232 487.591 251.282 488.21 255.865 493.556C260.449 498.901 259.83 506.951 254.484 511.535C234.167 528.953 212.389 539.153 189.261 540.77C166.134 542.387 143.149 535.318 120.604 520.896C114.673 517.102 112.94 509.216 116.734 503.285C120.529 497.353 128.415 495.62 134.346 499.415C153.427 511.621 171.04 516.482 187.483 515.332C203.925 514.182 220.69 506.917 237.886 492.175Z" fill="black" />
+ </g>
+ </g>
+ </svg>
diff --git a/src/web/public/download/testflight.png b/src/web/public/download/testflight.png
new file mode 100644
index 000000000..291c8547c
Binary files /dev/null and b/src/web/public/download/testflight.png differ
diff --git a/src/web/public/landing/posters/machine-dark.webp b/src/web/public/landing/posters/machine-dark.webp
index 3c523683c..0224a4088 100644
Binary files a/src/web/public/landing/posters/machine-dark.webp and b/src/web/public/landing/posters/machine-dark.webp differ
diff --git a/src/web/public/landing/posters/machine.webp b/src/web/public/landing/posters/machine.webp
index 140dd28e7..08f5cb3a8 100644
Binary files a/src/web/public/landing/posters/machine.webp and b/src/web/public/landing/posters/machine.webp differ
diff --git a/src/web/src/app/api/desktop/update/[target]/[arch]/[current_version]/route.ts b/src/web/src/app/api/desktop/update/[target]/[arch]/[current_version]/route.ts
index 93e053050..003f9c451 100644
--- a/src/web/src/app/api/desktop/update/[target]/[arch]/[current_version]/route.ts
+++ b/src/web/src/app/api/desktop/update/[target]/[arch]/[current_version]/route.ts
@@ -1,8 +1,8 @@
import { NextResponse } from "next/server";
+import { compareVersions, fetchGitHubReleases, parseStableSemver, RELEASE_CACHE_SECONDS, type GitHubAsset, type GitHubRelease } from "@/lib/github-releases";
-const GITHUB_REPO = "alookai/alook";
const TAG_PREFIX = "v";
-const CACHE_TTL = 300;
+const CACHE_TTL = RELEASE_CACHE_SECONDS;
interface PlatformSpec {
suffix: string;
@@ -40,11 +40,6 @@ const PLATFORM_MAP: Record<string, PlatformSpec> = {
},
};
-interface GitHubAsset {
- name: string;
- browser_download_url: string;
-}
-
function findPlatformBinary(assets: GitHubAsset[], spec: PlatformSpec) {
return assets.find(
(asset) =>
@@ -62,22 +57,6 @@ function findPlatformAssets(assets: GitHubAsset[], spec: PlatformSpec) {
return binary && signature ? { binary, signature } : null;
}
-function parseStableSemver(version: string): [number, number, number] | null {
- const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.exec(
- version,
- );
- return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null;
-}
-
-function compareVersions(a: [number, number, number], b: [number, number, number]): number {
- for (let i = 0; i < 3; i++) {
- const na = a[i];
- const nb = b[i];
- if (na !== nb) return na - nb;
- }
- return 0;
-}
-
export async function GET(
req: Request,
{ params }: { params: Promise<{ target: string; arch: string; current_version: string }> },
@@ -91,30 +70,12 @@ export async function GET(
return new NextResponse(null, { status: 204 });
}
- const res = await fetch(
- `https://api.github.com/repos/${GITHUB_REPO}/releases?per_page=100`,
- {
- headers: {
- Accept: "application/vnd.github.v3+json",
- "User-Agent": "alook-updater",
- },
- next: { revalidate: CACHE_TTL },
- },
- );
+ const res = await fetchGitHubReleases();
if (!res.ok) {
return NextResponse.json({ error: "Failed to fetch releases" }, { status: 502 });
}
- interface GitHubRelease {
- tag_name: string;
- draft: boolean;
- prerelease: boolean;
- assets: GitHubAsset[];
- body: string | null;
- published_at: string | null;
- }
-
const releases = (await res.json()) as GitHubRelease[];
const candidates = releases.flatMap((release) => {
if (release.draft || release.prerelease || !release.tag_name?.startsWith(TAG_PREFIX)) {
diff --git a/src/web/src/app/contact/contact.module.css b/src/web/src/app/contact/contact.module.css
index deeddb42e..ac2710682 100644
--- a/src/web/src/app/contact/contact.module.css
+++ b/src/web/src/app/contact/contact.module.css
@@ -5,23 +5,6 @@
background: var(--landing-section-bg);
}
-.header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 24px;
- padding: 24px var(--landing-page-gutter);
-}
-
-.back {
- display: inline-flex;
- min-height: 44px;
- align-items: center;
- color: var(--landing-text-muted);
- font-size: 14px;
- text-underline-offset: 5px;
-}
-
.main {
display: grid;
flex: 1;
diff --git a/src/web/src/app/contact/page.tsx b/src/web/src/app/contact/page.tsx
index ef2e86523..884b950ec 100644
--- a/src/web/src/app/contact/page.tsx
+++ b/src/web/src/app/contact/page.tsx
@@ -1,9 +1,9 @@
import { DISCORD_INVITE_URL } from "@/lib/discord-invite"
import { buildPublicPageMetadata } from "@/lib/seo/public-page-metadata"
import Image from "next/image"
-import Link from "next/link"
import { ArrowUpRight, CalendarDays, Mail } from "lucide-react"
import { SiDiscord, SiX } from "@icons-pack/react-simple-icons"
+import { PublicSiteHeader } from "@/components/home/public-site-header"
import { LandingFooter } from "@/components/home/landing-footer"
import landing from "@/components/home/landing-page.module.css"
import styles from "./contact.module.css"
@@ -23,13 +23,7 @@ const contacts = [
export default function ContactPage() {
return (
<div className={`landing ${landing.page} ${styles.page}`}>
- <header className={styles.header}>
- <Link href="/" className={landing.brand} aria-label="Alook home">
- <Image src="/alook.svg" alt="" width={28} height={28} />
- <span>Alook</span>
- </Link>
- <Link href="/" className={styles.back}>Back to home</Link>
- </header>
+ <PublicSiteHeader currentPath="/contact" />
<main className={styles.main}>
<section className={`${landing.closingCta} ${styles.sheet}`} aria-labelledby="contact-heading">
<h1 id="contact-heading">Let’s talk.</h1>
diff --git a/src/web/src/app/download/page.test.ts b/src/web/src/app/download/page.test.ts
new file mode 100644
index 000000000..2a46afd79
--- /dev/null
+++ b/src/web/src/app/download/page.test.ts
@@ -0,0 +1,38 @@
+import { renderToStaticMarkup } from "react-dom/server"
+import { afterEach, expect, it, vi } from "vitest"
+import { DOWNLOAD_TARGETS } from "@/lib/download-platforms"
+import DownloadPage from "./page"
+
+const state = vi.hoisted(() => ({ agent: "" }))
+vi.mock("next/headers", () => ({ headers: async () => new Headers({ "user-agent": state.agent }) }))
+vi.mock("@/lib/download-catalog", async importOriginal => ({
+ ...await importOriginal<typeof import("@/lib/download-catalog")>(),
+ readDownloadCatalog: async () => ({ unavailable: false, installers: DOWNLOAD_TARGETS.map(target => ({ id: target.id, version: "1.0.0", bytes: 1000, url: `https://github.com/alookai/alook/releases/download/v1.0.0/${target.id}` })) }),
+}))
+afterEach(() => { state.agent = "" })
+
+it("uses the installed parser at request time and keeps both chip links for a masked Intel Mac UA", async () => {
+ state.agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ const html = renderToStaticMarkup(await DownloadPage())
+ const hero = html.slice(html.indexOf('aria-labelledby="download-heading"'), html.indexOf('id="desktop"'))
+ expect(hero).toContain('href="https://github.com/alookai/alook/releases/download/v1.0.0/mac-arm"')
+ expect(hero).toContain('href="https://github.com/alookai/alook/releases/download/v1.0.0/mac-intel"')
+ expect(hero).not.toContain('href="#macos"')
+})
+
+it("offers the actual Windows EXE in server HTML before Client Hints or JavaScript", async () => {
+ state.agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
+ const html = renderToStaticMarkup(await DownloadPage())
+ const hero = html.slice(html.indexOf('aria-labelledby="download-heading"'), html.indexOf('id="desktop"'))
+ expect(hero).toContain('href="https://github.com/alookai/alook/releases/download/v1.0.0/windows-exe"')
+ expect(hero).not.toContain('href="#windows"')
+})
+
+it("offers the same real TestFlight beta from the iPhone hero and above Android APK", async () => {
+ state.agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"
+ const html = renderToStaticMarkup(await DownloadPage())
+ const hero = html.slice(html.indexOf('aria-labelledby="download-heading"'), html.indexOf('id="desktop"'))
+ expect(hero).toContain('href="https://testflight.apple.com/join/4fHgVBVF"')
+ expect(html.match(/Coming soon/g)).toHaveLength(2)
+ expect(html.match(/href="https:\/\/testflight.apple.com\/join\/4fHgVBVF"/g)).toHaveLength(2)
+})
diff --git a/src/web/src/app/download/page.tsx b/src/web/src/app/download/page.tsx
new file mode 100644
index 000000000..375cac308
--- /dev/null
+++ b/src/web/src/app/download/page.tsx
@@ -0,0 +1,19 @@
+import { headers } from "next/headers"
+import { userAgent } from "next/server"
+import { DownloadPageView } from "@/components/download/download-page"
+import { readDownloadCatalog } from "@/lib/download-catalog"
+import { buildPublicPageMetadata } from "@/lib/seo/public-page-metadata"
+import { downloadArchitecture, downloadPlatformFromOS } from "@/lib/download-platforms"
+
+export const metadata = buildPublicPageMetadata({
+ title: "Download Alook — macOS, Windows, Linux & Android",
+ description: "Get Alook for your computer or Android phone, or open it in your browser. Your team, friends and agents, together on every screen.",
+ path: "/download",
+})
+
+export default async function DownloadPage() {
+ const agent = userAgent({ headers: await headers() })
+ const platform = downloadPlatformFromOS(agent.os.name)
+ const architecture = platform === "macos" ? "unknown" : downloadArchitecture(agent.cpu.architecture)
+ return <DownloadPageView catalog={await readDownloadCatalog()} initialEnvironment={{ platform, architecture }} />
+}
diff --git a/src/web/src/components/download/download-current-platform.dom.test.tsx b/src/web/src/components/download/download-current-platform.dom.test.tsx
new file mode 100644
index 000000000..dde1a4667
--- /dev/null
+++ b/src/web/src/components/download/download-current-platform.dom.test.tsx
@@ -0,0 +1,75 @@
+import { afterEach, expect, it, vi } from "vitest"
+import { act, render, screen, waitFor } from "@/test/react-dom-harness"
+import { DOWNLOAD_TARGETS, IOS_TESTFLIGHT_URL, type DownloadEnvironment } from "@/lib/download-platforms"
+import { DownloadCurrentPlatform } from "./download-current-platform"
+
+const installers = DOWNLOAD_TARGETS.map(target => ({ id: target.id, version: "1.0.0", bytes: 1000, url: `https://github.com/alookai/alook/releases/download/v1.0.0/${target.id}` }))
+afterEach(() => { vi.restoreAllMocks(); vi.unstubAllGlobals() })
+function hints(value: unknown) {
+ Object.defineProperty(navigator, "userAgentData", { configurable: true, value })
+}
+afterEach(() => { hints(undefined); Reflect.deleteProperty(navigator, "maxTouchPoints") })
+
+it.each([
+ ["windows", "x64", "Windows", "windows-exe"],
+ ["linux", "x64", "Linux", "linux-appimage"],
+ ["android", "unknown", "Android", "android-apk"],
+] as const)("directly links the real %s installer on the first screen", (platform, architecture, label, id) => {
+ render(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform, architecture }} />)
+ expect(screen.getByRole("link", { name: `Download for ${label}` })).toHaveAttribute("href", installers.find(item => item.id === id)!.url)
+})
+
+it("keeps two direct Mac chip choices when Client Hints is unavailable or denied", async () => {
+ hints({ platform: "macOS", getHighEntropyValues: vi.fn().mockRejectedValue(new Error("denied")) })
+ render(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform: "macos", architecture: "unknown" }} />)
+ await act(async () => {})
+ expect(screen.getByRole("link", { name: /Apple Silicon/ })).toHaveAttribute("href", installers[0].url)
+ expect(screen.getByRole("link", { name: /Intel/ })).toHaveAttribute("href", installers[1].url)
+})
+
+it.each([["arm", "mac-arm"], ["x86", "mac-intel"]] as const)("uses native 64-bit %s Client Hints for a single direct Mac download", async (architecture, id) => {
+ const getHighEntropyValues = vi.fn().mockResolvedValue({ architecture, bitness: "64" })
+ hints({ platform: "macOS", getHighEntropyValues })
+ render(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform: "macos", architecture: "unknown" }} />)
+ await waitFor(() => expect(screen.getAllByRole("link")).toHaveLength(1))
+ expect(screen.getByRole("link", { name: "Download for Mac" })).toHaveAttribute("href", installers.find(item => item.id === id)!.url)
+ expect(getHighEntropyValues).toHaveBeenCalledWith(["architecture", "bitness"])
+})
+
+it("falls back to the real MSI if the current release has no EXE", () => {
+ render(<DownloadCurrentPlatform installers={installers.filter(item => item.id !== "windows-exe")} initialEnvironment={{ platform: "windows", architecture: "x64" }} />)
+ expect(screen.getByRole("link", { name: "Download for Windows" })).toHaveAttribute("href", installers[3].url)
+})
+
+it.each([
+ { platform: "unknown", architecture: "unknown" },
+ { platform: "windows", architecture: "arm64" },
+ { platform: "linux", architecture: "unsupported" },
+] satisfies DownloadEnvironment[])("keeps manual platforms available for %j", initialEnvironment => {
+ render(<DownloadCurrentPlatform installers={installers} initialEnvironment={initialEnvironment} />)
+ expect(screen.getByRole("link", { name: "Choose your platform" })).toHaveAttribute("href", "#desktop")
+})
+
+it("never invents a URL when the catalog failed", () => {
+ render(<DownloadCurrentPlatform installers={[]} initialEnvironment={{ platform: "macos", architecture: "unknown" }} />)
+ expect(screen.getAllByRole("link")).toHaveLength(1)
+ expect(screen.getByRole("link")).toHaveAttribute("href", "#desktop")
+})
+
+it("recognizes an iPad's desktop-mode Mac fallback without offering a Mac DMG", () => {
+ Object.defineProperty(navigator, "maxTouchPoints", { configurable: true, value: 5 })
+ render(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform: "macos", architecture: "unknown" }} />)
+ expect(screen.getByRole("link", { name: "Join the beta" })).toHaveAttribute("href", IOS_TESTFLIGHT_URL)
+ expect(screen.queryByRole("link", { name: /Download for Mac/ })).toBeNull()
+})
+
+it("retires a pending hints response before it can change a newer environment", async () => {
+ let resolve!: (value: { architecture: string; bitness: string }) => void
+ hints({ platform: "macOS", getHighEntropyValues: () => new Promise(done => { resolve = done }) })
+ const view = render(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform: "macos", architecture: "unknown" }} />)
+ hints(undefined)
+ view.rerender(<DownloadCurrentPlatform installers={installers} initialEnvironment={{ platform: "windows", architecture: "x64" }} />)
+ await act(async () => resolve({ architecture: "arm", bitness: "64" }))
+ expect(screen.getByRole("link", { name: "Download for Windows" })).toBeTruthy()
+ expect(screen.queryByRole("link", { name: /Apple Silicon/ })).toBeNull()
+})
diff --git a/src/web/src/components/download/download-current-platform.tsx b/src/web/src/components/download/download-current-platform.tsx
new file mode 100644
index 000000000..655c4fb4e
--- /dev/null
+++ b/src/web/src/components/download/download-current-platform.tsx
@@ -0,0 +1,49 @@
+"use client"
+
+import { useEffect } from "react"
+import { useAtom, useCreateAtom } from "@tanstack/react-store"
+import { ArrowDown, ArrowUpRight } from "lucide-react"
+import { IOS_TESTFLIGHT_URL, currentDownloadTargets, downloadArchitecture, downloadPlatformFromOS, UNKNOWN_DOWNLOAD_ENVIRONMENT, type DownloadEnvironment, type DownloadInstaller } from "@/lib/download-platforms"
+import styles from "./download-page.module.css"
+
+type ClientHints = {
+ platform: string
+ getHighEntropyValues?: (hints: string[]) => Promise<{ architecture?: string; bitness?: string }>
+}
+
+const LABELS = {
+ "mac-arm": "Download for Mac",
+ "mac-intel": "Download for Mac",
+ "windows-exe": "Download for Windows",
+ "windows-msi": "Download for Windows",
+ "linux-appimage": "Download for Linux",
+ "linux-deb": "Download for Linux",
+ "linux-rpm": "Download for Linux",
+ "android-apk": "Download for Android",
+} as const
+
+export function DownloadCurrentPlatform({ installers, initialEnvironment = UNKNOWN_DOWNLOAD_ENVIRONMENT }: { installers: DownloadInstaller[]; initialEnvironment?: DownloadEnvironment }) {
+ const [environment, setEnvironment] = useAtom(useCreateAtom(initialEnvironment))
+ useEffect(() => {
+ let current = true
+ const hints = (navigator as Navigator & { userAgentData?: ClientHints }).userAgentData
+ const hintedPlatform = downloadPlatformFromOS(hints?.platform)
+ const platform = initialEnvironment.platform === "macos" && navigator.maxTouchPoints > 1
+ ? "ios" : hintedPlatform === "unknown" ? initialEnvironment.platform : hintedPlatform
+ const fallback: DownloadEnvironment = { platform, architecture: platform === initialEnvironment.platform ? initialEnvironment.architecture : "unknown" }
+ setEnvironment(fallback)
+ if (hints?.getHighEntropyValues) {
+ void hints.getHighEntropyValues(["architecture", "bitness"]).then(values => {
+ if (current) setEnvironment({ platform, architecture: values.architecture ? downloadArchitecture(values.architecture, values.bitness) : fallback.architecture })
+ }).catch(() => {})
+ }
+ return () => { current = false }
+ }, [initialEnvironment, setEnvironment])
+ const targets = currentDownloadTargets(environment)
+ const available = targets.flatMap(id => installers.find(installer => installer.id === id) ?? [])
+ const chooseChip = environment.platform === "macos" && environment.architecture === "unknown"
+ const choices = chooseChip ? available : available.slice(0, 1)
+ if (choices.length) return <>{choices.map(installer => <a key={installer.id} className={styles.primary} href={installer.url}><ArrowDown size={18} aria-hidden="true" />{chooseChip ? installer.id === "mac-arm" ? "Mac · Apple Silicon" : "Mac · Intel" : LABELS[installer.id]}</a>)}</>
+ if (environment.platform === "ios") return <a className={styles.primary} href={IOS_TESTFLIGHT_URL}>Join the beta<ArrowUpRight size={18} aria-hidden="true" /></a>
+ return <a className={styles.primary} href="#desktop"><ArrowDown size={18} aria-hidden="true" />Choose your platform</a>
+}
diff --git a/src/web/src/components/download/download-page.module.css b/src/web/src/components/download/download-page.module.css
new file mode 100644
index 000000000..876b8556b
--- /dev/null
+++ b/src/web/src/components/download/download-page.module.css
@@ -0,0 +1,86 @@
+.page.page { min-height: 100svh; }
+.page a:focus-visible, .page summary:focus-visible { outline: 2px solid var(--landing-text); outline-offset: 5px; }
+.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 32px; padding-block: 64px 80px; }
+.heroCopy { min-width: 0; }
+.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--landing-text-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
+.hero h1 { font-family: var(--font-crt); font-size: clamp(56px, 6.6vw, 96px); font-weight: 400; line-height: 0.98; letter-spacing: -0.025em; }
+.hero h1 span { color: var(--landing-accent); }
+.intro { max-width: 38ch; margin-top: 24px; font-size: 19px; line-height: 1.6; color: var(--landing-text-muted); }
+.heroActions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 32px 24px; }
+.primary, .secondary { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; font-size: 14px; font-weight: 600; text-decoration: none; }
+.primary { color: var(--landing-bg); background: var(--landing-text); border: 1px solid var(--landing-text); }
+.secondary { color: var(--landing-text); border: 1px solid var(--landing-border); }
+.primary:hover { background: var(--landing-accent-dim); }
+.secondary:hover { background: var(--landing-section-bg); }
+.textLink { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--landing-text-muted); font-size: 13px; text-underline-offset: 4px; }
+.textLink:hover { color: var(--landing-text); text-decoration: underline; }
+.heroMedia { position: relative; isolation: isolate; min-width: 0; padding-block: 48px 24px; }
+.desktop { padding-block: 80px; background: var(--landing-section-bg); scroll-margin-top: 24px; }
+.sectionLead { max-width: 64ch; margin-bottom: 40px; }
+.sectionLead h2, .mobile h2, .browser h2 { font-family: var(--font-crt); font-size: clamp(40px, 4.4vw, 64px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
+.sectionLead > p:last-child, .mobileCopy > p, .browser p:not(.eyebrow) { max-width: 52ch; margin-top: 16px; color: var(--landing-text-muted); line-height: 1.7; }
+.desktopBody { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; gap: 48px; }
+.desktopMedia { position: sticky; top: 32px; overflow: hidden; border: 1px solid var(--landing-border); border-radius: var(--radius); background: var(--background); }
+.platformList { min-width: 0; }
+.platform { padding-block: 16px; border-top: 1px solid var(--landing-border); scroll-margin-top: 24px; }
+.platform:last-child { border-bottom: 1px solid var(--landing-border); }
+.platform summary { display: flex; min-height: 44px; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
+.platform summary::-webkit-details-marker { display: none; }
+.platform summary::after { content: "+"; margin-left: auto; font-size: 24px; font-weight: 400; }
+.platform[open] summary::after { content: "−"; }
+.platform h3 { margin: 0; font-size: 19px; font-weight: 600; }
+.platform summary > span { font-family: var(--font-mono); font-size: 11px; color: var(--landing-text-muted); }
+.installers { display: grid; gap: 8px; margin-top: 8px; list-style: none; padding: 0; }
+.installer, .unavailable { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border: 1px solid var(--landing-border); }
+.installer { background: var(--landing-bg); color: var(--landing-text); }
+.installer:hover { border-color: var(--landing-text-muted); }
+.installer strong, .unavailable strong { display: block; font-size: 14px; font-weight: 500; }
+.installer small, .unavailable small { display: block; margin-top: 4px; font-size: 11px; font-family: var(--font-mono); color: var(--landing-text-muted); }
+.unavailable { display: block; color: var(--landing-text-muted); }
+.releaseNote { margin-top: 32px; font-size: 13px; color: var(--landing-text-muted); }
+.releaseNote a { display: inline-flex; min-height: 44px; align-items: center; gap: 4px; text-decoration: underline; text-underline-offset: 4px; }
+.mobile { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 80px; align-items: center; padding-block: 96px; }
+.phoneMedia { width: min(100%, 260px); margin-inline: auto; overflow: hidden; border: 8px solid var(--landing-crt-bg); border-radius: 32px; background: var(--background); box-shadow: var(--e1); }
+.mobileCopy { min-width: 0; }
+.stores { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 32px; }
+.store { display: flex; min-height: 64px; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--landing-border); color: var(--landing-text); }
+.store small { display: block; margin-top: 4px; color: var(--landing-text-muted); font-family: var(--font-mono); font-size: 11px; }
+.mobileDownload { max-width: 420px; margin-bottom: 24px; scroll-margin-top: 24px; }
+.mobileDownload h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
+.browser { padding-block: 64px; text-align: center; background: var(--landing-section-bg); }
+.browser .eyebrow { justify-content: center; }
+.browser p:not(.eyebrow) { margin-inline: auto; }
+.browser .primary { margin-top: 24px; }
+.browser .textLink { display: flex; width: fit-content; margin: 16px auto 0; }
+@media (min-width: 640px) and (max-width: 1023px) {
+ .hero { grid-template-columns: 1fr; gap: 24px; }
+ .heroMedia { width: min(100%, 720px); margin-inline: auto; }
+ .desktopBody { grid-template-columns: 1fr; gap: 32px; }
+ .desktopMedia { position: static; }
+ .mobile { gap: 32px; }
+}
+@media (max-width: 639px) {
+ .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 32px 48px; }
+ .hero h1 { font-size: clamp(48px, 11vw, 72px); }
+ .intro { font-size: 16px; }
+ .heroActions { align-items: stretch; flex-direction: column; }
+ .heroMedia { margin-inline: -8px; }
+ .desktop { padding-block: 48px; }
+ .desktopBody { grid-template-columns: 1fr; gap: 32px; }
+ .desktopMedia { position: static; }
+ .mobile { grid-template-columns: 1fr; gap: 40px; padding-block: 48px; }
+ .mobileCopy { grid-row: 1; }
+ .phoneMedia { width: 224px; }
+ .stores { gap: 8px; }
+ .store { flex: 1; padding-inline: 8px; gap: 8px; font-size: 13px; }
+ .browser { padding-block: 48px; }
+}
+@media (prefers-reduced-motion: reduce) { .page *, .page *::before, .page *::after { scroll-behavior: auto; } }
+
+.characters { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
+.characters img { position: absolute; width: clamp(56px, 9vw, 80px); height: auto; opacity: 0.18; }
+.characters img:nth-child(1) { top: 0; left: 0; transform: rotate(-12deg); }
+.characters img:nth-child(2) { left: 8%; bottom: 0; transform: rotate(-8deg); }
+.characters img:nth-child(3) { right: 0; top: 0; transform: rotate(14deg); }
+.characters img:nth-child(4) { left: 42%; bottom: 0; transform: rotate(8deg); }
+@media (max-width: 639px) { .characters img:nth-child(4) { left: 26%; } }
diff --git a/src/web/src/components/download/download-page.test.ts b/src/web/src/components/download/download-page.test.ts
new file mode 100644
index 000000000..cfc4f0f4d
--- /dev/null
+++ b/src/web/src/components/download/download-page.test.ts
@@ -0,0 +1,72 @@
+import { readFileSync } from "node:fs"
+import { JSDOM } from "jsdom"
+import { createElement } from "react"
+import { renderToStaticMarkup } from "react-dom/server"
+import { describe, expect, it } from "vitest"
+import { DownloadPageView } from "./download-page"
+import { DOWNLOAD_TARGETS, IOS_TESTFLIGHT_URL } from "@/lib/download-platforms"
+import { PublicSiteHeader } from "../home/public-site-header"
+
+describe("complete server-rendered download page", () => {
+ it("provides every actual installer before JavaScript and uses real Alook preview modules", () => {
+ const installers = DOWNLOAD_TARGETS.map(target => ({ id: target.id, version: "1.0.0", bytes: 1000, url: `https://github.com/alookai/alook/releases/download/v1.0.0/${target.id}` }))
+ const html = renderToStaticMarkup(createElement(DownloadPageView, { catalog: { installers, unavailable: false } }))
+ for (const item of installers) expect(html).toContain(`href="${item.url}"`)
+ expect(html.match(/<h1\b/g)).toHaveLength(1)
+ const document = new JSDOM(html).window.document
+ const devices = document.querySelector('[role="group"][aria-label="Alook on desktop and mobile"]')!
+ expect(devices.querySelectorAll('img[src^="/download/character-"]')).toHaveLength(4)
+ expect(document.querySelectorAll('img[src^="/download/character-"]')).toHaveLength(4)
+ expect(devices.querySelector('[aria-label="The same Alook room updating on desktop and mobile"]')).not.toBeNull()
+
+ expect(html).toContain('/landing/posters/machine.webp')
+ expect(html).toContain('/landing/posters/mobile.webp')
+ expect(html).toContain('/download/character-purple.svg')
+ expect(html).toContain('/download/character-teal.svg')
+ expect(html).toContain('/download/character-red.svg')
+ expect(html).toContain('/download/character-blue.svg')
+ expect(html).not.toContain('/download/character-orange.svg')
+ expect(html).not.toContain("Find your chip")
+ expect(html.replaceAll('%2F', '/')).toContain('/download/testflight.png')
+ expect(html).toContain('iPhone &amp; iPad')
+ expect(html).toContain('Public beta')
+ expect(html).toContain('href="https://alook.ai/c/invite/nC7ax53lwm"')
+ const mobile = html.slice(html.indexOf('id="mobile"'), html.indexOf('aria-labelledby="browser-heading"'))
+ expect(mobile).toContain(`href="${IOS_TESTFLIGHT_URL}"`)
+ expect(mobile.indexOf(IOS_TESTFLIGHT_URL)).toBeLessThan(mobile.indexOf('id="android"'))
+ expect(mobile).not.toContain('href="/c/me"')
+ expect(mobile).not.toContain("while Google Play")
+ expect(html).toContain('id="macos" open=""')
+ expect(html).toContain('id="windows" open=""')
+ expect(html).toContain('id="linux" open=""')
+ expect(html.match(/Coming soon/g)).toHaveLength(2)
+ expect(html).not.toMatch(/href="[^\"]*(?:apps\.apple|play\.google)/)
+ expect(html).toContain('href="/c/me"')
+ expect(html).toContain('href="https://github.com/alookai/alook/releases"')
+ })
+
+ it("keeps browsing/release fallbacks and store status when the catalog cannot load", () => {
+ const html = renderToStaticMarkup(createElement(DownloadPageView, { catalog: { installers: [], unavailable: true } }))
+ expect(html).toContain("We couldn’t load the download list.")
+ expect(html.match(/Not available right now/g)).toHaveLength(8)
+ expect(html.match(/Coming soon/g)).toHaveLength(2)
+ expect(html).not.toContain("/releases/download/")
+ expect(html).toContain('href="/c/me"')
+ })
+
+ it.each(["/contact", "/download"])("shares the Contact-style public header and real navigation: %s", currentPath => {
+ const html = renderToStaticMarkup(createElement(PublicSiteHeader, { currentPath }))
+ expect(html).toContain('aria-label="Alook home"')
+ expect(html).toContain('aria-label="Site navigation"')
+ expect(html).toContain('href="/download"')
+ expect(html).toContain('href="/contact"')
+ expect(html).toContain('aria-current="page"')
+ expect(html).toContain("Back to home")
+ })
+})
+
+it.each(["red", "purple", "teal", "blue"])("paints the real %s logo expression in the download asset", color => {
+ const svg = readFileSync(new URL(`../../../public/download/character-${color}.svg`, import.meta.url), "utf8")
+ expect(svg).toMatch(/data-part="expression"\s+opacity="1"/)
+ expect(svg).not.toMatch(/opacity="0"/)
+})
diff --git a/src/web/src/components/download/download-page.tsx b/src/web/src/components/download/download-page.tsx
new file mode 100644
index 000000000..1ec40df30
--- /dev/null
+++ b/src/web/src/components/download/download-page.tsx
@@ -0,0 +1,80 @@
+/* eslint-disable @next/next/no-html-link-for-pages -- Product entrances require a new document to unload public tracking. */
+
+import Image from "next/image"
+import { ArrowDown, ArrowUpRight, Globe, Monitor, Smartphone } from "lucide-react"
+import { SiApple, SiLinux, SiAndroid, SiGoogleplay } from "@icons-pack/react-simple-icons"
+import { PublicSiteHeader } from "@/components/home/public-site-header"
+import { LandingFooter } from "@/components/home/landing-footer"
+import { LandingReachMotion } from "@/components/home/landing-reach-motion"
+import { DeferredMobileChatMotion, DeferredShellMotion } from "@/components/home/deferred-landing-media"
+import { SCENE_MAX_BEAT } from "@/components/home/landing-shell-motion-timeline"
+import { DOWNLOAD_TARGETS, IOS_TESTFLIGHT_URL, type DownloadEnvironment } from "@/lib/download-platforms"
+import { ALOOK_RELEASES_URL, type DownloadCatalog } from "@/lib/download-catalog"
+import { DownloadCurrentPlatform } from "./download-current-platform"
+import landing from "@/components/home/landing-page.module.css"
+import styles from "./download-page.module.css"
+
+function InstallerChoices({ platform, catalog }: { platform: "macos" | "windows" | "linux" | "android"; catalog: DownloadCatalog }) {
+ return <ul className={styles.installers}>
+ {DOWNLOAD_TARGETS.filter(target => target.platform === platform).map(target => {
+ const installer = catalog.installers.find(item => item.id === target.id)
+ return <li key={target.id}>
+ {installer ? <a href={installer.url} className={styles.installer}>
+ <span><strong>{target.label}</strong><small>{target.format} · v{installer.version} · {(installer.bytes / 1_000_000).toFixed(1)} MB</small></span>
+ <ArrowDown size={18} aria-hidden="true" />
+ </a> : <span className={styles.unavailable}><strong>{target.label} · {target.format}</strong><small>Not available right now</small></span>}
+ </li>
+ })}
+ </ul>
+}
+
+export function DownloadPageView({ catalog, initialEnvironment }: { catalog: DownloadCatalog; initialEnvironment?: DownloadEnvironment }) {
+ return <div className={`landing ${landing.page} ${styles.page}`}>
+ <PublicSiteHeader currentPath="/download" />
+ <main>
+ <section className={`${landing.siteContainer} ${styles.hero}`} aria-labelledby="download-heading">
+ <div className={styles.heroCopy}>
+ <p className={styles.eyebrow}>Alook, wherever you are</p>
+ <h1 id="download-heading">Good company.<br /><span>On every screen.</span></h1>
+ <p className={styles.intro}>Your team, friends and agents. One shared place, from your desk to your pocket.</p>
+ <div className={styles.heroActions}><DownloadCurrentPlatform installers={catalog.installers} initialEnvironment={initialEnvironment} /><a className={styles.secondary} href="/c/me"><Globe size={18} aria-hidden="true" />Open in your browser<ArrowUpRight size={16} aria-hidden="true" /></a></div>
+ <a className={styles.textLink} href="#desktop">See all platforms <ArrowDown size={14} aria-hidden="true" /></a>
+ </div>
+ <div className={styles.heroMedia} role="group" aria-label="Alook on desktop and mobile"><div className={styles.characters} aria-hidden="true">{["purple", "teal", "red", "blue"].map(color => <Image key={color} src={`/download/character-${color}.svg`} width={80} height={80} alt="" />)}</div><LandingReachMotion /></div>
+ </section>
+
+ <section id="desktop" className={styles.desktop} aria-labelledby="desktop-heading">
+ <div className={landing.siteContainer}>
+ <div className={styles.sectionLead}><p className={styles.eyebrow}><Monitor size={16} aria-hidden="true" />At your desk</p><h2 id="desktop-heading">Make room for your whole team.</h2><p>Keep the conversation close. Connect your computer when you’re ready to bring your agents along.</p></div>
+ <div className={styles.desktopBody}>
+ <div className={styles.desktopMedia} role="img" aria-label="Alook’s existing Machines view with connected computers and agent runtimes"><DeferredShellMotion scene="machine" beat={SCENE_MAX_BEAT.machine} /></div>
+ <div className={styles.platformList}>
+ <details className={styles.platform} id="macos" open><summary><SiApple size={23} aria-hidden="true" /><h3>macOS</h3><span>Choose your chip</span></summary><InstallerChoices platform="macos" catalog={catalog} /></details>
+ <details className={styles.platform} id="windows" open><summary><Monitor size={23} aria-hidden="true" /><h3>Windows</h3><span>x64</span></summary><InstallerChoices platform="windows" catalog={catalog} /></details>
+ <details className={styles.platform} id="linux" open><summary><SiLinux size={23} aria-hidden="true" /><h3>Linux</h3><span>x64</span></summary><InstallerChoices platform="linux" catalog={catalog} /></details>
+ </div>
+ </div>
+ <p className={styles.releaseNote}>{catalog.unavailable ? "We couldn’t load the download list. " : "Looking for a different release? "}<a href={ALOOK_RELEASES_URL}>View releases on GitHub <ArrowUpRight size={14} aria-hidden="true" /></a></p>
+ </div>
+ </section>
+
+ <section id="mobile" className={`${landing.siteContainer} ${styles.mobile}`} aria-labelledby="mobile-heading">
+ <div className={styles.phoneMedia} role="img" aria-label="Alook’s existing mobile conversation view"><DeferredMobileChatMotion beat={SCENE_MAX_BEAT.server} /></div>
+ <div className={styles.mobileCopy}>
+ <p className={styles.eyebrow}><Smartphone size={16} aria-hidden="true" />Out and about</p>
+ <h2 id="mobile-heading">The conversation comes with you.</h2>
+ <p>Check in with your people and agents, pick up a conversation, and stay in the loop from your phone.</p>
+ <div className={styles.stores} role="group" aria-label="Store availability">
+ <span className={styles.store}><SiApple size={24} aria-hidden="true" /><span>App Store<small>Coming soon</small></span></span>
+ <span className={styles.store}><SiGoogleplay size={24} aria-hidden="true" /><span>Google Play<small>Coming soon</small></span></span>
+ </div>
+ <div className={styles.mobileDownload}><h3><Image src="/download/testflight.png" width={21} height={21} alt="" />TestFlight</h3><ul className={styles.installers}><li><a className={styles.installer} href={IOS_TESTFLIGHT_URL}><span><strong>iPhone &amp; iPad</strong><small>Public beta</small></span><ArrowUpRight size={18} aria-hidden="true" /></a></li></ul></div>
+ <div id="android" className={styles.mobileDownload}><h3><SiAndroid size={21} aria-hidden="true" />Android APK</h3><InstallerChoices platform="android" catalog={catalog} /></div>
+ </div>
+ </section>
+
+ <section className={styles.browser} aria-labelledby="browser-heading"><div className={landing.siteContainer}><p className={styles.eyebrow}>No installation needed</p><h2 id="browser-heading">A tab is all it takes.</h2><p>Open Alook in your browser. Your conversations are already at home.</p><a className={styles.primary} href="/c/me">Open Alook<ArrowUpRight size={18} aria-hidden="true" /></a><a className={styles.textLink} href="https://alook.ai/c/invite/nC7ax53lwm">Need a hand? Get in touch.</a></div></section>
+ </main>
+ <LandingFooter />
+ </div>
+}
diff --git a/src/web/src/components/home/landing-shell-motion-timeline.ts b/src/web/src/components/home/landing-shell-motion-timeline.ts
index 86c52da41..64b305f19 100644
--- a/src/web/src/components/home/landing-shell-motion-timeline.ts
+++ b/src/web/src/components/home/landing-shell-motion-timeline.ts
@@ -21,7 +21,7 @@ export const LANDING_IDENTITY_MAYA = {
export const SCENE_MAX_BEAT: Record<LandingScene, number> = {
server: 6,
- machine: 7,
+ machine: 6,
provider: 9,
spaces: 12,
identity: 12,
@@ -60,7 +60,7 @@ export type SceneSnapshot = {
beat: number
visibleMessages: number
composerText: string
- machineState: "empty" | "connecting" | "online" | "bot-born"
+ machineState: "empty" | "connecting" | "online"
pairSheet: "closed" | "command" | "waiting" | "connected"
runtime: "claude" | "codex"
model: string | null
@@ -88,7 +88,6 @@ const MACHINE_CAMERAS = [
{ scale: 1.22, x: 900, y: 360 },
{ scale: 1.22, x: 900, y: 510 },
{ scale: 1.18, x: 620, y: 160 },
- { scale: 1.18, x: 620, y: 360 },
WIDE_CAMERA,
]
const PROVIDER_CAMERAS = [
@@ -179,9 +178,7 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene
? "empty"
: beat < 4
? "connecting"
- : beat < 6
- ? "online"
- : "bot-born",
+ : "online",
pairSheet:
beat === 2
? "command"
@@ -202,7 +199,6 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene
"pair-step-2",
"pair-connected",
"machine",
- "born-bot",
][beat] ?? null,
camera: MACHINE_CAMERAS[beat] ?? WIDE_CAMERA,
}
diff --git a/src/web/src/components/home/landing-shell-motion.render.test.ts b/src/web/src/components/home/landing-shell-motion.render.test.ts
index 60cd65126..797975e65 100644
--- a/src/web/src/components/home/landing-shell-motion.render.test.ts
+++ b/src/web/src/components/home/landing-shell-motion.render.test.ts
@@ -30,6 +30,15 @@ function channelHeader(markup: string) {
}
describe("landing community preview rendering", () => {
+ it.each([false, true])("keeps the connected Machines list free of an invented bot row (compact %s)", compact => {
+ const markup = renderToStaticMarkup(createElement(LandingShellMotion, { scene: "machine", compact, beat: SCENE_MAX_BEAT.machine }))
+ expect(markup).toContain("Gus’s MacBook Pro")
+ expect(markup).toContain('data-motion-target="machine"')
+ expect(markup).not.toContain("Born on")
+ expect(markup).not.toContain('data-motion-target="born-bot"')
+ expect(markup).not.toContain('data-testid="community-bot-card')
+ })
+
it.each(ALL_SCENES)("keeps the actual %s UserBar only in full-shell scenes", (scene) => {
const full = renderToStaticMarkup(createElement(LandingShellMotion, { scene, beat: SCENE_MAX_BEAT[scene] }))
const compact = renderToStaticMarkup(createElement(LandingShellMotion, { scene, compact: true, beat: SCENE_MAX_BEAT[scene] }))
diff --git a/src/web/src/components/home/landing-shell-motion.test.ts b/src/web/src/components/home/landing-shell-motion.test.ts
index 5bb31084b..0e786fc91 100644
--- a/src/web/src/components/home/landing-shell-motion.test.ts
+++ b/src/web/src/components/home/landing-shell-motion.test.ts
@@ -41,13 +41,13 @@ describe("landing shell motion timeline", () => {
])
})
- it("shows the real pair-sheet steps before the machine and born bot", () => {
+ it("shows the real pair-sheet steps before the connected machine", () => {
expect(sceneSnapshot("machine", 1)).toMatchObject({ machineState: "empty", pairSheet: "closed", focus: "connect" })
expect(sceneSnapshot("machine", 2)).toMatchObject({ machineState: "connecting", pairSheet: "command", focus: "pair-step-1" })
expect(sceneSnapshot("machine", 3)).toMatchObject({ machineState: "connecting", pairSheet: "waiting", focus: "pair-step-2" })
expect(sceneSnapshot("machine", 4)).toMatchObject({ machineState: "online", pairSheet: "connected", focus: "pair-connected" })
expect(sceneSnapshot("machine", 5)).toMatchObject({ machineState: "online", pairSheet: "closed", focus: "machine" })
- expect(sceneSnapshot("machine", 6)).toMatchObject({ machineState: "bot-born", pairSheet: "closed", focus: "born-bot" })
+ expect(sceneSnapshot("machine", 6)).toMatchObject({ machineState: "online", pairSheet: "closed", focus: null })
})
it("uses the five providers reported by the landing machine fixture", () => {
@@ -137,7 +137,7 @@ describe("landing shell motion timeline", () => {
expect(sceneSnapshot("server", 1).camera.scale).toBe(1.22)
expect(sceneSnapshot("server", 6).camera.scale).toBe(1)
expect(sceneSnapshot("machine", 2).camera.scale).toBe(1.22)
- expect(sceneSnapshot("machine", 7).camera.scale).toBe(1)
+ expect(sceneSnapshot("machine", 6).camera.scale).toBe(1)
expect(sceneSnapshot("provider", 3).camera.scale).toBe(1.22)
expect(sceneSnapshot("provider", 5).camera.scale).toBe(1)
expect(sceneSnapshot("provider", 6).camera.scale).toBe(1.18)
@@ -153,7 +153,7 @@ describe("landing shell motion timeline", () => {
it("clamps out-of-range beats to a valid deterministic snapshot", () => {
expect(sceneSnapshot("server", -1).beat).toBe(0)
expect(sceneSnapshot("server", 99).beat).toBe(SCENE_MAX_BEAT.server)
- expect(sceneSnapshot("machine", 99).machineState).toBe("bot-born")
+ expect(sceneSnapshot("machine", 99).machineState).toBe("online")
expect(sceneSnapshot("spaces", 99)).toMatchObject({ room: "play", inviteSent: true })
expect(sceneSnapshot("identity", 99)).toMatchObject({ room: "play", inviteOpen: false })
})
@@ -162,7 +162,7 @@ describe("landing shell motion timeline", () => {
expect(sceneDurationMs("server")).toBe(
SCENE_MAX_BEAT.server * SCENE_BEAT_DURATION_MS + SCENE_FINAL_HOLD_MS,
)
- expect(sceneDurationMs("machine")).toBe(12_900)
+ expect(sceneDurationMs("machine")).toBe(11_400)
expect(sceneDurationMs("provider")).toBe(15_900)
expect(sceneDurationMs("spaces")).toBe(20_400)
expect(sceneDurationMs("identity")).toBe(20_400)
diff --git a/src/web/src/components/home/landing-shell-motion.tsx b/src/web/src/components/home/landing-shell-motion.tsx
index de7b2357a..857568f0e 100644
--- a/src/web/src/components/home/landing-shell-motion.tsx
+++ b/src/web/src/components/home/landing-shell-motion.tsx
@@ -1577,7 +1577,7 @@ function MachineScene({
introDescription?: string
compact?: boolean
}) {
- const online = snapshot.machineState === "online" || snapshot.machineState === "bot-born"
+ const online = snapshot.machineState === "online"
const pairOpen = snapshot.pairSheet !== "closed"
const pairConnected = snapshot.pairSheet === "connected"
const step2Target = pairConnected ? "pair-connected" : "pair-step-2"
@@ -1642,18 +1642,6 @@ function MachineScene({
>
<MachineCard machine={ONLINE_MACHINE} onDelete={() => {}} onReconnect={() => {}} />
</div>
-
- <div
- data-visible={snapshot.machineState === "bot-born"}
- className={styles.resultReveal}
- >
- <div
- data-motion-target="born-bot"
- className={targetClass(snapshot, "born-bot")}
- >
- <BotCard runtime="claude" model={null} status="Born on Gus’s MacBook Pro" />
- </div>
- </div>
</div>
</div>
diff --git a/src/web/src/components/home/marketing-site-links.ts b/src/web/src/components/home/marketing-site-links.ts
index 5819cdd34..6025a9587 100644
--- a/src/web/src/components/home/marketing-site-links.ts
+++ b/src/web/src/components/home/marketing-site-links.ts
@@ -1,4 +1,5 @@
export const MARKETING_SITE_LINKS = [
+ { href: "/download", label: "Download", usesDocumentNavigation: false },
{ href: "/pricing", label: "Pricing", usesDocumentNavigation: false },
{ href: "/blog", label: "Blog", usesDocumentNavigation: true },
{ href: "/contact", label: "Contact", usesDocumentNavigation: false },
diff --git a/src/web/src/components/home/public-site-header.module.css b/src/web/src/components/home/public-site-header.module.css
new file mode 100644
index 000000000..417326ead
--- /dev/null
+++ b/src/web/src/components/home/public-site-header.module.css
@@ -0,0 +1,44 @@
+.header {
+ display: grid;
+ grid-template-columns: auto minmax(0, 1fr) auto;
+ align-items: center;
+ gap: 16px;
+ padding: 24px var(--landing-page-gutter);
+}
+
+.links {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ gap: 8px 16px;
+}
+
+.links a,
+.back {
+ display: inline-flex;
+ min-height: 44px;
+ align-items: center;
+ color: var(--landing-text-muted);
+ text-underline-offset: 5px;
+}
+
+.links a {
+ padding-inline: 8px;
+ font-family: var(--font-mono);
+ font-size: 12px;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+}
+
+.links a[aria-current="page"],
+.links a:hover,
+.back:hover { color: var(--landing-text); text-decoration: underline; }
+.back { font-size: 14px; }
+.header a:focus-visible { outline: 2px solid var(--landing-text); outline-offset: 4px; }
+
+@media (max-width: 639px) {
+ .header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-block: 16px; }
+ .links { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: 0 8px; }
+ .links a:first-child { padding-left: 0; }
+ .back { grid-row: 1; grid-column: 2; }
+}
diff --git a/src/web/src/components/home/public-site-header.tsx b/src/web/src/components/home/public-site-header.tsx
new file mode 100644
index 000000000..64bb17c33
--- /dev/null
+++ b/src/web/src/components/home/public-site-header.tsx
@@ -0,0 +1,20 @@
+import Image from "next/image"
+import Link from "next/link"
+import { MARKETING_SITE_LINKS } from "./marketing-site-links"
+import landing from "./landing-page.module.css"
+import styles from "./public-site-header.module.css"
+
+export function PublicSiteHeader({ currentPath }: { currentPath: string }) {
+ return <header className={styles.header}>
+ <Link href="/" className={landing.brand} aria-label="Alook home">
+ <Image src="/alook.svg" alt="" width={28} height={28} />
+ <span>Alook</span>
+ </Link>
+ <nav className={styles.links} aria-label="Site navigation">
+ {MARKETING_SITE_LINKS.map(link => link.usesDocumentNavigation
+ ? <a key={link.href} href={link.href} aria-current={currentPath === link.href ? "page" : undefined}>{link.label}</a>
+ : <Link key={link.href} href={link.href} aria-current={currentPath === link.href ? "page" : undefined}>{link.label}</Link>)}
+ </nav>
+ <Link href="/" className={styles.back}>Back to home</Link>
+ </header>
+}
diff --git a/src/web/src/lib/analytics-consent.test.ts b/src/web/src/lib/analytics-consent.test.ts
index 379e6cf2c..b6a5a5b02 100644
--- a/src/web/src/lib/analytics-consent.test.ts
+++ b/src/web/src/lib/analytics-consent.test.ts
@@ -81,7 +81,7 @@ describe("analytics consent browser contract", () => {
expect(Reflect.get(browser, "ga-disable-G-STBCL8F4ZY")).toBe(true)
})
- it.each(["/", "/pricing", "/contact", "/privacy", "/templates", "/templates/public", "/blog", "/blog/public/child"])("retains public path %s", path => {
+ it.each(["/", "/download", "/pricing", "/contact", "/privacy", "/templates", "/templates/public", "/blog", "/blog/public/child"])("retains public path %s", path => {
expect(isPublicAnalyticsPath(path)).toBe(true)
})
diff --git a/src/web/src/lib/analytics-consent.ts b/src/web/src/lib/analytics-consent.ts
index aca20b840..f757f2153 100644
--- a/src/web/src/lib/analytics-consent.ts
+++ b/src/web/src/lib/analytics-consent.ts
@@ -6,7 +6,7 @@ export const ANALYTICS_CONSENT_CHANGE_EVENT = "alook:analytics-consent-change"
export type AnalyticsConsentDecision = "granted" | "denied"
-export const isPublicAnalyticsPath = (path: string) => /^\/(?:pricing|contact|privacy|templates(?:\/[^/]+)?|blog(?:\/.*)?)?$/.test(path)
+export const isPublicAnalyticsPath = (path: string) => /^\/(?:download|pricing|contact|privacy|templates(?:\/[^/]+)?|blog(?:\/.*)?)?$/.test(path)
export function googleCommand(..._args: unknown[]): void {
window.dataLayer ??= []
diff --git a/src/web/src/lib/download-catalog.test.ts b/src/web/src/lib/download-catalog.test.ts
new file mode 100644
index 000000000..05635424c
--- /dev/null
+++ b/src/web/src/lib/download-catalog.test.ts
@@ -0,0 +1,91 @@
+import { afterEach, describe, expect, it, vi } from "vitest"
+import { readDownloadCatalog, selectDownloadInstallers } from "./download-catalog"
+import { DOWNLOAD_TARGETS } from "./download-platforms"
+import { compareVersions, parseStableSemver } from "./github-releases"
+
+function asset(name: string, version: string, patch: Record<string, unknown> = {}) {
+ return { name, size: 1000, state: "uploaded", browser_download_url: `https://github.com/alookai/alook/releases/download/v${version}/${encodeURIComponent(name)}`, ...patch }
+}
+function release(version: string, complete = true, patch: Record<string, unknown> = {}) {
+ return { tag_name: `v${version}`, draft: false, prerelease: false, assets: [
+ ...(complete ? [asset("latest.json", version)] : []),
+ ...DOWNLOAD_TARGETS.map(target => asset(target.id === "linux-rpm" ? `Alook-${version}-1.x86_64.rpm` : `Alook_${version}${target.suffix}`, version)),
+ asset(`Alook_${version}_aarch64.app.tar.gz`, version),
+ asset(`Alook_${version}_aarch64.app.tar.gz.sig`, version),
+ ], ...patch }
+}
+afterEach(() => vi.unstubAllGlobals())
+
+describe("public installer selection", () => {
+ it("selects all eight actual installers in semantic order, separately from updater bundles", () => {
+ const result = selectDownloadInstallers([release("2.9.1"), release("2.10.0"), release("3.0.0-beta", true, { prerelease: true }), release("9.0.0", true, { draft: true }), release("10.0.0", true, { tag_name: "web-v10.0.0" })])
+ expect(result.map(item => item.id)).toEqual(DOWNLOAD_TARGETS.map(item => item.id))
+ expect(result.every(item => item.version === "2.10.0")).toBe(true)
+ expect(result.find(item => item.id === "mac-arm")?.url).toMatch(/aarch64\.dmg$/)
+ expect(result.some(item => /\.sig$|\.tar\.gz$/.test(item.url))).toBe(false)
+ })
+
+ it("uses the last completed desktop release while allowing the independent newer APK", () => {
+ const result = selectDownloadInstallers([release("1.0.0"), release("1.0.1", false)])
+ expect(result.filter(item => item.id !== "android-apk").every(item => item.version === "1.0.0")).toBe(true)
+ expect(result.find(item => item.id === "android-apk")?.version).toBe("1.0.1")
+ })
+
+ it("falls back per actual missing format rather than guessing an asset URL", () => {
+ const newest = release("1.1.0")
+ newest.assets = newest.assets.filter(item => !item.name.endsWith(".msi") && !item.name.endsWith(".apk"))
+ const result = selectDownloadInstallers([newest, release("1.0.0")])
+ expect(result.find(item => item.id === "windows-exe")?.version).toBe("1.1.0")
+ expect(result.find(item => item.id === "windows-msi")?.version).toBe("1.0.0")
+ expect(result.find(item => item.id === "android-apk")?.version).toBe("1.0.0")
+ expect(selectDownloadInstallers([{ ...newest, assets: [] }])).toEqual([])
+ })
+
+ it.each([
+ { browser_download_url: "not a URL" },
+ { browser_download_url: "https://example.com/Alook_1.0.0_aarch64.dmg" },
+ { browser_download_url: "https://github.com/other/repo/releases/download/v1.0.0/Alook_1.0.0_aarch64.dmg" },
+ { browser_download_url: "https://user:[email protected]/alookai/alook/releases/download/v1.0.0/Alook_1.0.0_aarch64.dmg" },
+ { browser_download_url: "https://github.com/alookai/alook/releases/download/v1.0.0/Alook_1.0.0_aarch64.dmg?token=opaque" },
+ { browser_download_url: "https://github.com/alookai/alook/releases/download/v1.0.0/Alook_1.0.0_aarch64.dmg#fragment" },
+ { size: 0 }, { size: -1 }, { size: "1000" }, { state: "new" },
+ ])("rejects an unqualified installer without publishing it: %j", patch => {
+ const candidate = release("1.0.0")
+ candidate.assets = candidate.assets.map(item => item.name.endsWith("_aarch64.dmg") ? { ...item, ...patch } : item)
+ expect(selectDownloadInstallers([candidate]).some(item => item.id === "mac-arm")).toBe(false)
+ })
+
+ it("rejects an invalid desktop completion marker and keeps a real APK", () => {
+ const candidate = release("1.0.0")
+ candidate.assets[0] = { ...candidate.assets[0], state: "new" }
+ expect(selectDownloadInstallers([candidate]).map(item => item.id)).toEqual(["android-apk"])
+ })
+
+ it.each([null, {}, [null], [{ tag_name: "v1.0.0" }], [{ ...release("1.0.0"), assets: [null] }]])("rejects malformed response metadata: %j", input => {
+ expect(() => selectDownloadInstallers(input)).toThrow()
+ })
+
+ it("retains the shared stable-version grammar and numeric comparison", () => {
+ expect(parseStableSemver("1.2.3+build.4")).toEqual([1, 2, 3])
+ for (const value of ["1.2", "01.2.3", "1.2.3-beta", "garbage"]) expect(parseStableSemver(value)).toBeNull()
+ expect(compareVersions([1, 2, 3], [1, 2, 3])).toBe(0)
+ expect(compareVersions([1, 2, 4], [1, 2, 3])).toBeGreaterThan(0)
+ })
+})
+
+describe("public catalog read", () => {
+ it("uses the existing public release fetch/cache and produces a serializable catalog", async () => {
+ const fetch = vi.fn().mockResolvedValue(new Response(JSON.stringify([release("1.0.0")])))
+ vi.stubGlobal("fetch", fetch)
+ const result = await readDownloadCatalog()
+ expect(result.unavailable).toBe(false)
+ expect(result.installers).toHaveLength(8)
+ expect(fetch).toHaveBeenCalledWith("https://api.github.com/repos/alookai/alook/releases?per_page=100", { headers: { Accept: "application/vnd.github.v3+json", "User-Agent": "alook-updater" }, next: { revalidate: 300 } })
+ })
+ it.each(["http", "network", "json", "shape"])("returns an honest fallback on %s failure", async failure => {
+ const fetch = vi.fn().mockImplementation(() => failure === "network" ? Promise.reject(new Error("offline"))
+ : Promise.resolve(new Response(failure === "json" ? "not json" : "{}", { status: failure === "http" ? 503 : 200 })))
+ vi.stubGlobal("fetch", fetch)
+ expect(await readDownloadCatalog()).toEqual({ installers: [], unavailable: true })
+ })
+})
diff --git a/src/web/src/lib/download-catalog.ts b/src/web/src/lib/download-catalog.ts
new file mode 100644
index 000000000..62cf1f56d
--- /dev/null
+++ b/src/web/src/lib/download-catalog.ts
@@ -0,0 +1,54 @@
+import { ALOOK_RELEASES_URL, compareVersions, fetchGitHubReleases, parseStableSemver, type GitHubAsset, type GitHubRelease } from "./github-releases"
+
+import { DOWNLOAD_TARGETS, type DownloadInstaller } from "./download-platforms"
+
+export type DownloadCatalog = { installers: DownloadInstaller[]; unavailable: boolean }
+
+function releaseAssetUrl(asset: GitHubAsset, tag: string): string | null {
+ try {
+ const url = new URL(asset.browser_download_url)
+ return url.origin === "https://github.com" && !url.username && !url.password && !url.search && !url.hash
+ && url.pathname === `/alookai/alook/releases/download/${encodeURIComponent(tag)}/${encodeURIComponent(asset.name)}`
+ && typeof asset.size === "number" && Number.isSafeInteger(asset.size) && asset.size > 0
+ && (asset.state === undefined || asset.state === "uploaded") ? url.href : null
+ } catch { return null }
+}
+
+function isRelease(value: unknown): value is GitHubRelease {
+ if (!value || typeof value !== "object") return false
+ const release = value as Partial<GitHubRelease>
+ return typeof release.tag_name === "string" && typeof release.draft === "boolean" && typeof release.prerelease === "boolean"
+ && Array.isArray(release.assets) && release.assets.every(asset => asset && typeof asset.name === "string" && typeof asset.browser_download_url === "string")
+}
+
+export function selectDownloadInstallers(input: unknown): DownloadInstaller[] {
+ if (!Array.isArray(input)) throw new Error("Invalid release catalog")
+ if (!input.every(isRelease)) throw new Error("Invalid release metadata")
+ const releases = input.filter(release => !release.draft && !release.prerelease).flatMap(release => {
+ const text = release.tag_name.startsWith("v") ? release.tag_name.slice(1) : ""
+ const version = parseStableSemver(text)
+ return version ? [{ release, text, version }] : []
+ }).sort((a, b) => compareVersions(b.version, a.version))
+ return DOWNLOAD_TARGETS.flatMap(target => {
+ for (const { release, text } of releases) {
+ if (target.platform !== "android" && !release.assets.some(asset => asset.name === "latest.json" && releaseAssetUrl(asset, release.tag_name))) continue
+ const asset = release.assets.find(asset => target.id === "linux-rpm"
+ ? asset.name.startsWith(`Alook-${text}-`) && /^\d+\.x86_64\.rpm$/.test(asset.name.slice(`Alook-${text}-`.length))
+ : asset.name === `Alook_${text}${target.suffix}`)
+ const url = asset && releaseAssetUrl(asset, release.tag_name)
+ if (url && asset && typeof asset.size === "number") return [{ id: target.id, version: text, url, bytes: asset.size }]
+ }
+ return []
+ })
+}
+
+export async function readDownloadCatalog(): Promise<DownloadCatalog> {
+ try {
+ const response = await fetchGitHubReleases()
+ if (!response.ok) return { installers: [], unavailable: true }
+ return { installers: selectDownloadInstallers(await response.json()), unavailable: false }
+ } catch { return { installers: [], unavailable: true } }
+}
+
+
+export { ALOOK_RELEASES_URL }
diff --git a/src/web/src/lib/download-platforms.test.ts b/src/web/src/lib/download-platforms.test.ts
new file mode 100644
index 000000000..1e94c5888
--- /dev/null
+++ b/src/web/src/lib/download-platforms.test.ts
@@ -0,0 +1,27 @@
+import { expect, it } from "vitest"
+import { currentDownloadTargets, downloadArchitecture, downloadPlatformFromOS } from "./download-platforms"
+
+it.each([
+ ["Mac OS", "macos"], ["macOS", "macos"], ["Windows", "windows"], ["Android", "android"],
+ ["iOS", "ios"], ["Linux", "linux"], ["Ubuntu", "linux"], ["Chrome OS", "unknown"], [undefined, "unknown"],
+])("normalizes the existing parser's OS %s", (name, platform) => {
+ expect(downloadPlatformFromOS(name)).toBe(platform)
+})
+
+it.each([
+ ["arm", "64", "arm64"], ["arm64", undefined, "arm64"], ["x86", "64", "x64"], ["amd64", undefined, "x64"],
+ ["x86", "32", "unsupported"], ["arm", "32", "unsupported"], ["mips", undefined, "unsupported"], [undefined, undefined, "unknown"],
+])("respects available architecture and bitness: %s / %s", (arch, bits, expected) => {
+ expect(downloadArchitecture(arch, bits)).toBe(expected)
+})
+
+it("offers both real Mac packages when the browser does not reveal its chip", () => {
+ expect(currentDownloadTargets({ platform: "macos", architecture: "unknown" })).toEqual(["mac-arm", "mac-intel"])
+ expect(currentDownloadTargets({ platform: "macos", architecture: "arm64" })).toEqual(["mac-arm"])
+ expect(currentDownloadTargets({ platform: "macos", architecture: "x64" })).toEqual(["mac-intel"])
+})
+
+it.each(["windows", "linux"] as const)("does not silently offer an x64 installer to known ARM %s", platform => {
+ expect(currentDownloadTargets({ platform, architecture: "arm64" })).toEqual([])
+ expect(currentDownloadTargets({ platform, architecture: "unsupported" })).toEqual([])
+})
diff --git a/src/web/src/lib/download-platforms.ts b/src/web/src/lib/download-platforms.ts
new file mode 100644
index 000000000..439db9f96
--- /dev/null
+++ b/src/web/src/lib/download-platforms.ts
@@ -0,0 +1,52 @@
+export const IOS_TESTFLIGHT_URL = "https://testflight.apple.com/join/4fHgVBVF"
+
+export const DOWNLOAD_TARGETS = [
+ { id: "mac-arm", platform: "macos", label: "Apple Silicon", format: "DMG", suffix: "_aarch64.dmg" },
+ { id: "mac-intel", platform: "macos", label: "Intel", format: "DMG", suffix: "_x64.dmg" },
+ { id: "windows-exe", platform: "windows", label: "Windows x64", format: "EXE", suffix: "_x64-setup.exe" },
+ { id: "windows-msi", platform: "windows", label: "Windows x64", format: "MSI", suffix: "_x64_en-US.msi" },
+ { id: "linux-deb", platform: "linux", label: "Debian / Ubuntu · x64", format: "DEB", suffix: "_amd64.deb" },
+ { id: "linux-rpm", platform: "linux", label: "Fedora / RHEL · x64", format: "RPM", suffix: ".x86_64.rpm" },
+ { id: "linux-appimage", platform: "linux", label: "Linux x64", format: "AppImage", suffix: "_amd64.AppImage" },
+ { id: "android-apk", platform: "android", label: "Android", format: "APK", suffix: "_android.apk" },
+] as const
+
+export type DownloadPlatform = (typeof DOWNLOAD_TARGETS)[number]["platform"] | "ios" | "unknown"
+export type DownloadTargetId = (typeof DOWNLOAD_TARGETS)[number]["id"]
+export type DownloadInstaller = { id: DownloadTargetId; version: string; url: string; bytes: number }
+
+export type DownloadArchitecture = "arm64" | "x64" | "unsupported" | "unknown"
+export type DownloadEnvironment = { platform: DownloadPlatform; architecture: DownloadArchitecture }
+export const UNKNOWN_DOWNLOAD_ENVIRONMENT: DownloadEnvironment = { platform: "unknown", architecture: "unknown" }
+
+export function downloadPlatformFromOS(name = ""): DownloadPlatform {
+ const os = name.toLowerCase()
+ if (os === "android") return "android"
+ if (os === "ios") return "ios"
+ if (["macos", "mac os"].includes(os)) return "macos"
+ if (os === "windows") return "windows"
+ if (["linux", "ubuntu", "debian", "fedora", "arch", "centos", "red hat", "linux mint", "suse"].includes(os)) return "linux"
+ return "unknown"
+}
+
+export function downloadArchitecture(architecture = "", bitness?: string): DownloadArchitecture {
+ const arch = architecture.toLowerCase()
+ if (!arch) return "unknown"
+ if (arch === "arm64" || arch === "aarch64" || (arch === "arm" && bitness === "64")) return "arm64"
+ if (["amd64", "x86_64", "x64"].includes(arch) || (arch === "x86" && bitness === "64")) return "x64"
+ return "unsupported"
+}
+
+export function currentDownloadTargets(environment: DownloadEnvironment): DownloadTargetId[] {
+ const { platform, architecture } = environment
+ if (platform === "android") return ["android-apk"]
+ if (platform === "macos") {
+ if (architecture === "arm64") return ["mac-arm"]
+ if (architecture === "x64") return ["mac-intel"]
+ return architecture === "unknown" ? ["mac-arm", "mac-intel"] : []
+ }
+ if (architecture === "arm64" || architecture === "unsupported") return []
+ if (platform === "windows") return ["windows-exe", "windows-msi"]
+ if (platform === "linux") return ["linux-appimage", "linux-deb", "linux-rpm"]
+ return []
+}
diff --git a/src/web/src/lib/github-releases.ts b/src/web/src/lib/github-releases.ts
new file mode 100644
index 000000000..28c503018
--- /dev/null
+++ b/src/web/src/lib/github-releases.ts
@@ -0,0 +1,35 @@
+export const ALOOK_RELEASES_URL = "https://github.com/alookai/alook/releases"
+export const RELEASE_CACHE_SECONDS = 300
+
+export interface GitHubAsset {
+ name: string
+ browser_download_url: string
+ size?: number
+ state?: string
+}
+
+export interface GitHubRelease {
+ tag_name: string
+ draft: boolean
+ prerelease: boolean
+ assets: GitHubAsset[]
+ body: string | null
+ published_at: string | null
+}
+
+export function fetchGitHubReleases() {
+ return fetch("https://api.github.com/repos/alookai/alook/releases?per_page=100", {
+ headers: { Accept: "application/vnd.github.v3+json", "User-Agent": "alook-updater" },
+ next: { revalidate: RELEASE_CACHE_SECONDS },
+ })
+}
+
+export function parseStableSemver(version: string): [number, number, number] | null {
+ const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/.exec(version)
+ return match ? [Number(match[1]), Number(match[2]), Number(match[3])] : null
+}
+
+export function compareVersions(a: [number, number, number], b: [number, number, number]): number {
+ for (let i = 0; i < 3; i++) if (a[i] !== b[i]) return a[i] - b[i]
+ return 0
+}
diff --git a/src/web/src/lib/observability/coverage.ts b/src/web/src/lib/observability/coverage.ts
index 6e930fe65..aa238f38b 100644
--- a/src/web/src/lib/observability/coverage.ts
+++ b/src/web/src/lib/observability/coverage.ts
@@ -16,6 +16,7 @@ export const pageRoutes = [
"/c/onboarding-preview",
"/contact",
"/demo",
+ "/download",
"/guides",
"/landing-legacy",
"/onboarding-preview",
diff --git a/src/web/src/lib/root-sitemap.test.ts b/src/web/src/lib/root-sitemap.test.ts
index ea66a6df1..e1841a103 100644
--- a/src/web/src/lib/root-sitemap.test.ts
+++ b/src/web/src/lib/root-sitemap.test.ts
@@ -37,6 +37,7 @@ describe("sitemap", () => {
expect(urls).toContain("https://alook.ai");
expect(urls).toContain("https://alook.ai/templates");
expect(urls).toContain("https://alook.ai/pricing");
+ expect(urls).toContain("https://alook.ai/download");
expect(urls).not.toContain("https://alook.ai/pricing-concept");
expect(urls).toContain("https://alook.ai/blog");
expect(urls).toContain("https://alook.ai/guides");
diff --git a/src/web/src/lib/root-sitemap.ts b/src/web/src/lib/root-sitemap.ts
index ba61772da..023862d8b 100644
--- a/src/web/src/lib/root-sitemap.ts
+++ b/src/web/src/lib/root-sitemap.ts
@@ -25,6 +25,7 @@ export function buildRootSitemap(manifest: BlogDiscoveryManifestV1 | null): Meta
return [
{ url: SITE_URL, changeFrequency: "weekly", priority: 1 },
+ { url: `${SITE_URL}/download`, changeFrequency: "weekly", priority: 0.8 },
{ url: `${SITE_URL}/pricing`, changeFrequency: "monthly", priority: 0.8 },
{ url: `${SITE_URL}/templates`, changeFrequency: "weekly", priority: 0.8 },
...templateEntries,
diff --git a/src/web/src/test/e2e-ui/19-marketing-seo.spec.ts b/src/web/src/test/e2e-ui/19-marketing-seo.spec.ts
index 732c7309c..b139ae52c 100644
--- a/src/web/src/test/e2e-ui/19-marketing-seo.spec.ts
+++ b/src/web/src/test/e2e-ui/19-marketing-seo.spec.ts
@@ -109,14 +109,15 @@ test("homepage keeps Tutorials in the footer and collapses mobile header links",
await expect.poll(() => header.evaluate((element) => getComputedStyle(element).visibility)).toBe("visible")
const inlineLinks = header.locator(".marketing-site-link")
- await expect(inlineLinks).toHaveCount(3)
+ await expect(inlineLinks).toHaveCount(4)
for (const link of await inlineLinks.all()) await expect(link).toBeHidden()
const mobileMenu = header.locator("details")
await mobileMenu.locator("summary").click()
const mobileLinks = mobileMenu.locator(".marketing-mobile-site-link")
- await expect(mobileLinks).toHaveCount(3)
+ await expect(mobileLinks).toHaveCount(4)
const expectedLinks = [
+ { href: "/download", label: "Download" },
{ href: "/pricing", label: "Pricing" },
{ href: "/blog", label: "Blog" },
{ href: "/contact", label: "Contact" },
@@ -281,6 +282,26 @@ for (const width of [1440, 390]) {
await expect(page).toHaveURL(/\/contact$/)
await expect(page.getByRole("heading", { name: "Let’s talk." })).toBeVisible()
await expect.poll(contactLayout).toEqual(direct)
+
+ await page.getByRole("navigation", { name: "Site navigation" }).getByRole("link", { name: "Download", exact: true }).click()
+ await expect(page).toHaveURL(/\/download$/)
+ await expect(page.getByRole("heading", { level: 1 })).toContainText("Good company.")
+ await expect(page.locator('link[rel="canonical"]')).toHaveAttribute("href", "https://alook.ai/download")
+ await expect(page.getByLabel("Store availability").getByText("Coming soon", { exact: true })).toHaveCount(2)
+ const beta = page.locator("#mobile").getByRole("link", { name: "iPhone & iPad Public beta", exact: true })
+ await expect(beta).toHaveAttribute("href", "https://testflight.apple.com/join/4fHgVBVF")
+ const betaBox = await beta.boundingBox()
+ const apkBox = await page.getByRole("heading", { name: "Android APK", exact: true }).boundingBox()
+ expect(betaBox!.y + betaBox!.height).toBeLessThanOrEqual(apkBox!.y)
+
+ await expect(page.getByRole("link", { name: "App Store", exact: true })).toHaveCount(0)
+ await expect(page.getByRole("link", { name: "Google Play", exact: true })).toHaveCount(0)
+ expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(width)
+ await page.screenshot({ path: testInfo.outputPath("download-shared-header.png"), fullPage: true })
+ await page.getByRole("navigation", { name: "Site navigation" }).getByRole("link", { name: "Contact", exact: true }).focus()
+ await page.keyboard.press("Enter")
+ await expect(page).toHaveURL(/\/contact$/)
+ await expect.poll(contactLayout).toEqual(direct)
})
}