Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(ai-gateway): switchboard illustration for the gateway launch banner and dialog (#19564)

Tobias Wochingerbcd3a66b0028
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.stories.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.stories.tsx
index 4febd66ee1..ad6e1f46c0 100644
--- a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.stories.tsx
+++ b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.stories.tsx
@@ -1,6 +1,27 @@
import preview from "@/.storybook/preview";
import { GatewayHero } from "./GatewayHero";
-const meta = preview.meta({ component: GatewayHero });
+const meta = preview.meta({
+ component: GatewayHero,
+ // The hero only renders inside the launch dialog, which caps it at 640px.
+ decorators: [
+ (Story) => (
+ <div className="max-w-160">
+ <Story />
+ </div>
+ ),
+ ],
+});
export const Default = meta.story({});
+
+/** Short viewports squeeze the dialog, so the hero crops around its center. */
+export const Shrunk = meta.story({
+ decorators: [
+ (Story) => (
+ <div className="flex h-48 flex-col">
+ <Story />
+ </div>
+ ),
+ ],
+});
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.tsx
index d654c796ac..4989bfc3b4 100644
--- a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.tsx
+++ b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayHero.tsx
@@ -1,41 +1,17 @@
-import { ArrowRight } from "@langfuse/icons";
-import { SiAnthropic, SiOpenai } from "@langfuse/icons/si";
-
import styles from "@/src/features/ai-gateway/components/GatewayLaunch/gatewayLaunch.module.css";
-import { GatewayReceipt } from "@/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt";
+import { GatewaySwitchboard } from "@/src/features/ai-gateway/components/GatewayLaunch/GatewaySwitchboard";
import { cn } from "@/src/utils/tailwind";
-/** Illustration: provider spend flowing into a per-person receipt; shrinks first in short dialogs. */
+/** Dialog illustration; crops around its center as short dialogs shrink it. */
export function GatewayHero() {
return (
<div
className={cn(
- "bg-surface-section flex h-72 min-h-48 items-center justify-center gap-5 overflow-hidden border-b px-8",
+ "bg-surface-section h-72 min-h-48 overflow-hidden border-b",
styles.dotGrid,
)}
>
- <div className="flex flex-col gap-2">
- <span className="text-muted-foreground text-2xs font-mono tracking-wider whitespace-nowrap">
- WHAT THE PROVIDERS SEND YOU
- </span>
- <div className="bg-background flex items-center gap-6 border px-3 py-2.5">
- <span className="flex items-center gap-2">
- <SiAnthropic size="base" />
- <SiOpenai size="base" />
- </span>
- <span className="font-mono text-xs font-bold">$58,240.22</span>
- </div>
- </div>
- <div
- aria-hidden="true"
- className="text-muted-foreground mt-6 flex items-center"
- >
- <span className="border-muted-foreground w-10 border-t border-dashed" />
- <ArrowRight size="sm" color="muted" __rawClassName="-ml-1" />
- </div>
- <div className="w-64 shrink-0">
- <GatewayReceipt variant="dialog" />
- </div>
+ <GatewaySwitchboard variant="dialog" />
</div>
);
}
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayLaunchBanner.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayLaunchBanner.tsx
index 8e76d4fa84..35a5178b6c 100644
--- a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayLaunchBanner.tsx
+++ b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayLaunchBanner.tsx
@@ -7,7 +7,7 @@ import { IconButton } from "@/src/components/design-system/IconButton/IconButton
import { Button } from "@/src/components/ui/button";
import styles from "@/src/features/ai-gateway/components/GatewayLaunch/gatewayLaunch.module.css";
import { GatewayLaunchDialog } from "@/src/features/ai-gateway/components/GatewayLaunch/GatewayLaunchDialog";
-import { GatewayReceipt } from "@/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt";
+import { GatewaySwitchboard } from "@/src/features/ai-gateway/components/GatewayLaunch/GatewaySwitchboard";
import {
type GatewayLaunchState,
type GatewayLaunchTarget,
@@ -68,10 +68,8 @@ export function GatewayLaunchBanner({
One gateway key for full visibility into what your agents cost.
</p>
</div>
- <div className="relative mr-12 hidden h-full w-72 shrink-0 xl:block">
- <div className="absolute inset-x-0 -top-2">
- <GatewayReceipt variant="banner" />
- </div>
+ <div className="mr-12 hidden h-full w-72 shrink-0 xl:block">
+ <GatewaySwitchboard variant="banner" />
</div>
<div className="flex shrink-0 items-center gap-2">
<Button
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.stories.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.stories.tsx
deleted file mode 100644
index b6236ea94d..0000000000
--- a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.stories.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import preview from "@/.storybook/preview";
-import { GatewayReceipt } from "./GatewayReceipt";
-
-const meta = preview.meta({ component: GatewayReceipt });
-
-export const Banner = meta.story({
- args: { variant: "banner" },
-});
-
-export const Dialog = meta.story({
- args: { variant: "dialog" },
-});
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.tsx
deleted file mode 100644
index 4fc4f5f3cc..0000000000
--- a/web/src/features/ai-gateway/components/GatewayLaunch/GatewayReceipt.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { cn } from "@/src/utils/tailwind";
-
-type ReceiptRow = {
- label: string;
- amount: string;
- kind: "team" | "person";
- highlight?: boolean;
-};
-
-const fullRows: ReceiptRow[] = [
- { label: "ENGINEERING", amount: "$48,215.40", kind: "team", highlight: true },
- { label: "@maya · claude code", amount: "$21,402.10", kind: "person" },
- { label: "@priya · claude code", amount: "$13,852.45", kind: "person" },
- { label: "SUPPORT", amount: "$6,904.22", kind: "team" },
- { label: "support-bot · haiku", amount: "$6,904.22", kind: "person" },
-];
-
-/** Illustrative spend receipt for the AI Gateway launch surfaces. */
-export function GatewayReceipt({ variant }: { variant: "banner" | "dialog" }) {
- const rows = fullRows;
-
- return (
- <div
- aria-hidden="true"
- className={cn(
- "bg-background text-foreground font-mono shadow-lg select-none",
- "text-2xs -rotate-2 px-4 pt-4 pb-5",
- )}
- >
- {variant !== "banner" && (
- <div className="text-muted-foreground border-border mb-2 flex justify-between border-b border-dashed pb-2 tracking-widest">
- <span>AI GATEWAY</span>
- {variant === "dialog" && <span>OCT 2026</span>}
- </div>
- )}
- <div className="flex flex-col gap-1">
- {rows.map((row) => (
- <div
- key={row.label}
- className={cn(
- "flex justify-between gap-3",
- row.kind === "team"
- ? "font-bold tracking-wide"
- : "text-muted-foreground pl-3",
- row.kind === "team" && row !== rows[0] && "mt-2",
- row.highlight && "bg-light-blue -mx-1 px-1",
- )}
- >
- <span className="whitespace-nowrap">{row.label}</span>
- <span>{row.amount}</span>
- </div>
- ))}
- </div>
- </div>
- );
-}
diff --git a/web/src/features/ai-gateway/components/GatewayLaunch/GatewaySwitchboard.tsx b/web/src/features/ai-gateway/components/GatewayLaunch/GatewaySwitchboard.tsx
new file mode 100644
index 0000000000..e14aa9bf6c
--- /dev/null
+++ b/web/src/features/ai-gateway/components/GatewayLaunch/GatewaySwitchboard.tsx
@@ -0,0 +1,223 @@
+import { SiAnthropic, SiOpenai } from "@langfuse/icons/si";
+import { useId } from "react";
+
+import { env } from "@/src/env.mjs";
+
+const HERO_FAN = [
+ { d: "M-20 4C128 4,174 127.2,222 144", opacity: 0.36 },
+ { d: "M-20 32C135.4 32,174 130.6,222 144", opacity: 0.52 },
+ { d: "M-20 60C119 60,174 133.9,222 144", opacity: 0.66 },
+ { d: "M-20 88C123.3 88,174 137.3,222 144", opacity: 0.42 },
+ { d: "M-20 116C121.7 116,174 140.6,222 144", opacity: 0.46 },
+ { d: "M-20 144C135.9 144,174 144,222 144", opacity: 0.44 },
+ { d: "M-20 172C123.7 172,174 147.4,222 144", opacity: 0.38 },
+ { d: "M-20 200C125.1 200,174 150.7,222 144", opacity: 0.67 },
+ { d: "M-20 228C113 228,174 154.1,222 144", opacity: 0.49 },
+ { d: "M-20 256C132.8 256,174 157.4,222 144", opacity: 0.68 },
+ { d: "M-20 284C123.2 284,174 160.8,222 144", opacity: 0.36 },
+];
+
+const BANNER_FAN = [
+ "M0 14.7C49.6 14.7,70 44,92 48",
+ "M0 28C54.3 28,70 45.6,92 48",
+ "M0 41.3C51 41.3,70 47.2,92 48",
+ "M0 54.7C55 54.7,70 48.8,92 48",
+ "M0 68C53.9 68,70 50.4,92 48",
+ "M0 81.3C52.5 81.3,70 52,92 48",
+];
+
+const PROVIDERS = [
+ { label: "Anthropic", Icon: SiAnthropic },
+ { label: "OpenAI", Icon: SiOpenai },
+];
+
+const iconSrc = `${env.NEXT_PUBLIC_BASE_PATH ?? ""}/icon.svg`;
+
+/** Illustration: many lines enter one Langfuse point, which routes to the enabled providers. */
+export function GatewaySwitchboard({
+ variant,
+}: {
+ variant: "dialog" | "banner";
+}) {
+ if (variant === "banner") return <BannerSwitchboard />;
+ return <DialogSwitchboard />;
+}
+
+function DialogSwitchboard() {
+ return (
+ <svg
+ viewBox="0 0 640 288"
+ preserveAspectRatio="xMidYMid slice"
+ className="h-full w-full"
+ aria-hidden="true"
+ >
+ {HERO_FAN.map(({ d, opacity }) => (
+ <path
+ key={d}
+ d={d}
+ fill="none"
+ strokeWidth={1}
+ strokeLinecap="round"
+ strokeOpacity={opacity}
+ className="stroke-muted-foreground"
+ />
+ ))}
+ {PROVIDERS.map(({ label, Icon }, index) => {
+ const y = 94 + index * 50;
+ return (
+ <g key={label}>
+ <path
+ d={`M266 144C310 144,310 ${y},354 ${y}`}
+ fill="none"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ className="stroke-foreground"
+ />
+ <rect
+ x={354}
+ y={y - 15}
+ width={200}
+ height={30}
+ rx={4}
+ className="fill-background stroke-border"
+ />
+ <Icon size="base" color="foreground" x={364} y={y - 7} />
+ <text
+ x={385}
+ y={y + 4}
+ fontSize={12}
+ className="fill-foreground font-mono"
+ >
+ {label}
+ </text>
+ <rect
+ x={518}
+ y={y - 6}
+ width={21}
+ height={12}
+ rx={6}
+ className="fill-foreground"
+ />
+ <circle cx={533} cy={y} r={4.5} className="fill-surface-section" />
+ </g>
+ );
+ })}
+ <path
+ d="M266 144C310 144,310 194,354 194"
+ fill="none"
+ strokeWidth={1.25}
+ strokeLinecap="round"
+ strokeDasharray="3 4"
+ className="stroke-muted-foreground"
+ />
+ <rect
+ x={354}
+ y={179}
+ width={200}
+ height={30}
+ rx={4}
+ className="fill-background stroke-border"
+ />
+ <text
+ x={364}
+ y={198}
+ fontSize={12}
+ className="fill-muted-foreground font-mono"
+ >
+ More soon
+ </text>
+ <rect
+ x={518}
+ y={188}
+ width={21}
+ height={12}
+ rx={6}
+ className="fill-border"
+ />
+ <circle cx={524} cy={194} r={4.5} className="fill-surface-section" />
+ <circle cx={244} cy={144} r={21} className="fill-surface-section" />
+ <image href={iconSrc} x={220} y={120} width={48} height={48} />
+ </svg>
+ );
+}
+
+function BannerSwitchboard() {
+ const gradientId = useId();
+ return (
+ <svg viewBox="0 0 290 96" className="h-full w-full" aria-hidden="true">
+ <defs>
+ <linearGradient
+ id={gradientId}
+ gradientUnits="userSpaceOnUse"
+ x1={0}
+ y1={0}
+ x2={92}
+ y2={0}
+ >
+ <stop
+ offset={0}
+ stopOpacity={0.08}
+ style={{ stopColor: "hsl(var(--foreground))" }}
+ />
+ <stop
+ offset={1}
+ stopOpacity={0.55}
+ style={{ stopColor: "hsl(var(--foreground))" }}
+ />
+ </linearGradient>
+ </defs>
+ {BANNER_FAN.map((d) => (
+ <path
+ key={d}
+ d={d}
+ fill="none"
+ stroke={`url(#${gradientId})`}
+ strokeWidth={1.1}
+ strokeLinecap="round"
+ />
+ ))}
+ {PROVIDERS.map(({ label, Icon }, index) => {
+ const y = 30 + index * 36;
+ return (
+ <g key={label}>
+ <path
+ d={`M116 48C127 48,127 ${y},138 ${y}`}
+ fill="none"
+ strokeWidth={1.1}
+ strokeLinecap="round"
+ className="stroke-muted-foreground"
+ />
+ <rect
+ x={138}
+ y={y - 11}
+ width={118}
+ height={22}
+ rx={4}
+ className="fill-background stroke-border"
+ />
+ <Icon size="sm" color="foreground" x={145} y={y - 6} />
+ <text
+ x={161}
+ y={y + 3.3}
+ fontSize={10}
+ className="fill-foreground font-mono"
+ >
+ {label}
+ </text>
+ <rect
+ x={228}
+ y={y - 5.6}
+ width={19.6}
+ height={11.2}
+ rx={5.6}
+ className="fill-foreground"
+ />
+ <circle cx={242} cy={y} r={4.2} className="fill-surface-section" />
+ </g>
+ );
+ })}
+ <circle cx={104} cy={48} r={10.5} className="fill-surface-section" />
+ <image href={iconSrc} x={92} y={36} width={24} height={24} />
+ </svg>
+ );
+}