The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
JavaScript aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
fix(web): align social previews with landing
YeonGyu-Kim2bb4c7f51896
diff --git a/packages/web/app/og-brand-mark.tsx b/packages/web/app/og-brand-mark.tsxnew file mode 100644index 00000000..ee5028fc--- /dev/null+++ b/packages/web/app/og-brand-mark.tsx@@ -0,0 +1,26 @@+import type { JSX } from "react"++interface OgBrandMarkProps {+ readonly fill: string+ readonly stroke: string+}++export function OgBrandMark({ fill, stroke }: OgBrandMarkProps): JSX.Element {+ return (+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true">+ <path+ d="M5.2 14.6C4.1 10.3 8 4.8 12.6 5 17 5.2 20 8.8 19.4 13.2 18.8 17.6 14.8 20 10.8 19.4 7.6 18.9 6.1 17.4 5.2 14.6Z"+ fill={fill}+ stroke={stroke}+ strokeWidth="1.3"+ />+ <path+ d="M9.2 11.4 11.6 13.2 9.4 15M13 15.4H15.4"+ stroke={stroke}+ strokeWidth="1.3"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ )+}diff --git a/packages/web/app/og-image-theme.ts b/packages/web/app/og-image-theme.tsnew file mode 100644index 00000000..6c03892f--- /dev/null+++ b/packages/web/app/og-image-theme.ts@@ -0,0 +1,29 @@+export const OG_SIZE = { width: 1200, height: 630 } as const++export const OG_PALETTE = {+ surfaceBase: "#0a0a0a",+ cardBase: "#0E1115",+ brandCore: "#008385",+ brandMid: "#006668",+ brandOuter: "#004d4e",+ textPrimary: "#ffffff",+ textSecondary: "#99A1AF",+ textSoft: "#E4FFFF",+ textMuted: "rgba(255, 255, 255, 0.72)",+ accentCyan: "#87F0F2",+ accentGlow: "#ABF5F7",+ border: "rgba(255, 255, 255, 0.08)",+} as const++export const OG_GRADIENTS = {+ base: `radial-gradient(120% 100% at 60% 65%, ${OG_PALETTE.brandCore} 0%, ${OG_PALETTE.brandMid} 35%, ${OG_PALETTE.brandOuter} 70%, ${OG_PALETTE.surfaceBase} 100%)`,+ beam:+ "radial-gradient(55% 55% at 38% -8%, rgba(179,254,255,0.62) 0%, rgba(135,240,242,0.22) 35%, rgba(255,255,255,0) 65%), " ++ "radial-gradient(32% 28% at 55% -5%, rgba(171,245,247,0.42) 0%, rgba(255,255,255,0) 70%)",+ sheen:+ "linear-gradient(118deg, transparent 18%, rgba(179,254,255,0.16) 26%, rgba(179,254,255,0.30) 30%, rgba(179,254,255,0.12) 35%, transparent 45%), " ++ "linear-gradient(112deg, transparent 8%, rgba(135,240,242,0.12) 15%, transparent 28%)",+ pools:+ "radial-gradient(55% 50% at 8% 95%, rgba(0,131,133,0.26), transparent 70%), " ++ "radial-gradient(45% 45% at 95% 40%, rgba(135,240,242,0.20), transparent 70%)",+} as constdiff --git a/packages/web/app/opengraph-image.tsx b/packages/web/app/opengraph-image.tsxindex a3a5b8a2..91d81b6a 100644--- a/packages/web/app/opengraph-image.tsx+++ b/packages/web/app/opengraph-image.tsx@@ -1,34 +1,28 @@import { ImageResponse } from "next/og"+import { SITE_CONFIG } from "../lib/site-config"+import { OgBrandMark } from "./og-brand-mark"+import { OG_GRADIENTS, OG_PALETTE, OG_SIZE } from "./og-image-theme"export const runtime = "nodejs"-export const alt = "LazyCodex splash — Codex for no-brainers."-export const size = { width: 1200, height: 630 }+export const alt = "LazyCodex - Codex for no-brainers."+export const size = OG_SIZEexport const contentType = "image/png"-const palette = {- surfaceBase: "#14154d",- cardBase: "#2a2dbf",- brandCore: "#5a5fef",- brandMid: "#3236c4",- brandOuter: "#232897",- textPrimary: "#ffffff",- textSecondary: "#dcdcf8",- textTertiary: "#b9bce6",- textSoft: "#e8e8ff",- textMuted: "rgba(255, 255, 255, 0.72)",-} as const-export default function OgImage(): ImageResponse {+ const palette = OG_PALETTE+return new ImageResponse((<divstyle={{position: "relative",display: "flex",+ alignItems: "center",+ justifyContent: "center",width: "100%",height: "100%",- backgroundColor: palette.cardBase,- backgroundImage: `radial-gradient(120% 100% at 60% 65%, ${palette.brandCore} 0%, #4a4fe0 35%, ${palette.brandMid} 70%, ${palette.brandOuter} 100%)`,+ padding: "54px 64px",+ backgroundColor: palette.surfaceBase,color: palette.textPrimary,fontFamily: "system-ui, sans-serif",}}@@ -36,57 +30,161 @@ export default function OgImage(): ImageResponse {<divstyle={{position: "absolute",- top: "150px",- left: 0,- right: 0,+ top: "25px",+ left: "80px",display: "flex",- flexDirection: "column",alignItems: "center",- textAlign: "center",+ gap: "10px",+ color: palette.textPrimary,+ fontSize: "15px",+ fontWeight: 500,+ letterSpacing: "-0.2px",+ }}+ >+ <OgBrandMark fill={palette.cardBase} stroke={palette.accentCyan} />+ <span>{SITE_CONFIG.wordmark}</span>+ </div>++ <div+ style={{+ position: "relative",+ display: "flex",+ width: "1072px",+ height: "522px",+ overflow: "hidden",+ borderRadius: "16px",+ border: `1px solid ${palette.border}`,+ backgroundColor: palette.cardBase,+ backgroundImage: OG_GRADIENTS.base,+ boxShadow: "0 40px 120px rgba(0, 0, 0, 0.62)",}}><divstyle={{- color: palette.textSoft,- fontSize: "15px",- fontWeight: 500,- letterSpacing: "5px",- textTransform: "uppercase",- fontFamily: "monospace",- opacity: 0.9,+ position: "absolute",+ top: 0,+ right: 0,+ bottom: 0,+ left: 0,+ backgroundImage: OG_GRADIENTS.base,}}- >- CODEX FOR NO-BRAINERS- </div>+ /><divstyle={{- marginTop: "34px",- color: palette.textPrimary,- fontSize: "168px",- fontWeight: 500,- letterSpacing: "-6px",- lineHeight: 0.95,+ position: "absolute",+ top: 0,+ right: 0,+ bottom: 0,+ left: 0,+ backgroundImage: OG_GRADIENTS.beam,}}- >- LazyCodex- </div>+ /><divstyle={{+ position: "absolute",+ top: "-10%",+ right: "-10%",+ bottom: "-10%",+ left: "-10%",+ backgroundImage: OG_GRADIENTS.sheen,+ filter: "blur(20px)",+ opacity: 0.85,+ }}+ />+ <div+ style={{+ position: "absolute",+ top: 0,+ right: 0,+ bottom: 0,+ left: 0,+ backgroundImage: OG_GRADIENTS.pools,+ }}+ />++ <div+ style={{+ position: "relative",display: "flex",flexDirection: "column",alignItems: "center",- marginTop: "26px",- color: palette.textMuted,- fontSize: "34px",- fontWeight: 400,- lineHeight: 1.35,+ justifyContent: "center",+ width: "100%",+ height: "100%",+ padding: "70px 72px 62px",+ textAlign: "center",}}>- <div>You don't need to ultrathink.</div>- <div style={{ display: "flex" }}>- <span>Just prompt with </span>- <span style={{ color: palette.textPrimary, fontWeight: 500 }}>ultrawork</span>- <span>.</span>+ <div+ style={{+ color: palette.textSoft,+ fontSize: "15px",+ fontWeight: 500,+ letterSpacing: "4.8px",+ lineHeight: 1.5,+ textTransform: "uppercase",+ fontFamily: "monospace",+ opacity: 0.9,+ }}+ >+ {SITE_CONFIG.eyebrow}+ </div>+ <div+ style={{+ marginTop: "28px",+ color: palette.textPrimary,+ fontSize: "142px",+ fontWeight: 500,+ letterSpacing: "-4.3px",+ lineHeight: 0.98,+ }}+ >+ {SITE_CONFIG.wordmark}+ </div>+ <div+ style={{+ display: "flex",+ flexDirection: "column",+ alignItems: "center",+ marginTop: "30px",+ gap: "2px",+ color: palette.textMuted,+ fontSize: "33px",+ fontWeight: 400,+ letterSpacing: "-0.17px",+ lineHeight: 1.35,+ }}+ >+ <div>{SITE_CONFIG.heroLineA}</div>+ <div style={{ display: "flex", alignItems: "center" }}>+ <span>{SITE_CONFIG.heroLineB.prefix}</span>+ <span+ style={{+ display: "flex",+ alignItems: "center",+ borderRadius: "6px",+ backgroundColor: "rgba(255, 255, 255, 0.10)",+ padding: "1px 11px 3px",+ color: palette.textSoft,+ fontFamily: "monospace",+ fontSize: "30px",+ lineHeight: 1.2,+ }}+ >+ {SITE_CONFIG.heroLineB.slot}+ </span>+ <span>{SITE_CONFIG.heroLineB.suffix}</span>+ <span+ style={{+ color: palette.accentCyan,+ fontWeight: 500,+ textShadow: `0 0 8px ${palette.accentGlow}`,+ }}+ >+ {SITE_CONFIG.heroLineB.keyword}+ </span>+ <span>{SITE_CONFIG.heroLineB.period}</span>+ </div></div></div></div>@@ -94,24 +192,26 @@ export default function OgImage(): ImageResponse {<divstyle={{position: "absolute",- bottom: "56px",+ bottom: "23px",left: 0,right: 0,display: "flex",justifyContent: "center",alignItems: "center",- color: palette.textPrimary,+ gap: "13px",+ color: palette.textSecondary,fontFamily: "monospace",- fontSize: "22px",+ fontSize: "16px",fontWeight: 500,- letterSpacing: "0.5px",- opacity: 0.9,+ letterSpacing: "0.3px",}}>- lazycodex.ai+ <span>{SITE_CONFIG.siteUrl.replace("https://", "")}</span>+ <span style={{ color: palette.accentCyan }}>/</span>+ <span>{SITE_CONFIG.installCommand}</span></div></div>),- { ...size },+ OG_SIZE,)}diff --git a/packages/web/app/twitter-image.tsx b/packages/web/app/twitter-image.tsxindex e82cbfae..abe77016 100644--- a/packages/web/app/twitter-image.tsx+++ b/packages/web/app/twitter-image.tsx@@ -7,6 +7,6 @@export { default } from "./opengraph-image"export const runtime = "nodejs"-export const alt = "LazyCodex splash — Codex for no-brainers."+export const alt = "LazyCodex - Codex for no-brainers."export const size = { width: 1200, height: 630 }export const contentType = "image/png"diff --git a/packages/web/e2e/seo.spec.ts b/packages/web/e2e/seo.spec.tsindex 61de5d90..bddf0376 100644--- a/packages/web/e2e/seo.spec.ts+++ b/packages/web/e2e/seo.spec.ts@@ -110,13 +110,24 @@ test.describe("site SEO + metadata", () => {})test("opengraph image and twitter image render as PNGs", async ({ request }) => {+ // given+ const expectedSize = { width: 1200, height: 630 }++ // whenconst og = await request.get("/opengraph-image")++ // thenexpect(og.status()).toBe(200)expect(og.headers()["content-type"]).toMatch(/image\/png/)+ expect(readPngDimensions(await og.body())).toEqual(expectedSize)+ // whenconst tw = await request.get("/twitter-image")++ // thenexpect(tw.status()).toBe(200)expect(tw.headers()["content-type"]).toMatch(/image\/png/)+ expect(readPngDimensions(await tw.body())).toEqual(expectedSize)})test("serves the unified LazyCodex favicon assets", async ({ page, request }) => {