From d833ff47761f71e57e0056954949fa230f438bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Wed, 8 Jul 2026 01:10:47 -0400 Subject: [PATCH] Move release manifest into lib/ to fix dependency direction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Architecture review (hai-architecture / APoSD) of the shipped redesign found one structural smell: the shared lib/ layer imported the release manifest from components/ — data in the presentation layer, dependency pointing the wrong way. - move components/release-links.generated.ts -> lib/; update the four importers and the README. lib/ no longer imports from components/. - downloads.ts: reuse PlatformDownload["id"] instead of re-declaring the union. No behavior change (download counter + tracked hrefs identical); build + e2e 12/12. --- landing/README.md | 2 +- landing/components/sections/download-section.tsx | 2 +- landing/lib/downloads.ts | 4 ++-- landing/lib/platform-support.ts | 2 +- landing/lib/product-narrative.ts | 2 +- landing/{components => lib}/release-links.generated.ts | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename landing/{components => lib}/release-links.generated.ts (100%) diff --git a/landing/README.md b/landing/README.md index b179faed..7cc95a46 100644 --- a/landing/README.md +++ b/landing/README.md @@ -6,7 +6,7 @@ Next.js landing page for the AgentCompany desktop release lane. | Surface | Source | |---|---| -| Download cards | `landing/components/release-links.generated.ts` | +| Download cards | `landing/lib/release-links.generated.ts` | | Platform FAQ | `landing/lib/platform-support.ts` | | Hero, How It Works, software JSON-LD features | `landing/lib/product-narrative.ts` | | Runtime download URLs | generated from `scripts/generate-landing-release-links.mjs` | diff --git a/landing/components/sections/download-section.tsx b/landing/components/sections/download-section.tsx index 6ef7f3cf..ade3c6dc 100644 --- a/landing/components/sections/download-section.tsx +++ b/landing/components/sections/download-section.tsx @@ -5,7 +5,7 @@ import { Download } from "reicon-react/icons/Download"; import { Container } from "../ui/container"; import { Reveal } from "../ui/reveal"; import { SectionHeading } from "../ui/section-heading"; -import { platformDownloads, releaseVersion } from "../release-links.generated"; +import { platformDownloads, releaseVersion } from "../../lib/release-links.generated"; import { DOWNLOAD_COUNT_SEED, getTrackedDownloadHref } from "../../lib/downloads"; export function DownloadSection() { diff --git a/landing/lib/downloads.ts b/landing/lib/downloads.ts index aea6f5d2..ab9d6664 100644 --- a/landing/lib/downloads.ts +++ b/landing/lib/downloads.ts @@ -1,11 +1,11 @@ -import { platformDownloads, type PlatformDownloadAsset } from "../components/release-links.generated"; +import { platformDownloads, type PlatformDownload, type PlatformDownloadAsset } from "./release-links.generated"; export const DOWNLOAD_COUNT_SEED = 13674; export const DOWNLOAD_DEDUP_WINDOW_HOURS = 24; export const DOWNLOAD_DEDUP_WINDOW_MS = DOWNLOAD_DEDUP_WINDOW_HOURS * 60 * 60 * 1000; export type ReleaseDownloadAsset = PlatformDownloadAsset & { - platformId: "macos" | "windows" | "linux"; + platformId: PlatformDownload["id"]; platformTitle: string; }; diff --git a/landing/lib/platform-support.ts b/landing/lib/platform-support.ts index 439d7b5b..3879d457 100644 --- a/landing/lib/platform-support.ts +++ b/landing/lib/platform-support.ts @@ -3,7 +3,7 @@ import { type PlatformDownload, type PlatformDownloadAsset, type ReleaseArchitecture, -} from "../components/release-links.generated"; +} from "./release-links.generated"; const ARCHITECTURE_ORDER: ReleaseArchitecture[] = ["arm64", "x64", "x86"]; diff --git a/landing/lib/product-narrative.ts b/landing/lib/product-narrative.ts index 87d476ca..f203e780 100644 --- a/landing/lib/product-narrative.ts +++ b/landing/lib/product-narrative.ts @@ -1,4 +1,4 @@ -import { releaseVersion } from "../components/release-links.generated"; +import { releaseVersion } from "./release-links.generated"; export const landingHeroNarrative = { eyebrow: "AgentCompany Desktop", diff --git a/landing/components/release-links.generated.ts b/landing/lib/release-links.generated.ts similarity index 100% rename from landing/components/release-links.generated.ts rename to landing/lib/release-links.generated.ts