🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
refactor(web): Migrate `Alert` component (#16852)
Ben Bachem44f10dc5927b
diff --git a/.agents/skills/react-component-cleaner/references/component-cleanup-todolist.md b/.agents/skills/react-component-cleaner/references/component-cleanup-todolist.mdindex ab5ca33cac..033d8cd4b6 100644--- a/.agents/skills/react-component-cleaner/references/component-cleanup-todolist.md+++ b/.agents/skills/react-component-cleaner/references/component-cleanup-todolist.md@@ -31,15 +31,51 @@ Next, check if there are dependent props that could be combined into a discriminLastly, tighten the interface by using the `sweepy` cli's `narrow-props` command. COMMIT.-## Step 3: Audit the changes+## Step 3: Audit composite components++If the component belongs to a composite API, identify all publicly exported members of that API, such as `Avatar`, `AvatarImage`, and `AvatarFallback`.++Clean every member before changing the composite API:++1. Keep the existing exports and composition syntax intact.+2. Complete Steps 1 and 2 for each member, working from leaf components to the root component.+3. Audit and update that member's callsites before moving to the next member.+4. Do not evaluate collapsing the API until every member has been cleaned.++Afterward, audit all callsites to decide whether the composition is meaningful.++Collapse the API only when:++- The members always represent one fixed domain concept.+- Callers do not meaningfully control their structure, order, or lifecycle.+- Usage differences can be expressed clearly through a small set of semantic parent props.+- Collapsing preserves behavior, semantics, accessibility, event handling, and required ref access.++If these conditions hold, replace the composite API with one component and update all callsites. COMMIT.++Keep the composite API when callers meaningfully:++- Reorder, omit, repeat, or insert children.+- Configure child-specific behavior.+- Attach handlers or refs to individual members.+- Use the members as extension points.+- Collapsing would make heavy use of slots or render props.++Component files may export only a single component. When keeping a composite+API, use `Object.assign` to expose subcomponents through the exported component,+such as `Alert.Title` and `Alert.Description`, instead of separate component+exports such as `AlertTitle` and `AlertDescription`. Update all callsites.+COMMIT.++## Step 4: Audit the changesAudit the changes and check if the updated callsites are still valid in terms of positioning & HTML semantics. If there are any issues, present the user with options on how to resolve them.-## Step 4: Document the component+## Step 5: Document the componentCreate a storybook story for the component if it does not exist. Check the repository for guidance like a skill or documentation around this first. COMMIT.-## Step 5: Final report+## Step 6: Final reportAfter all the above steps have been completed, re-check the component against the [react-component-guidelines](../../react-component-guidelines/SKILL.md), then provide a report to the user. Include the changes that were made and the remaining violations, if any.For every callsite of the component that was updated, provide a detailed guide on how to view the changes in the application.diff --git a/web/.storybook/main.ts b/web/.storybook/main.tsindex b5ac461a1f..3089ee8e74 100644--- a/web/.storybook/main.ts+++ b/web/.storybook/main.ts@@ -11,6 +11,7 @@ import {const STORY_EXTENSIONS = "@(js|jsx|mjs|ts|tsx)";const DESIGN_COMPONENT_STORIES = [+ "Alert/Alert","Avatar/Avatar","Badge/Badge","Callout/Callout",diff --git a/web/src/components/design-system/Alert/Alert.stories.tsx b/web/src/components/design-system/Alert/Alert.stories.tsxnew file mode 100644index 0000000000..93d87c0781--- /dev/null+++ b/web/src/components/design-system/Alert/Alert.stories.tsx@@ -0,0 +1,122 @@+import React from "react";+import { AlertTriangle, Info, X } from "lucide-react";+import { expect, fn, userEvent, within } from "storybook/test";++import preview from "../../../../.storybook/preview";+import { Alert } from "./Alert";++type Variant = NonNullable<React.ComponentProps<typeof Alert>["variant"]>;+type Size = NonNullable<React.ComponentProps<typeof Alert>["size"]>;++const meta = preview.meta({+ component: Alert,+});++const variants = Object.keys({+ default: true,+ destructive: true,+ info: true,+ warning: true,+} satisfies Record<Variant, true>) as Variant[];++const sizes = Object.keys({+ default: true,+ sm: true,+} satisfies Record<Size, true>) as Size[];++const dismiss = fn();++const dismissibleChildren = (+ <>+ <button+ type="button"+ className="absolute top-2.5 right-2.5 grid size-7 cursor-pointer place-items-center rounded-sm border-none bg-transparent"+ aria-label="Dismiss alert"+ onClick={dismiss}+ >+ <X className="size-4" aria-hidden="true" />+ </button>+ <Alert.Title>Review required</Alert.Title>+ <Alert.Description>Check this warning before continuing.</Alert.Description>+ </>+);++export const Default = meta.story({+ args: {+ icon: Info,+ children: (+ <>+ <Alert.Title>Information</Alert.Title>+ <Alert.Description>This is an informational alert.</Alert.Description>+ </>+ ),+ },+});++export const Iconless = meta.story({+ args: {+ children: (+ <>+ <Alert.Title>Information</Alert.Title>+ <Alert.Description>This alert has no leading icon.</Alert.Description>+ </>+ ),+ },+});++export const VariantMatrix = meta.story({+ parameters: {+ controls: {+ disable: true,+ },+ },+ render: () => (+ <div className="grid w-[600px] gap-4">+ {variants.map((variant) =>+ sizes.map((size) => (+ <Alert+ key={`${variant}-${size}`}+ variant={variant}+ size={size}+ icon={AlertTriangle}+ >+ <Alert.Title>+ {variant} / {size}+ </Alert.Title>+ <Alert.Description>+ Alert content remains composable across variants and sizes.+ </Alert.Description>+ </Alert>+ )),+ )}+ </div>+ ),+});++export const DismissAction = meta.story({+ name: "(Test) Dismiss Action",+ args: {+ actionPosition: "top-right",+ children: dismissibleChildren,+ icon: AlertTriangle,+ variant: "warning",+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const alert = canvas.getByRole("alert");+ const icon = alert.querySelector('[data-slot="alert-icon"]');+ const dismissButton = canvas.getByRole("button", { name: "Dismiss alert" });++ await expect(alert).toHaveClass("pr-10");+ await expect(alert.className).not.toContain("[&>svg");+ await expect(alert).toHaveClass(+ "[&>[data-slot=alert-icon]]:top-3",+ "[&>[data-slot=alert-icon]]:left-3",+ );+ await expect(icon).toHaveClass("absolute", "size-4");+ await expect(icon).toHaveAttribute("aria-hidden", "true");+ await expect(dismissButton).not.toHaveClass("pl-6");+ await userEvent.click(dismissButton);+ await expect(dismiss).toHaveBeenCalledOnce();+ },+});diff --git a/web/src/components/design-system/Alert/Alert.tsx b/web/src/components/design-system/Alert/Alert.tsxnew file mode 100644index 0000000000..2fd18f963b--- /dev/null+++ b/web/src/components/design-system/Alert/Alert.tsx@@ -0,0 +1,109 @@+import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { type LucideIcon } from "lucide-react";++type AlertContent = Exclude<React.ReactNode, null | undefined | boolean>;++const alertVariants = cva(+ "relative w-full border [&>[data-slot=alert-icon]]:text-foreground [&>[data-slot=alert-title]]:mb-1",+ {+ variants: {+ variant: {+ default: "bg-background text-foreground",+ destructive:+ "border-destructive/50 text-destructive dark:border-destructive [&>[data-slot=alert-icon]]:text-destructive",+ info: "bg-light-blue border-dark-blue",+ warning:+ "border-dark-yellow bg-light-yellow text-dark-yellow [&>[data-slot=alert-icon]]:text-dark-yellow",+ },+ size: {+ default:+ "rounded-lg p-3 [&>[data-slot=alert-icon]]:top-3 [&>[data-slot=alert-icon]]:left-3",+ sm: "rounded-md p-2 [&>[data-slot=alert-icon]]:top-2 [&>[data-slot=alert-icon]]:left-2 [&>[data-slot=alert-title]]:text-sm [&>[data-slot=alert-description]]:text-xs",+ },+ actionPosition: {+ "top-right": "pr-10",+ },+ hasIcon: {+ true: "[&>[data-slot=alert-title]]:pl-6 [&>[data-slot=alert-description]]:pl-6 [&>[data-slot=alert-icon]+[data-slot=alert-description]]:translate-y-[-3px]",+ },+ },+ defaultVariants: {+ variant: "default",+ size: "default",+ },+ },+);++type AlertProps = Pick<+ VariantProps<typeof alertVariants>,+ "actionPosition" | "size" | "variant"+> & {+ children: AlertContent;+ icon?: LucideIcon;+};+type AlertTitleProps = {+ children: React.ReactNode;+};++function AlertRoot({+ actionPosition,+ children,+ icon: Icon,+ size,+ variant,+}: AlertProps) {+ return (+ <div+ role="alert"+ className={alertVariants({+ actionPosition,+ hasIcon: Boolean(Icon),+ size,+ variant,+ })}+ >+ {Icon ? (+ <Icon+ data-slot="alert-icon"+ className="absolute size-4"+ aria-hidden="true"+ />+ ) : null}+ {children}+ </div>+ );+}++type AlertDescriptionProps = {+ children: React.ReactNode;+};++function AlertTitle({ children }: AlertTitleProps) {+ return (+ <h5+ data-slot="alert-title"+ className="leading-none font-bold tracking-tight"+ >+ {children}+ </h5>+ );+}++function AlertDescription({ children }: AlertDescriptionProps) {+ return (+ <div+ data-slot="alert-description"+ className="text-sm [&_p]:leading-relaxed"+ >+ {children}+ </div>+ );+}++const Alert = Object.assign(AlertRoot, {+ Title: AlertTitle,+ Description: AlertDescription,+});++export { Alert };diff --git a/web/src/components/design-system/Callout/Callout.tsx b/web/src/components/design-system/Callout/Callout.tsxindex 0e3948468d..0cd3cb1c58 100644--- a/web/src/components/design-system/Callout/Callout.tsx+++ b/web/src/components/design-system/Callout/Callout.tsx@@ -4,7 +4,6 @@import { cva } from "class-variance-authority";import { X } from "lucide-react";-import { AlertDescription } from "@/src/components/ui/alert";import { Button } from "@/src/components/ui/button";const calloutVariants = cva("relative w-full rounded-lg border p-3", {@@ -26,14 +25,17 @@ const contentVariants = cva("flex min-w-0 flex-1 flex-col gap-2", {},});-const descriptionVariants = cva("ml-1 flex items-start gap-2", {- variants: {- align: {- top: null,- middle: "sm:items-center",+const descriptionVariants = cva(+ "ml-1 flex items-start gap-2 text-sm [&_p]:leading-relaxed",+ {+ variants: {+ align: {+ top: null,+ middle: "sm:items-center",+ },},},-});+);export type CalloutProps = {variant: "info" | "warning";@@ -52,7 +54,7 @@ export function Callout({}: CalloutProps) {return (<div role="alert" className={calloutVariants({ variant })}>- <AlertDescription className={descriptionVariants({ align })}>+ <div className={descriptionVariants({ align })}><divclassName={`${contentVariants({ align })} sm:flex-row sm:justify-between`}>@@ -72,7 +74,7 @@ export function Callout({><X className="h-4 w-4" /></Button>- </AlertDescription>+ </div></div>);}diff --git a/web/src/components/design-system/README.md b/web/src/components/design-system/README.mdindex 8887ead822..b45dd6b748 100644--- a/web/src/components/design-system/README.md+++ b/web/src/components/design-system/README.md@@ -28,7 +28,7 @@ Design-system files may import other design-system files, shared utilities (`src### Structure-- One component per file+- Only a single component export per file- Folder name = component name```@@ -38,6 +38,30 @@ design-system/Button.stories.tsx```+Components with subcomponents must expose them through the single exported+component using `Object.assign`:++```tsx+// ✅ Single component export with compound subcomponents+const Alert = Object.assign(AlertRoot, {+ Title: AlertTitle,+ Description: AlertDescription,+});++export { Alert };++<Alert>+ <Alert.Title>Title</Alert.Title>+ <Alert.Description>Description</Alert.Description>+</Alert>++// ❌ Separate component exports+<Alert>+ <AlertTitle>Title</AlertTitle>+ <AlertDescription>Description</AlertDescription>+</Alert>+```+---### Styling & Variants@@ -117,7 +141,7 @@ const PromiseButton = (props: PromiseButtonProps) => {## Summary (strict)-- 1 component per file+- A single component export per file- No `className` / `style`- No px / hex values as props- Use enums + `cva`diff --git a/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx b/web/src/components/onboarding/AnnotationQueuesOnboarding.tsxindex d3cf3b85b6..205b61e271 100644--- a/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx+++ b/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx@@ -1,4 +1,3 @@-import React from "react";import {SplashScreen,type ValueProposition,@@ -16,25 +15,25 @@ export function AnnotationQueuesOnboarding({title: "Manage scoring workflows",description:"Create and manage annotation queues to streamline your scoring workflows",- icon: <ClipboardCheck className="h-4 w-4" />,+ icon: ClipboardCheck,},{title: "Collaborate with annotators",description:"Invite team members to annotate and evaluate your LLM outputs",- icon: <Users className="h-4 w-4" />,+ icon: Users,},{title: "Track annotation metrics",description:"Monitor annotation progress and quality metrics across your team",- icon: <BarChart4 className="h-4 w-4" />,+ icon: BarChart4,},{title: "Baseline evaluation efforts",description:"Use annotation data as a baseline to evaluate your other evaluation metrics",- icon: <GitMerge className="h-4 w-4" />,+ icon: GitMerge,},];diff --git a/web/src/components/onboarding/DatasetsOnboarding.tsx b/web/src/components/onboarding/DatasetsOnboarding.tsxindex e8d5419807..5e645cedc1 100644--- a/web/src/components/onboarding/DatasetsOnboarding.tsx+++ b/web/src/components/onboarding/DatasetsOnboarding.tsx@@ -1,4 +1,3 @@-import React from "react";import {SplashScreen,type ValueProposition,@@ -14,24 +13,24 @@ export function DatasetsOnboarding({ projectId }: { projectId: string }) {title: "Continuous improvement",description:"Create datasets from production edge cases to improve your application",- icon: <Zap className="h-4 w-4" />,+ icon: Zap,},{title: "Pre-deployment testing",description: "Benchmark new releases before deploying to production",- icon: <Beaker className="h-4 w-4" />,+ icon: Beaker,},{title: "Structured testing",description:"Run experiments on collections of inputs and expected outputs",- icon: <Database className="h-4 w-4" />,+ icon: Database,},{title: "Custom workflows",description:"Build custom workflows around your datasets via the API and SDKs, e.g. for fine-tuning, few-shotting",- icon: <Code className="h-4 w-4" />,+ icon: Code,},];diff --git a/web/src/components/onboarding/PromptsOnboarding.tsx b/web/src/components/onboarding/PromptsOnboarding.tsxindex 174e6e46df..ccfe4fc507 100644--- a/web/src/components/onboarding/PromptsOnboarding.tsx+++ b/web/src/components/onboarding/PromptsOnboarding.tsx@@ -1,4 +1,3 @@-import React from "react";import {SplashScreen,type ValueProposition,@@ -11,25 +10,25 @@ export function PromptsOnboarding({ projectId }: { projectId: string }) {title: "Decoupled from code",description:"Deploy new prompts without application redeployment, making updates faster and easier",- icon: <FileText className="h-4 w-4" />,+ icon: FileText,},{title: "Edit in UI or programmatically",description:"Non-technical users can easily edit prompts in the UI. Developers can optionally update prompts programmatically via the API and SDKs",- icon: <GitBranch className="h-4 w-4" />,+ icon: GitBranch,},{title: "Performance optimized",description:"Client-side caching prevents latency or availability issues for your applications",- icon: <Zap className="h-4 w-4" />,+ icon: Zap,},{title: "Compare metrics",description:"Track latency, cost, and evaluation metrics across different prompt versions",- icon: <BarChart4 className="h-4 w-4" />,+ icon: BarChart4,},];diff --git a/web/src/components/onboarding/ScoresOnboarding.tsx b/web/src/components/onboarding/ScoresOnboarding.tsxindex 502e2d942d..4e03891c99 100644--- a/web/src/components/onboarding/ScoresOnboarding.tsx+++ b/web/src/components/onboarding/ScoresOnboarding.tsx@@ -1,4 +1,3 @@-import React from "react";import {SplashScreen,type ValueProposition,@@ -11,25 +10,25 @@ export function ScoresOnboarding() {title: "Collect user feedback",description:"Gather thumbs up/down feedback from users to identify high and low quality outputs",- icon: <ThumbsUp className="h-4 w-4" />,+ icon: ThumbsUp,},{title: "Run model-based evaluations",description:"Use LLMs to automatically evaluate your application's outputs",- icon: <Star className="h-4 w-4" />,+ icon: Star,},{title: "Track quality metrics",description:"Monitor quality metrics over time to identify trends and issues",- icon: <LineChart className="h-4 w-4" />,+ icon: LineChart,},{title: "Use custom metrics",description:"Langfuse's scores are flexible and can be used to track any metric that's associated with an LLM application",- icon: <Code className="h-4 w-4" />,+ icon: Code,},];diff --git a/web/src/components/onboarding/components/EvaluatorsOnboardingView/EvaluatorsOnboardingView.tsx b/web/src/components/onboarding/components/EvaluatorsOnboardingView/EvaluatorsOnboardingView.tsxindex 47a5c5a7a5..275bb4a020 100644--- a/web/src/components/onboarding/components/EvaluatorsOnboardingView/EvaluatorsOnboardingView.tsx+++ b/web/src/components/onboarding/components/EvaluatorsOnboardingView/EvaluatorsOnboardingView.tsx@@ -11,25 +11,25 @@ const llmAsJudgeValuePropositions: ValueProposition[] = [title: "Automate evaluations",description:"Use LLM-as-a-judge to automatically evaluate your traces without manual review",- icon: <Bot className="h-4 w-4" />,+ icon: Bot,},{title: "Measure quality",description:"Create custom evaluation criteria to measure the quality of your LLM outputs",- icon: <Gauge className="h-4 w-4" />,+ icon: Gauge,},{title: "Scale efficiently",description:"Evaluate thousands of traces automatically with customizable sampling rates",- icon: <Zap className="h-4 w-4" />,+ icon: Zap,},{title: "Track performance",description:"Monitor evaluation metrics over time to identify trends and improvements",- icon: <BarChart4 className="h-4 w-4" />,+ icon: BarChart4,},];diff --git a/web/src/components/table/peek/peek-evaluator-config-detail.tsx b/web/src/components/table/peek/peek-evaluator-config-detail.tsxindex 1c29751fd5..2cb54f839d 100644--- a/web/src/components/table/peek/peek-evaluator-config-detail.tsx+++ b/web/src/components/table/peek/peek-evaluator-config-detail.tsx@@ -28,7 +28,7 @@ import { useLazyEvaluatorExecutionCounts } from "@/src/features/evals/hooks/useLimport { TablePeekView } from "@/src/components/table/peek";import { LangfuseIcon } from "@/src/components/design-system/LangfuseIcon/LangfuseIcon";import { useEvalCapabilities } from "@/src/features/evals/hooks/useEvalCapabilities";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";const PeekViewEvaluatorConfigDetail = ({projectId,@@ -136,14 +136,13 @@ const PeekViewEvaluatorConfigDetail = ({</div>{showLegacyReadOnlyNotice ? (- <Alert className="border-light-yellow bg-light-yellow text-dark-yellow [&>svg]:text-dark-yellow">- <AlertTriangle className="h-4 w-4" />- <AlertTitle>Legacy evaluator is read-only</AlertTitle>- <AlertDescription>+ <Alert variant="warning" icon={AlertTriangle}>+ <Alert.Title>Legacy evaluator is read-only</Alert.Title>+ <Alert.Description>This evaluator uses a legacy target that the current rule editorcannot represent safely. You can review or delete it here, but itcannot be edited or reactivated.- </AlertDescription>+ </Alert.Description></Alert>) : null}</div>@@ -204,13 +203,12 @@ const PeekViewEvaluatorConfigDetail = ({}}/>) : (- <Alert>- <AlertTriangle className="h-4 w-4" />- <AlertTitle>Referenced evaluator unavailable</AlertTitle>- <AlertDescription>+ <Alert icon={AlertTriangle}>+ <Alert.Title>Referenced evaluator unavailable</Alert.Title>+ <Alert.Description>This legacy rule no longer has an evaluator attached, so itsevaluator configuration cannot be displayed.- </AlertDescription>+ </Alert.Description></Alert>)}</div>diff --git a/web/src/components/ui/alert.tsx b/web/src/components/ui/alert.tsxdeleted file mode 100644index 83c69b86e8..0000000000--- a/web/src/components/ui/alert.tsx+++ /dev/null@@ -1,61 +0,0 @@-/* eslint-disable @repo/no-style-props */-import * as React from "react";-import { cva, type VariantProps } from "class-variance-authority";--import { cn } from "@/src/utils/tailwind";--const alertVariants = cva(- "relative w-full rounded-lg border p-3 [&>svg~*]:pl-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-3 [&>svg]:top-3 [&>svg]:text-foreground",- {- variants: {- variant: {- default: "bg-background text-foreground",- destructive:- "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",- info: "bg-light-blue border-dark-blue",- },- },- defaultVariants: {- variant: "default",- },- },-);--const Alert = React.forwardRef<- HTMLDivElement,- React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>->(({ className, variant, ...props }, ref) => (- <div- ref={ref}- role="alert"- className={cn(alertVariants({ variant }), className)}- {...props}- />-));-Alert.displayName = "Alert";--const AlertTitle = React.forwardRef<- HTMLParagraphElement,- React.HTMLAttributes<HTMLHeadingElement>->(({ className, ...props }, ref) => (- <h5- ref={ref}- className={cn("mb-1 leading-none font-bold tracking-tight", className)}- {...props}- />-));-AlertTitle.displayName = "AlertTitle";--const AlertDescription = React.forwardRef<- HTMLParagraphElement,- React.HTMLAttributes<HTMLParagraphElement>->(({ className, ...props }, ref) => (- <div- ref={ref}- className={cn("text-sm [&_p]:leading-relaxed", className)}- {...props}- />-));-AlertDescription.displayName = "AlertDescription";--export { Alert, AlertTitle, AlertDescription };diff --git a/web/src/components/ui/splash-screen.tsx b/web/src/components/ui/splash-screen.tsxindex 0b9a3a4b5c..9cc4c54926 100644--- a/web/src/components/ui/splash-screen.tsx+++ b/web/src/components/ui/splash-screen.tsx@@ -1,15 +1,15 @@import React, { useState } from "react";import { cn } from "@/src/utils/tailwind";import Image from "next/image";-import { InfoIcon } from "lucide-react";+import { InfoIcon, type LucideIcon } from "lucide-react";import { ActionButton } from "@/src/components/ActionButton";-import { Alert, AlertTitle, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { StatusBadge } from "@/src/components/ui/StatusBadge/StatusBadge";export interface ValueProposition {title: string;description: string;- icon?: React.ReactNode;+ icon?: LucideIcon;}export interface ActionConfig {@@ -146,11 +146,12 @@ export function SplashScreen({</div>{gettingStarted && (- <Alert className="w-full max-w-3xl">- <InfoIcon className="mr-2 h-4 w-4" />- <AlertTitle>Getting Started</AlertTitle>- <AlertDescription>{gettingStarted}</AlertDescription>- </Alert>+ <div className="w-full max-w-3xl">+ <Alert icon={InfoIcon}>+ <Alert.Title>Getting Started</Alert.Title>+ <Alert.Description>{gettingStarted}</Alert.Description>+ </Alert>+ </div>)}{videoPosition === "top" && mediaBlock}@@ -197,10 +198,9 @@ export function SplashScreen({{valuePropositions.length > 0 && (<div className="my-6 grid w-full max-w-3xl grid-cols-1 gap-4 md:grid-cols-2">{valuePropositions.map((prop, index) => (- <Alert key={index}>- {prop.icon}- <AlertTitle>{prop.title}</AlertTitle>- <AlertDescription>{prop.description}</AlertDescription>+ <Alert key={index} icon={prop.icon}>+ <Alert.Title>{prop.title}</Alert.Title>+ <Alert.Description>{prop.description}</Alert.Description></Alert>))}</div>diff --git a/web/src/ee/features/audit-log-viewer/AuditLogsSettingsPage.tsx b/web/src/ee/features/audit-log-viewer/AuditLogsSettingsPage.tsxindex 3adc629caf..8a7d057a65 100644--- a/web/src/ee/features/audit-log-viewer/AuditLogsSettingsPage.tsx+++ b/web/src/ee/features/audit-log-viewer/AuditLogsSettingsPage.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { AuditLogsTable } from "@/src/ee/features/audit-log-viewer/AuditLogsTable";import { useHasEntitlement } from "@/src/features/entitlements/hooks";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";@@ -18,10 +18,10 @@ export function AuditLogsSettingsPage(props: { projectId: string }) {</p>) : !hasAccess ? (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>Contact your project administrator to request access.- </AlertDescription>+ </Alert.Description></Alert>) : (<AuditLogsTable scope="project" projectId={props.projectId} />diff --git a/web/src/ee/features/audit-log-viewer/OrgAuditLogsSettingsPage.tsx b/web/src/ee/features/audit-log-viewer/OrgAuditLogsSettingsPage.tsxindex b6be5eecca..68086e5ce0 100644--- a/web/src/ee/features/audit-log-viewer/OrgAuditLogsSettingsPage.tsx+++ b/web/src/ee/features/audit-log-viewer/OrgAuditLogsSettingsPage.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { AuditLogsTable } from "@/src/ee/features/audit-log-viewer/AuditLogsTable";import { useHasEntitlement } from "@/src/features/entitlements/hooks";import { useHasOrganizationAccess } from "@/src/features/rbac/utils/checkOrganizationAccess";@@ -18,10 +18,10 @@ export function OrgAuditLogsSettingsPage(props: { orgId: string }) {</p>) : !hasAccess ? (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>Contact your organization administrator to request access.- </AlertDescription>+ </Alert.Description></Alert>) : (<AuditLogsTable scope="organization" orgId={props.orgId} />diff --git a/web/src/ee/features/billing/components/BillingSettings.tsx b/web/src/ee/features/billing/components/BillingSettings.tsxindex c2d3fb2a8f..9dbdc8a6cc 100644--- a/web/src/ee/features/billing/components/BillingSettings.tsx+++ b/web/src/ee/features/billing/components/BillingSettings.tsx@@ -4,7 +4,7 @@ import Header from "@/src/components/layouts/header";import { useHasEntitlement } from "@/src/features/entitlements/hooks";import { useRouter } from "next/router";import { useHasOrganizationAccess } from "@/src/features/rbac/utils/checkOrganizationAccess";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { BillingUsageChart } from "./BillingUsageChart";import { BillingActionButtons } from "./BillingActionButtons";@@ -42,11 +42,11 @@ export const BillingSettings = () => {if (!hasAccess) {return (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view the billing settings of thisorganization.- </AlertDescription>+ </Alert.Description></Alert>);}diff --git a/web/src/ee/features/billing/components/SupportOrUpgradePage.tsx b/web/src/ee/features/billing/components/SupportOrUpgradePage.tsxindex edb5a7660b..cbf3a4bd11 100644--- a/web/src/ee/features/billing/components/SupportOrUpgradePage.tsx+++ b/web/src/ee/features/billing/components/SupportOrUpgradePage.tsx@@ -1,20 +1,19 @@import { AlertCircle } from "lucide-react";-import { Alert, AlertTitle, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";export const SupportOrUpgradePage = () => {return (<div className="flex h-full w-full items-center justify-center p-6"><div className="w-full max-w-md">- <Alert>- <AlertCircle className="h-4 w-4" />- <AlertTitle>Access Restricted</AlertTitle>- <AlertDescription>+ <Alert icon={AlertCircle}>+ <Alert.Title>Access Restricted</Alert.Title>+ <Alert.Description><p className="mb-2">This feature requires additional permissions</p><p>Contact your system/project administrator for access or upgradeyour plan. Need help? Reach out to support.</p>- </AlertDescription>+ </Alert.Description></Alert></div></div>diff --git a/web/src/ee/features/sso-settings/components/SSOSettings.tsx b/web/src/ee/features/sso-settings/components/SSOSettings.tsxindex dbc429ba98..b45be05607 100644--- a/web/src/ee/features/sso-settings/components/SSOSettings.tsx+++ b/web/src/ee/features/sso-settings/components/SSOSettings.tsx@@ -1,5 +1,5 @@/* eslint-disable @repo/no-abstracted-overlay-trigger */-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import {AlertDialog,AlertDialogAction,@@ -149,13 +149,12 @@ export const SSOSettings = ({ orgId }: { orgId: string }) => {<VerifiedDomainsSettings orgId={orgId} /><div>{heading}- <Alert>- <AlertCircle className="h-4 w-4" />- <AlertTitle>Not available</AlertTitle>- <AlertDescription>+ <Alert icon={AlertCircle}>+ <Alert.Title>Not available</Alert.Title>+ <Alert.Description>Enterprise SSO is not available on your plan. Please upgrade toaccess this feature.- </AlertDescription>+ </Alert.Description></Alert></div></div>@@ -169,10 +168,10 @@ export const SSOSettings = ({ orgId }: { orgId: string }) => {<div>{heading}<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to configure SSO for this organization.- </AlertDescription>+ </Alert.Description></Alert></div></div>diff --git a/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx b/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsxindex feadac0540..fd9c766205 100644--- a/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx+++ b/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx@@ -1,5 +1,5 @@/* eslint-disable @repo/no-abstracted-overlay-trigger */-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import {AlertDialog,AlertDialogAction,@@ -92,13 +92,12 @@ export const VerifiedDomainsSettings = ({ orgId }: { orgId: string }) => {return (<div>{heading}- <Alert>- <AlertCircle className="h-4 w-4" />- <AlertTitle>Not available</AlertTitle>- <AlertDescription>+ <Alert icon={AlertCircle}>+ <Alert.Title>Not available</Alert.Title>+ <Alert.Description>Verified Domains and Enterprise SSO are not available on your plan.Please upgrade to access this feature.- </AlertDescription>+ </Alert.Description></Alert></div>);@@ -109,11 +108,11 @@ export const VerifiedDomainsSettings = ({ orgId }: { orgId: string }) => {<div>{heading}<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to manage verified domains for thisorganization.- </AlertDescription>+ </Alert.Description></Alert></div>);diff --git a/web/src/features/automations/components/AutomationFailureBanner.tsx b/web/src/features/automations/components/AutomationFailureBanner.tsxindex d080663e90..0d5095dc43 100644--- a/web/src/features/automations/components/AutomationFailureBanner.tsx+++ b/web/src/features/automations/components/AutomationFailureBanner.tsx@@ -1,7 +1,7 @@import React from "react";import { AlertTriangle, X } from "lucide-react";import { Button } from "@/src/components/ui/button";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { api } from "@/src/utils/api";interface AutomationFailureBannerProps {@@ -25,28 +25,31 @@ export const AutomationFailureBanner: React.FC<}return (- <Alert variant="destructive" className="mb-4">- <AlertTriangle className="h-4 w-4" />- <AlertDescription className="flex items-center justify-between">- <div className="flex-1">- <strong>- This automation was automatically disabled due to at least{" "}- {failureData.count} consecutive webhook failures.- </strong>- <div className="mt-2 text-sm">- Check the execution history below, fix any issues with your webhook- endpoint, then reactivate the automation.+ <div className="mb-4">+ <Alert variant="destructive" icon={AlertTriangle}>+ <Alert.Description>+ <div className="flex items-center justify-between">+ <div className="flex-1">+ <strong>+ This automation was automatically disabled due to at least{" "}+ {failureData.count} consecutive webhook failures.+ </strong>+ <div className="mt-2 text-sm">+ Check the execution history below, fix any issues with your+ webhook endpoint, then reactivate the automation.+ </div>+ </div>+ <Button+ variant="ghost"+ size="sm"+ onClick={() => setDismissed(true)}+ className="ml-4 h-6 w-6 p-0"+ >+ <X className="h-4 w-4" />+ </Button></div>- </div>- <Button- variant="ghost"- size="sm"- onClick={() => setDismissed(true)}- className="ml-4 h-6 w-6 p-0"- >- <X className="h-4 w-4" />- </Button>- </AlertDescription>- </Alert>+ </Alert.Description>+ </Alert>+ </div>);};diff --git a/web/src/features/automations/components/automationForm.tsx b/web/src/features/automations/components/automationForm.tsxindex 4174d05e7a..a51a06640a 100644--- a/web/src/features/automations/components/automationForm.tsx+++ b/web/src/features/automations/components/automationForm.tsx@@ -51,7 +51,7 @@ import { showErrorToast } from "@/src/features/notifications/showErrorToast";import { ActionHandlerRegistry } from "./actions";import { webhookSchema } from "./actions/WebhookActionForm";import { MultiSelect } from "@/src/features/filters/components/multi-select";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import Link from "next/link";import { Info } from "lucide-react";@@ -340,10 +340,9 @@ const PromptTriggerFields = ({/** MonitorTriggerFields renders an info card explaining that monitors connect to this automation via the create-monitor page. */const MonitorTriggerFields = ({ projectId }: { projectId: string }) => (- <Alert>- <Info className="h-4 w-4" />- <AlertTitle>How Alerts Connect</AlertTitle>- <AlertDescription>+ <Alert icon={Info}>+ <Alert.Title>How Alerts Connect</Alert.Title>+ <Alert.Description>Add this automation to an alert from the{" "}<Linkhref={`/project/${projectId}/alerts/new`}@@ -352,7 +351,7 @@ const MonitorTriggerFields = ({ projectId }: { projectId: string }) => (create alerts page</Link>.- </AlertDescription>+ </Alert.Description></Alert>);diff --git a/web/src/features/batch-actions/components/BatchActionsSettingsPage.tsx b/web/src/features/batch-actions/components/BatchActionsSettingsPage.tsxindex 2682818bb8..3b0a55b8ba 100644--- a/web/src/features/batch-actions/components/BatchActionsSettingsPage.tsx+++ b/web/src/features/batch-actions/components/BatchActionsSettingsPage.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { SettingsTableCard } from "@/src/components/layouts/settings-table-card";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { BatchActionsTable } from "./BatchActionsTable";@@ -25,10 +25,10 @@ export function BatchActionsSettingsPage(props: { projectId: string }) {</SettingsTableCard>) : (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view batch actions.- </AlertDescription>+ </Alert.Description></Alert>)}</>diff --git a/web/src/features/batch-exports/components/BatchExportsSettingsPage.tsx b/web/src/features/batch-exports/components/BatchExportsSettingsPage.tsxindex c9080098ec..3b9541fd5c 100644--- a/web/src/features/batch-exports/components/BatchExportsSettingsPage.tsx+++ b/web/src/features/batch-exports/components/BatchExportsSettingsPage.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { BatchExportsTable } from "@/src/features/batch-exports/components/BatchExportsTable";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { SettingsTableCard } from "@/src/components/layouts/settings-table-card";@@ -25,10 +25,10 @@ export function BatchExportsSettingsPage(props: { projectId: string }) {</SettingsTableCard>) : (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view batch exports.- </AlertDescription>+ </Alert.Description></Alert>)}</>diff --git a/web/src/features/blobstorage-integration/components/BlobStorageStatusSection.tsx b/web/src/features/blobstorage-integration/components/BlobStorageStatusSection.tsxindex 0991c55a44..e2654d0048 100644--- a/web/src/features/blobstorage-integration/components/BlobStorageStatusSection.tsx+++ b/web/src/features/blobstorage-integration/components/BlobStorageStatusSection.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Card } from "@/src/components/ui/card";import { BlobStorageExportMode } from "@langfuse/shared";import { type RouterOutputs } from "@/src/utils/api";@@ -23,20 +23,22 @@ export const BlobStorageStatusSection = ({<><Header title="Status" />{config.lastError && (- <Alert variant="destructive" className="mb-4">- <AlertTitle>Last export failed</AlertTitle>- <AlertDescription>- {config.lastError}- {config.lastErrorAt && (- <>- <br />- <span className="text-xs opacity-70">- {new Date(config.lastErrorAt).toLocaleString()}- </span>- </>- )}- </AlertDescription>- </Alert>+ <div className="mb-4">+ <Alert variant="destructive">+ <Alert.Title>Last export failed</Alert.Title>+ <Alert.Description>+ {config.lastError}+ {config.lastErrorAt && (+ <>+ <br />+ <span className="text-xs opacity-70">+ {new Date(config.lastErrorAt).toLocaleString()}+ </span>+ </>+ )}+ </Alert.Description>+ </Alert>+ </div>)}<Card className="p-3"><div className="grid grid-cols-[auto,1fr] gap-x-4 gap-y-1 text-sm">diff --git a/web/src/features/blobstorage-integration/components/ExportSourceField.tsx b/web/src/features/blobstorage-integration/components/ExportSourceField.tsxindex e5cf7f7ebe..282493a5cd 100644--- a/web/src/features/blobstorage-integration/components/ExportSourceField.tsx+++ b/web/src/features/blobstorage-integration/components/ExportSourceField.tsx@@ -1,6 +1,6 @@import { useWatch } from "react-hook-form";import { Info, ExternalLink } from "lucide-react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import {FormControl,FormDescription,@@ -135,11 +135,11 @@ export const ExportSourceField = ({{!watchedValidation.ok && (<Alert variant="destructive">- <AlertTitle>Saved export source is no longer available</AlertTitle>- <AlertDescription>+ <Alert.Title>Saved export source is no longer available</Alert.Title>+ <Alert.Description>{/* Reason-specific body; texts live in the shared lookup. */}{getExportSourceUnavailableMessage(watchedValidation.reason)}- </AlertDescription>+ </Alert.Description></Alert>)}</>diff --git a/web/src/features/datasets/components/CsvImportValidationError.tsx b/web/src/features/datasets/components/CsvImportValidationError.tsxindex e522e3c2be..0480994497 100644--- a/web/src/features/datasets/components/CsvImportValidationError.tsx+++ b/web/src/features/datasets/components/CsvImportValidationError.tsx@@ -1,6 +1,6 @@import { useState } from "react";import { ChevronDown, ChevronRight } from "lucide-react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Button } from "@/src/components/ui/button";import { type BulkDatasetItemValidationError } from "@langfuse/shared";@@ -17,81 +17,83 @@ export const CsvImportValidationError: React.FC<const hasMoreThan10 = errorCount >= 10; // Backend might limit errorsreturn (- <Alert variant="destructive" className="mt-4">- <AlertTitle className="text-base font-bold">- Schema Validation Failed- </AlertTitle>- <AlertDescription className="mt-2 space-y-3">- <p className="text-sm">- {hasMoreThan10- ? `${errorCount}+ items failed validation. Showing first ${errorCount} errors.`- : `${errorCount} item${errorCount === 1 ? "" : "s"} failed validation.`}- </p>- <p className="text-muted-foreground text-sm">- The CSV data does not match the required schema for this dataset. Fix- the errors in your CSV file and try importing again.- </p>+ <div className="mt-4">+ <Alert variant="destructive">+ <Alert.Title>Schema Validation Failed</Alert.Title>+ <Alert.Description>+ <div className="mt-2 flex flex-col gap-3">+ <p className="text-sm">+ {hasMoreThan10+ ? `${errorCount}+ items failed validation. Showing first ${errorCount} errors.`+ : `${errorCount} item${errorCount === 1 ? "" : "s"} failed validation.`}+ </p>+ <p className="text-muted-foreground text-sm">+ The CSV data does not match the required schema for this dataset.+ Fix the errors in your CSV file and try importing again.+ </p>- <Button- type="button"- variant="ghost"- size="sm"- onClick={() => setIsExpanded(!isExpanded)}- className="h-auto p-0 text-sm font-bold hover:bg-transparent"- >- {isExpanded ? (- <ChevronDown className="mr-1 h-4 w-4" />- ) : (- <ChevronRight className="mr-1 h-4 w-4" />- )}- {isExpanded ? "Hide" : "Show"} error details- </Button>+ <Button+ type="button"+ variant="ghost"+ size="sm"+ onClick={() => setIsExpanded(!isExpanded)}+ className="h-auto p-0 text-sm font-bold hover:bg-transparent"+ >+ {isExpanded ? (+ <ChevronDown className="mr-1 h-4 w-4" />+ ) : (+ <ChevronRight className="mr-1 h-4 w-4" />+ )}+ {isExpanded ? "Hide" : "Show"} error details+ </Button>- {isExpanded && (- <div className="border-destructive/20 bg-destructive/5 mt-3 max-h-[400px] space-y-3 overflow-y-auto rounded-md border p-3">- {errors.map((error, idx) => (- <div- key={`${error.itemIndex}-${error.field}`}- className="border-destructive/10 space-y-1 border-b pb-3 last:border-0 last:pb-0"- >- <div className="flex items-center gap-2">- <span className="text-muted-foreground font-mono text-xs">- #{idx + 1}- </span>- <span className="text-sm font-bold">- CSV Row {error.itemIndex + 2}:{" "}- {error.field === "input"- ? "Input"- : error.field === "metadata"- ? "Metadata"- : "Expected Output"}- </span>- </div>+ {isExpanded && (+ <div className="border-destructive/20 bg-destructive/5 mt-3 max-h-[400px] space-y-3 overflow-y-auto rounded-md border p-3">+ {errors.map((error, idx) => (+ <div+ key={`${error.itemIndex}-${error.field}`}+ className="border-destructive/10 space-y-1 border-b pb-3 last:border-0 last:pb-0"+ >+ <div className="flex items-center gap-2">+ <span className="text-muted-foreground font-mono text-xs">+ #{idx + 1}+ </span>+ <span className="text-sm font-bold">+ CSV Row {error.itemIndex + 2}:{" "}+ {error.field === "input"+ ? "Input"+ : error.field === "metadata"+ ? "Metadata"+ : "Expected Output"}+ </span>+ </div>- <ul className="ml-6 space-y-1 text-sm">- {error.errors.map((err, errIdx) => (- <li key={errIdx} className="text-destructive">- {err.path !== "/" && (- <span className="text-muted-foreground font-mono text-xs">- {err.path}:{" "}- </span>- )}- {err.message}- </li>- ))}- </ul>- </div>- ))}+ <ul className="ml-6 space-y-1 text-sm">+ {error.errors.map((err, errIdx) => (+ <li key={errIdx} className="text-destructive">+ {err.path !== "/" && (+ <span className="text-muted-foreground font-mono text-xs">+ {err.path}:{" "}+ </span>+ )}+ {err.message}+ </li>+ ))}+ </ul>+ </div>+ ))}- {hasMoreThan10 && (- <p className="text-muted-foreground pt-2 text-xs">- Fix these errors to see if there are additional validation- issues.- </p>+ {hasMoreThan10 && (+ <p className="text-muted-foreground pt-2 text-xs">+ Fix these errors to see if there are additional validation+ issues.+ </p>+ )}+ </div>)}</div>- )}- </AlertDescription>- </Alert>+ </Alert.Description>+ </Alert>+ </div>);};diff --git a/web/src/features/datasets/components/DatasetSchemaValidationError.tsx b/web/src/features/datasets/components/DatasetSchemaValidationError.tsxindex 43eb867c8d..57fd08bc08 100644--- a/web/src/features/datasets/components/DatasetSchemaValidationError.tsx+++ b/web/src/features/datasets/components/DatasetSchemaValidationError.tsx@@ -1,6 +1,6 @@import { useState } from "react";import { ChevronDown, ChevronRight, ExternalLink } from "lucide-react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Button } from "@/src/components/ui/button";import Link from "next/link";@@ -29,81 +29,83 @@ export const DatasetSchemaValidationError: React.FC<const hasMoreThan10 = errorCount === 10; // Backend limits to 10 errorsreturn (- <Alert variant="destructive" className="mt-4">- <AlertTitle className="text-base font-bold">- Schema Validation Failed- </AlertTitle>- <AlertDescription className="mt-2 space-y-3">- <p className="text-sm">- {hasMoreThan10- ? `More than 10 items failed validation. Showing first 10 errors.`- : `${errorCount} item${errorCount === 1 ? "" : "s"} failed validation.`}- </p>+ <div className="mt-4">+ <Alert variant="destructive">+ <Alert.Title>Schema Validation Failed</Alert.Title>+ <Alert.Description>+ <div className="mt-2 flex flex-col gap-3">+ <p className="text-sm">+ {hasMoreThan10+ ? `More than 10 items failed validation. Showing first 10 errors.`+ : `${errorCount} item${errorCount === 1 ? "" : "s"} failed validation.`}+ </p>- <Button- type="button"- variant="ghost"- size="sm"- onClick={() => setIsExpanded(!isExpanded)}- className="h-auto p-0 text-sm font-bold hover:bg-transparent"- >- {isExpanded ? (- <ChevronDown className="mr-1 h-4 w-4" />- ) : (- <ChevronRight className="mr-1 h-4 w-4" />- )}- {isExpanded ? "Hide" : "Show"} error details- </Button>+ <Button+ type="button"+ variant="ghost"+ size="sm"+ onClick={() => setIsExpanded(!isExpanded)}+ className="h-auto p-0 text-sm font-bold hover:bg-transparent"+ >+ {isExpanded ? (+ <ChevronDown className="mr-1 h-4 w-4" />+ ) : (+ <ChevronRight className="mr-1 h-4 w-4" />+ )}+ {isExpanded ? "Hide" : "Show"} error details+ </Button>- {isExpanded && (- <div className="border-destructive/20 bg-destructive/5 mt-3 space-y-3 rounded-md border p-3">- {errors.map((error, idx) => (- <div- key={`${error.datasetItemId}-${error.field}`}- className="border-destructive/10 space-y-1 border-b pb-3 last:border-0 last:pb-0"- >- <div className="flex items-center justify-between gap-2">- <div className="flex items-center gap-2">- <span className="text-muted-foreground font-mono text-xs">- #{idx + 1}- </span>- <Link- href={`/project/${projectId}/datasets/${datasetId}/items/${error.datasetItemId}`}- target="_blank"- rel="noopener noreferrer"- className="flex items-center gap-1 text-sm font-bold hover:underline"- >- Item: {error.datasetItemId}- <ExternalLink className="h-3 w-3" />- </Link>+ {isExpanded && (+ <div className="border-destructive/20 bg-destructive/5 mt-3 space-y-3 rounded-md border p-3">+ {errors.map((error, idx) => (+ <div+ key={`${error.datasetItemId}-${error.field}`}+ className="border-destructive/10 space-y-1 border-b pb-3 last:border-0 last:pb-0"+ >+ <div className="flex items-center justify-between gap-2">+ <div className="flex items-center gap-2">+ <span className="text-muted-foreground font-mono text-xs">+ #{idx + 1}+ </span>+ <Link+ href={`/project/${projectId}/datasets/${datasetId}/items/${error.datasetItemId}`}+ target="_blank"+ rel="noopener noreferrer"+ className="flex items-center gap-1 text-sm font-bold hover:underline"+ >+ Item: {error.datasetItemId}+ <ExternalLink className="h-3 w-3" />+ </Link>+ </div>+ <span className="bg-destructive/20 rounded px-2 py-0.5 text-xs font-bold">+ {error.field === "input" ? "Input" : "Expected Output"}+ </span>+ </div>++ <ul className="ml-6 space-y-1 text-sm">+ {error.errors.map((err, errIdx) => (+ <li key={errIdx} className="text-destructive">+ <span className="text-muted-foreground font-mono text-xs">+ Path {err.path}+ </span>+ : {err.message}+ </li>+ ))}+ </ul></div>- <span className="bg-destructive/20 rounded px-2 py-0.5 text-xs font-bold">- {error.field === "input" ? "Input" : "Expected Output"}- </span>- </div>+ ))}- <ul className="ml-6 space-y-1 text-sm">- {error.errors.map((err, errIdx) => (- <li key={errIdx} className="text-destructive">- <span className="text-muted-foreground font-mono text-xs">- Path {err.path}- </span>- : {err.message}- </li>- ))}- </ul>+ {hasMoreThan10 && (+ <p className="text-muted-foreground pt-2 text-xs">+ Fix these errors to see if there are additional validation+ issues.+ </p>+ )}</div>- ))}-- {hasMoreThan10 && (- <p className="text-muted-foreground pt-2 text-xs">- Fix these errors to see if there are additional validation- issues.- </p>)}</div>- )}- </AlertDescription>- </Alert>+ </Alert.Description>+ </Alert>+ </div>);};diff --git a/web/src/features/evals/components/eval-version-callout.tsx b/web/src/features/evals/components/eval-version-callout.tsxindex f8cc1a452c..04bbdb09e1 100644--- a/web/src/features/evals/components/eval-version-callout.tsx+++ b/web/src/features/evals/components/eval-version-callout.tsx@@ -1,4 +1,4 @@-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { AlertTriangle } from "lucide-react";import { type EvalCapabilities } from "@/src/features/evals/hooks/useEvalCapabilities";import {@@ -155,21 +155,19 @@ export function EvalVersionCallout({}return (- <Alert- variant="default"- className="border-dark-yellow bg-light-yellow mt-2 max-w-4xl"- >- <AlertTriangle className="text-dark-yellow h-4 w-4" />- <AlertDescription>- <div className="flex flex-col gap-2">- <div className="flex flex-col gap-1">- <span className="text-foreground font-bold">{content.title}</span>- <span className="text-foreground text-sm">- {content.description}- </span>+ <div className="mt-2 w-full max-w-4xl">+ <Alert variant="warning" icon={AlertTriangle}>+ <Alert.Description>+ <div className="flex flex-col gap-2">+ <div className="flex flex-col gap-1">+ <span className="text-foreground font-bold">{content.title}</span>+ <span className="text-foreground text-sm">+ {content.description}+ </span>+ </div></div>- </div>- </AlertDescription>- </Alert>+ </Alert.Description>+ </Alert>+ </div>);}diff --git a/web/src/features/evals/components/evaluator-detail.tsx b/web/src/features/evals/components/evaluator-detail.tsxindex 04a1e1af71..03be4c5ebe 100644--- a/web/src/features/evals/components/evaluator-detail.tsx+++ b/web/src/features/evals/components/evaluator-detail.tsx@@ -14,7 +14,7 @@ import {validateEvaluatorFiltersForTarget,} from "@langfuse/shared";import { useLazyEvaluatorExecutionCounts } from "@/src/features/evals/hooks/useLazyEvaluatorExecutionCounts";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { AlertTriangle } from "lucide-react";const JobExecutionCounts = ({@@ -140,14 +140,13 @@ export const EvaluatorDetail = () => {<div className="flex h-full flex-col overflow-hidden">{filterValidation && !filterValidation.isValid && (<div className="mx-3 mt-3">- <Alert variant="destructive">- <AlertTriangle className="h-4 w-4" />- <AlertTitle>Unsupported filters</AlertTitle>- <AlertDescription>+ <Alert variant="destructive" icon={AlertTriangle}>+ <Alert.Title>Unsupported filters</Alert.Title>+ <Alert.Description>This evaluator contains deprecated or unsupported filters. Thefilters must be removed. Until the filters are removed, theevaluator is paused and will not be run.{" "}- </AlertDescription>+ </Alert.Description></Alert></div>)}diff --git a/web/src/features/evals/components/inner-evaluator-form.tsx b/web/src/features/evals/components/inner-evaluator-form.tsxindex 67a5450dbc..3c8134a8d7 100644--- a/web/src/features/evals/components/inner-evaluator-form.tsx+++ b/web/src/features/evals/components/inner-evaluator-form.tsx@@ -1,5 +1,5 @@import { type UseFormReturn, useForm } from "react-hook-form";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Input } from "@/src/components/ui/input";import { Button } from "@/src/components/ui/button";import {@@ -843,14 +843,13 @@ export const InnerEvaluatorForm = (props: {{!props.hideTargetSection && (<Card className="flex max-w-full flex-col gap-2 overflow-y-auto p-4">{hasInvalidTraceFilters && (- <Alert variant="destructive">- <AlertTriangle className="h-4 w-4" />- <AlertTitle>Unsupported filter detected</AlertTitle>- <AlertDescription>+ <Alert variant="destructive" icon={AlertTriangle}>+ <Alert.Title>Unsupported filter detected</Alert.Title>+ <Alert.Description>This evaluator has a filter that is not supported fortrace-level evaluators. It is effectively paused. Please removeall filters and re-add them from scratch to resume execution.- </AlertDescription>+ </Alert.Description></Alert>)}<div className="flex flex-col gap-4">@@ -1250,10 +1249,10 @@ export const InnerEvaluatorForm = (props: {{!props.disabled && !hasFilters && (<div className="flex max-w-[500px] gap-1"><AlertTriangle className="text-dark-yellow h-4 w-4" />- <AlertDescription className="text-dark-yellow">+ <div className="text-dark-yellow text-sm [&_p]:leading-relaxed">No filters set. This evaluator will run on all{" "}{getTargetDisplayName(target)}.- </AlertDescription>+ </div></div>)}<FormMessage />diff --git a/web/src/features/evals/components/template-form.tsx b/web/src/features/evals/components/template-form.tsxindex 71f5377b90..a7aee1a7d2 100644--- a/web/src/features/evals/components/template-form.tsx+++ b/web/src/features/evals/components/template-form.tsx@@ -74,7 +74,7 @@ import {EvalTemplateTypeSelector,type EvalTemplateTypeSelectorMode,} from "@/src/features/evals/components/eval-template-type-selector";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import {useEvalCapabilities,type EvalCapabilities,@@ -1022,32 +1022,30 @@ function CodeEvalSdkVersionCallout({}return (- <Alert- variant="default"- className="border-dark-yellow bg-light-yellow max-w-4xl"- >- <AlertTriangle className="text-dark-yellow h-4 w-4" />- <AlertDescription>- <div className="flex flex-col gap-1">- <span className="text-foreground font-bold">- Please verify your SDK version- </span>- <span className="text-foreground text-sm">- Code evaluators require JS SDK v4+ or Python SDK v3+. You can create- this evaluator now, but it will only run once your project ingests- data with a compatible SDK.{" "}- <a- href="https://langfuse.com/docs/observability/sdk/upgrade-path"- target="_blank"- rel="noopener noreferrer"- className="text-dark-blue font-bold hover:opacity-80"- >- Learn more- </a>- .- </span>- </div>- </AlertDescription>- </Alert>+ <div className="w-full max-w-4xl">+ <Alert variant="warning" icon={AlertTriangle}>+ <Alert.Description>+ <div className="flex flex-col gap-1">+ <span className="text-foreground font-bold">+ Please verify your SDK version+ </span>+ <span className="text-foreground text-sm">+ Code evaluators require JS SDK v4+ or Python SDK v3+. You can+ create this evaluator now, but it will only run once your project+ ingests data with a compatible SDK.{" "}+ <a+ href="https://langfuse.com/docs/observability/sdk/upgrade-path"+ target="_blank"+ rel="noopener noreferrer"+ className="text-dark-blue font-bold hover:opacity-80"+ >+ Learn more+ </a>+ .+ </span>+ </div>+ </Alert.Description>+ </Alert>+ </div>);}diff --git a/web/src/features/evals/components/variable-mapping-card.tsx b/web/src/features/evals/components/variable-mapping-card.tsxindex 2ccd72faca..0c80200272 100644--- a/web/src/features/evals/components/variable-mapping-card.tsx+++ b/web/src/features/evals/components/variable-mapping-card.tsx@@ -49,7 +49,7 @@ import { Switch } from "@/src/components/design-system/Switch/Switch";import { DetailPageNav } from "@/src/features/navigate-detail-pages/DetailPageNav";import { useEvalConfigMappingData } from "@/src/features/evals/hooks/useEvalConfigMappingData";import { useEffect, useState } from "react";-import { Alert, AlertTitle, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { AlertCircle, ExternalLink } from "lucide-react";import { useVariableMappingSync } from "@/src/features/evals/hooks/useVariableMappingSync";import { Button } from "@/src/components/ui/button";@@ -323,16 +323,13 @@ export const VariableMappingCard = ({)}>{disabled && !syncStatus.inSync && (- <Alert className="text-sm" variant="destructive">- <AlertCircle className="h-4 w-4" />- <AlertTitle className="text-base">- Variable mapping is out of sync- </AlertTitle>- <AlertDescription>+ <Alert variant="destructive" icon={AlertCircle}>+ <Alert.Title>Variable mapping is out of sync</Alert.Title>+ <Alert.Description>The template has {syncStatus.added.length} newvariable(s) and {syncStatus.removed.length} removedvariable(s). Toggle Edit Mode to update the mapping.- </AlertDescription>+ </Alert.Description></Alert>)}{isLegacyEvalTarget(form.watch("target")) // Complex variable mapping for trace/dataset targets (legacy)diff --git a/web/src/features/evals/pages/new-evaluator.tsx b/web/src/features/evals/pages/new-evaluator.tsxindex cf017fff91..5973ff2a59 100644--- a/web/src/features/evals/pages/new-evaluator.tsx+++ b/web/src/features/evals/pages/new-evaluator.tsx@@ -21,7 +21,7 @@ import {isCodeEvalTemplate,shouldShowEvalTemplate,} from "@/src/features/evals/utils/code-eval-template-utils";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Button } from "@/src/components/ui/button";import { useState } from "react";import { Skeleton } from "@/src/components/ui/skeleton";@@ -261,24 +261,25 @@ export default function NewEvaluatorPage() {step === "run" && evaluatorId && projectId && (<div className="flex flex-col gap-4">{hasNewerTemplate && latestTemplate && currentTemplate ? (- <Alert variant="info">- <Info className="h-4 w-4" />- <AlertTitle>Selected Evaluator has been updated</AlertTitle>- <AlertDescription className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">- <span>- Click to use the latest version of your evaluator{" "}- {latestTemplate.name}.- </span>- <Button- type="button"- variant="outline"- size="sm"- className="w-fit"- onClick={handleUseUpdatedEvaluator}- >- Use updated evaluator- </Button>- </AlertDescription>+ <Alert variant="info" icon={Info}>+ <Alert.Title>Selected Evaluator has been updated</Alert.Title>+ <Alert.Description>+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">+ <span>+ Click to use the latest version of your evaluator{" "}+ {latestTemplate.name}.+ </span>+ <Button+ type="button"+ variant="outline"+ size="sm"+ className="w-fit"+ onClick={handleUseUpdatedEvaluator}+ >+ Use updated evaluator+ </Button>+ </div>+ </Alert.Description></Alert>) : null}<RunEvaluatorFormdiff --git a/web/src/features/evals/pages/remap-evaluator.tsx b/web/src/features/evals/pages/remap-evaluator.tsxindex 82c74b071b..48babe2558 100644--- a/web/src/features/evals/pages/remap-evaluator.tsx+++ b/web/src/features/evals/pages/remap-evaluator.tsx@@ -8,7 +8,7 @@ import {isTraceTarget,} from "@/src/features/evals/utils/typeHelpers";import { type PartialConfig } from "@/src/features/evals/types";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Skeleton } from "@/src/components/ui/skeleton";import { Button } from "@/src/components/ui/button";import { Callout } from "@/src/components/design-system/Callout/Callout";@@ -256,9 +256,9 @@ export default function RemapEvaluatorPage() {</div>) : !oldConfig || !evalTemplate ? (<Alert variant="destructive">- <AlertDescription>+ <Alert.Description>Failed to load eval configuration or template.- </AlertDescription>+ </Alert.Description></Alert>) : (<div className="grid min-w-0 grid-cols-[minmax(0,1fr)_2px_minmax(0,1fr)] items-start">diff --git a/web/src/features/evals/v2/components/Evaluators/EvaluatorSavedDialog/EvaluatorSavedRuleFilterPreview.tsx b/web/src/features/evals/v2/components/Evaluators/EvaluatorSavedDialog/EvaluatorSavedRuleFilterPreview.tsxindex 3ac48eda56..1a86fd7d8a 100644--- a/web/src/features/evals/v2/components/Evaluators/EvaluatorSavedDialog/EvaluatorSavedRuleFilterPreview.tsx+++ b/web/src/features/evals/v2/components/Evaluators/EvaluatorSavedDialog/EvaluatorSavedRuleFilterPreview.tsx@@ -1,7 +1,7 @@import type { FilterState } from "@langfuse/shared";import { AlertTriangle } from "lucide-react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { RuleFilterPills } from "@/src/features/evals/v2/components/Rules/RuleFilterPills/RuleFilterPills";export function EvaluatorSavedRuleFilterPreview({@@ -14,17 +14,14 @@ export function EvaluatorSavedRuleFilterPreview({return (<div className="space-y-2">{unsupportedReasons.size > 0 ? (- <Alert className="border-dark-yellow bg-light-yellow text-dark-yellow [&>svg]:text-dark-yellow rounded-md p-2 [&>svg]:top-2 [&>svg]:left-2 [&>svg+div]:translate-y-0 [&>svg~*]:pl-5">- <AlertTriangle className="h-4 w-4" />- <AlertTitle className="mb-1 text-sm">- Some filters won't be included- </AlertTitle>- <AlertDescription className="text-xs">+ <Alert variant="warning" size="sm" icon={AlertTriangle}>+ <Alert.Title>Some filters won't be included</Alert.Title>+ <Alert.Description>{unsupportedReasons.size} of {filter.length} sample{" "}{filter.length === 1 ? "filter" : "filters"}{" "}{unsupportedReasons.size === 1 ? "is" : "are"} only used for testingand won't be included in this rule.- </AlertDescription>+ </Alert.Description></Alert>) : null}<RuleFilterPillsdiff --git a/web/src/features/evals/v2/components/Rules/EvaluationRuleAttachmentValidationAlert/EvaluationRuleAttachmentValidationAlert.tsx b/web/src/features/evals/v2/components/Rules/EvaluationRuleAttachmentValidationAlert/EvaluationRuleAttachmentValidationAlert.tsxindex dfa8c0479c..192a9b7074 100644--- a/web/src/features/evals/v2/components/Rules/EvaluationRuleAttachmentValidationAlert/EvaluationRuleAttachmentValidationAlert.tsx+++ b/web/src/features/evals/v2/components/Rules/EvaluationRuleAttachmentValidationAlert/EvaluationRuleAttachmentValidationAlert.tsx@@ -1,7 +1,7 @@import Link from "next/link";import { AlertTriangle, X } from "lucide-react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";export function EvaluationRuleAttachmentValidationAlert({message,@@ -16,29 +16,28 @@ export function EvaluationRuleAttachmentValidationAlert({onReview?: () => void;}) {return (- <Alert className="border-dark-yellow bg-light-yellow text-dark-yellow [&>svg]:text-dark-yellow pr-10">+ <Alert variant="warning" actionPosition="top-right" icon={AlertTriangle}><buttontype="button"- className="text-dark-yellow absolute top-2.5 right-2.5 grid size-7 cursor-pointer place-items-center rounded-sm border-none bg-transparent"+ className="absolute top-2.5 right-2.5 grid size-7 cursor-pointer place-items-center rounded-sm border-none bg-transparent"aria-label="Dismiss validation warning"onClick={onDismiss}><X className="size-4 stroke-current" aria-hidden="true" /></button>- <AlertTriangle className="h-4 w-4" />- <AlertTitle className="pr-4">- Review evaluator variable mapping- </AlertTitle>- <AlertDescription className="flex flex-col items-start gap-1">- <p>{message}</p>- <Link- href={reviewHref}- className="font-bold underline underline-offset-2"- onClick={onReview}- >- Review how the evaluator maps data to variables- </Link>- </AlertDescription>+ <Alert.Title>Review evaluator variable mapping</Alert.Title>+ <Alert.Description>+ <div className="flex flex-col items-start gap-1">+ <p>{message}</p>+ <Link+ href={reviewHref}+ className="font-bold underline underline-offset-2"+ onClick={onReview}+ >+ Review how the evaluator maps data to variables+ </Link>+ </div>+ </Alert.Description></Alert>);}diff --git a/web/src/features/experiments/components/shared/StepHeader.tsx b/web/src/features/experiments/components/shared/StepHeader.tsxindex e1fcbe75a8..316bfee094 100644--- a/web/src/features/experiments/components/shared/StepHeader.tsx+++ b/web/src/features/experiments/components/shared/StepHeader.tsx@@ -1,5 +1,5 @@import React from "react";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";export interface StepHeaderProps {title: string;@@ -18,7 +18,7 @@ export const StepHeader: React.FC<StepHeaderProps> = ({<p className="text-muted-foreground text-sm">{description}</p>{errorMessage && (<Alert variant="destructive">- <AlertDescription>{errorMessage}</AlertDescription>+ <Alert.Description>{errorMessage}</Alert.Description></Alert>)}</div>diff --git a/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.tsx b/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.tsxindex 7e8a04c17f..db892836b0 100644--- a/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.tsx+++ b/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.tsx@@ -13,7 +13,7 @@ import {AlertDialogHeader,AlertDialogTitle,} from "@/src/components/ui/alert-dialog";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Card } from "@/src/components/ui/card";import {featurePreviewFlags,@@ -72,8 +72,8 @@ export function OrganizationFeaturePreviewsSettings({if (defaultsQuery.isError) {return (<Alert variant="destructive">- <AlertTitle>Feature previews unavailable</AlertTitle>- <AlertDescription>{defaultsQuery.error.message}</AlertDescription>+ <Alert.Title>Feature previews unavailable</Alert.Title>+ <Alert.Description>{defaultsQuery.error.message}</Alert.Description></Alert>);}@@ -95,12 +95,14 @@ export function OrganizationFeaturePreviewsSettings({{experimentalFeaturesEnabled ? (<Alert>- <AlertTitle>Experimental features enabled deployment-wide</AlertTitle>- <AlertDescription>+ <Alert.Title>+ Experimental features enabled deployment-wide+ </Alert.Title>+ <Alert.Description>Every preview on this page is enabled by the env variableLANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true. Per-user opt-outs do notdisable these previews.- </AlertDescription>+ </Alert.Description></Alert>) : null}@@ -170,12 +172,12 @@ export function OrganizationFeaturePreviewsSettings({</AlertDialogHeader>{proposedChange?.enabled ? (<Alert>- <AlertTitle>Already enabled for you</AlertTitle>- <AlertDescription>+ <Alert.Title>Already enabled for you</Alert.Title>+ <Alert.Description>This preview is already enabled in your personal Feature Previewsettings. Make sure you have tested it before enabling it forthe organization.- </AlertDescription>+ </Alert.Description></Alert>) : null}<AlertDialogFooter>diff --git a/web/src/features/metrics/components/MetricsFilterBuilder.tsx b/web/src/features/metrics/components/MetricsFilterBuilder.tsxindex 1ae8f28d44..698499862a 100644--- a/web/src/features/metrics/components/MetricsFilterBuilder.tsx+++ b/web/src/features/metrics/components/MetricsFilterBuilder.tsx@@ -12,7 +12,7 @@ import {import { type views, type ViewVersion } from "@langfuse/shared/query";import { type z } from "zod";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { api, type RouterInputs, type RouterOutputs } from "@/src/utils/api";import {displayNameForFilterColumn,@@ -238,17 +238,11 @@ const MetricsFilterView = ({return (<div className="space-y-2">{unsupportedColumns.length > 0 && (- <Alert- variant="default"- className="border-yellow-500/50 bg-yellow-50 dark:bg-yellow-950/20"- >- <AlertCircle className="h-4 w-4 text-yellow-600 dark:text-yellow-500" />- <AlertTitle className="text-yellow-800 dark:text-yellow-400">- Unsupported filters- </AlertTitle>- <AlertDescription className="text-yellow-700 dark:text-yellow-500">+ <Alert variant="warning" icon={AlertCircle}>+ <Alert.Title>Unsupported filters</Alert.Title>+ <Alert.Description>{`These filter columns are not supported for ${startCase(view)} and were dropped: ${unsupportedColumns}. Switch back to a compatible view to restore them.`}- </AlertDescription>+ </Alert.Description></Alert>)}<InlineFilterBuilderdiff --git a/web/src/features/playground/page/components/NoModelConfiguredAlert.tsx b/web/src/features/playground/page/components/NoModelConfiguredAlert.tsxindex 824a6bcd57..822fd01105 100644--- a/web/src/features/playground/page/components/NoModelConfiguredAlert.tsx+++ b/web/src/features/playground/page/components/NoModelConfiguredAlert.tsx@@ -1,6 +1,6 @@import { AlertCircle, Settings } from "lucide-react";import Link from "next/link";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";interface NoModelConfiguredAlertProps {projectId: string;@@ -11,15 +11,9 @@ export function NoModelConfiguredAlert({}: NoModelConfiguredAlertProps) {return (<div className="p-4">- <Alert- variant="default"- className="border-yellow-500/50 bg-yellow-50 dark:bg-yellow-950/20"- >- <AlertCircle className="h-4 w-4 text-yellow-600 dark:text-yellow-500" />- <AlertTitle className="text-yellow-800 dark:text-yellow-400">- No Model Configured- </AlertTitle>- <AlertDescription className="text-yellow-700 dark:text-yellow-500">+ <Alert variant="warning" icon={AlertCircle}>+ <Alert.Title>No Model Configured</Alert.Title>+ <Alert.Description>To use the playground, you need to configure a model first. Go to{" "}<Linkhref={`/project/${projectId}/settings/llm-connections`}@@ -28,7 +22,7 @@ export function NoModelConfiguredAlert({<Settings className="inline h-3 w-3" /> LLM Connection Settings</Link>{" "}to add an LLM API key and configure your models.- </AlertDescription>+ </Alert.Description></Alert></div>);diff --git a/web/src/features/posthog-integration/components/PostHogStatusSection.tsx b/web/src/features/posthog-integration/components/PostHogStatusSection.tsxindex 903dff02b8..2397a7b0d6 100644--- a/web/src/features/posthog-integration/components/PostHogStatusSection.tsx+++ b/web/src/features/posthog-integration/components/PostHogStatusSection.tsx@@ -1,5 +1,5 @@import Header from "@/src/components/layouts/header";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { type RouterOutputs } from "@/src/utils/api";type PostHogIntegrationConfig = NonNullable<@@ -21,27 +21,29 @@ export const PostHogStatusSection = ({<><Header title="Status" className="mt-8" />{config.lastError && (- <Alert variant="destructive" className="mb-4">- {/* A fault normally arrives with the auto-disable, but the disable is- skipped when the host changed mid-run, leaving a fault on a still- enabled integration — so only promise "disabled" when it is. */}- <AlertTitle>- {config.enabled- ? "Last export failed"- : "Export disabled – action required"}- </AlertTitle>- <AlertDescription>- {config.lastError}- {config.lastErrorAt && (- <>- <br />- <span className="text-xs opacity-70">- {new Date(config.lastErrorAt).toLocaleString()}- </span>- </>- )}- </AlertDescription>- </Alert>+ <div className="mb-4">+ <Alert variant="destructive">+ {/* A fault normally arrives with the auto-disable, but the disable is+ skipped when the host changed mid-run, leaving a fault on a still+ enabled integration — so only promise "disabled" when it is. */}+ <Alert.Title>+ {config.enabled+ ? "Last export failed"+ : "Export disabled – action required"}+ </Alert.Title>+ <Alert.Description>+ {config.lastError}+ {config.lastErrorAt && (+ <>+ <br />+ <span className="text-xs opacity-70">+ {new Date(config.lastErrorAt).toLocaleString()}+ </span>+ </>+ )}+ </Alert.Description>+ </Alert>+ </div>)}<p className="text-primary text-sm">Data synced until:{" "}diff --git a/web/src/features/projects/components/TransferProjectDialogContent.tsx b/web/src/features/projects/components/TransferProjectDialogContent.tsxindex d0f2f4c76e..e09d46e13c 100644--- a/web/src/features/projects/components/TransferProjectDialogContent.tsx+++ b/web/src/features/projects/components/TransferProjectDialogContent.tsx@@ -1,5 +1,5 @@import { zodResolver } from "@hookform/resolvers/zod";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Button } from "@/src/components/ui/button";import {DialogBody,@@ -79,10 +79,9 @@ export function TransferProjectDialogContent({className="flex flex-col gap-8"><DialogBody>- <Alert>- <TriangleAlert className="h-4 w-4" />- <AlertTitle>Warning</AlertTitle>- <AlertDescription>+ <Alert variant="warning" icon={TriangleAlert}>+ <Alert.Title>Warning</Alert.Title>+ <Alert.Description>Transferring the project will move it to a differentorganization:<ul className="list-disc pl-4">@@ -97,7 +96,7 @@ export function TransferProjectDialogContent({interruption.</li></ul>- </AlertDescription>+ </Alert.Description></Alert><FormFieldcontrol={form.control}diff --git a/web/src/features/public-api/components/ApiKeyList.tsx b/web/src/features/public-api/components/ApiKeyList.tsxindex 94cc9db5c6..7aefca8b8a 100644--- a/web/src/features/public-api/components/ApiKeyList.tsx+++ b/web/src/features/public-api/components/ApiKeyList.tsx@@ -20,7 +20,7 @@ import { useHasOrganizationAccess } from "@/src/features/rbac/utils/checkOrganizimport { api, reportNonTrpcError } from "@/src/utils/api";import { TrashIcon } from "lucide-react";import { useState } from "react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import startCase from "lodash/startCase";import { useLangfuseEnvCode } from "@/src/features/public-api/hooks/useLangfuseEnvCode";@@ -77,10 +77,10 @@ export function ApiKeyList(props: { entityId: string; scope: ApiKeyScope }) {<div><Header title="API Keys" /><Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view API keys for this {scope}.- </AlertDescription>+ </Alert.Description></Alert></div>);diff --git a/web/src/features/public-api/components/LLMApiKeyList.tsx b/web/src/features/public-api/components/LLMApiKeyList.tsxindex a3edd99a6d..4ec9f4dae4 100644--- a/web/src/features/public-api/components/LLMApiKeyList.tsx+++ b/web/src/features/public-api/components/LLMApiKeyList.tsx@@ -15,7 +15,7 @@ import {import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { api, reportNonTrpcError } from "@/src/utils/api";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { CreateLLMApiKeyDialog } from "./CreateLLMApiKeyDialog";import { UpdateLLMApiKeyDialog } from "./UpdateLLMApiKeyDialog";@@ -46,10 +46,10 @@ export function LlmApiKeyList(props: { projectId: string }) {<div><Header title="LLM Connections" /><Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view LLM API keys for this project.- </AlertDescription>+ </Alert.Description></Alert></div>);diff --git a/web/src/features/rbac/components/MembersTable.tsx b/web/src/features/rbac/components/MembersTable.tsxindex ad2883d785..d0d20f58cf 100644--- a/web/src/features/rbac/components/MembersTable.tsx+++ b/web/src/features/rbac/components/MembersTable.tsx@@ -18,7 +18,7 @@ import type { RouterOutput } from "@/src/utils/types";import { Role } from "@langfuse/shared";import { PlusIcon, Trash } from "lucide-react";import { useSession } from "next-auth/react";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { useHasEntitlement } from "@/src/features/entitlements/hooks";import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";@@ -412,10 +412,10 @@ export function MembersTable({if (project ? !hasProjectViewAccess : !hasOrgViewAccess) {return (<Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to view members of this organization.- </AlertDescription>+ </Alert.Description></Alert>);}diff --git a/web/src/features/slack/components/ChannelSelector.tsx b/web/src/features/slack/components/ChannelSelector.tsxindex 21e9dc63e7..2181bad30a 100644--- a/web/src/features/slack/components/ChannelSelector.tsx+++ b/web/src/features/slack/components/ChannelSelector.tsx@@ -6,7 +6,7 @@ import {PopoverContent,PopoverTrigger,} from "@/src/components/ui/popover";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import {Command,CommandEmpty,@@ -387,18 +387,17 @@ export const ChannelSelector: React.FC<ChannelSelectorProps> = ({{error && (<Alert>- <AlertDescription>+ <Alert.Description>Failed to load channels. You can still enter a channel namemanually, or check your Slack connection and try again.- </AlertDescription>+ </Alert.Description></Alert>)}{/* Private channel scope warning */}{channelsData && !channelsData.hasPrivateChannelAccess && (- <Alert>- <AlertTriangle className="h-4 w-4" />- <AlertDescription>+ <Alert icon={AlertTriangle}>+ <Alert.Description>Private channels are not visible. To access private channels,{" "}<buttontype="button"@@ -414,7 +413,7 @@ export const ChannelSelector: React.FC<ChannelSelectorProps> = ({re-authenticate your Slack integration</button>{" "}to grant the required permissions.- </AlertDescription>+ </Alert.Description></Alert>)}</div>diff --git a/web/src/features/slack/components/SlackConnectionCard.tsx b/web/src/features/slack/components/SlackConnectionCard.tsxindex fcb871a61f..899b9422b0 100644--- a/web/src/features/slack/components/SlackConnectionCard.tsx+++ b/web/src/features/slack/components/SlackConnectionCard.tsx@@ -9,7 +9,7 @@ import {CardHeader,CardTitle,} from "@/src/components/ui/card";-import { Alert, AlertDescription } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { api } from "@/src/utils/api";import { SlackConnectButton } from "@/src/features/slack/components/SlackConnectButton";import { SlackDisconnectButton } from "@/src/features/slack/components/SlackDisconnectButton";@@ -102,11 +102,10 @@ export const SlackConnectionCard: React.FC<SlackConnectionCardProps> = ({<CardDescription>Error loading connection status</CardDescription></CardHeader><CardContent>- <Alert>- <AlertCircle className="h-4 w-4" />- <AlertDescription>+ <Alert icon={AlertCircle}>+ <Alert.Description>Failed to load Slack integration status. Please try again.- </AlertDescription>+ </Alert.Description></Alert></CardContent></Card>@@ -127,9 +126,8 @@ export const SlackConnectionCard: React.FC<SlackConnectionCardProps> = ({</CardHeader><CardContent className="space-y-4">{integrationStatus?.error && (- <Alert>- <AlertCircle className="h-4 w-4" />- <AlertDescription>{integrationStatus.error}</AlertDescription>+ <Alert icon={AlertCircle}>+ <Alert.Description>{integrationStatus.error}</Alert.Description></Alert>)}diff --git a/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx b/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsxindex 9c6ec56799..5d424f4216 100644--- a/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx+++ b/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx@@ -7,7 +7,7 @@ import { z } from "zod";import { ActionButton } from "@/src/components/ActionButton";import { StatusBadge } from "@/src/components/ui/StatusBadge/StatusBadge";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { Button } from "@/src/components/ui/button";import { Card } from "@/src/components/ui/card";import {@@ -144,10 +144,10 @@ export function WebCalloutSettingsPage(props: { projectId: string }) {return (<div><Alert>- <AlertTitle>Access Denied</AlertTitle>- <AlertDescription>+ <Alert.Title>Access Denied</Alert.Title>+ <Alert.Description>You do not have permission to manage integrations for this project.- </AlertDescription>+ </Alert.Description></Alert></div>);diff --git a/web/src/features/widgets/components/WidgetForm.tsx b/web/src/features/widgets/components/WidgetForm.tsxindex 8f0e511ca4..ce433bbb0d 100644--- a/web/src/features/widgets/components/WidgetForm.tsx+++ b/web/src/features/widgets/components/WidgetForm.tsx@@ -46,7 +46,7 @@ import {} from "@/src/components/ui/select";import { WidgetPropertySelectItem } from "@/src/features/widgets/components/WidgetPropertySelectItem";import { Label } from "@/src/components/ui/label";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";import { type z } from "zod";@@ -887,19 +887,13 @@ export function WidgetForm({</CardHeader><CardContent className="space-y-4 overflow-y-auto">{isV4 && selectedView === "traces" && (- <Alert- variant="default"- className="border-yellow-500/50 bg-yellow-50 dark:bg-yellow-950/20"- >- <AlertCircle className="h-4 w-4 text-yellow-600 dark:text-yellow-500" />- <AlertTitle className="text-yellow-800 dark:text-yellow-400">- Traces view is not available in v4- </AlertTitle>- <AlertDescription className="text-yellow-700 dark:text-yellow-500">+ <Alert variant="warning" icon={AlertCircle}>+ <Alert.Title>Traces view is not available in v4</Alert.Title>+ <Alert.Description>This widget uses the traces view which is not supported in v4.It will continue to use v3 definitions. To use v4, change theview to observations or scores.- </AlertDescription>+ </Alert.Description></Alert>)}{/* Data Selection Section */}@@ -1084,11 +1078,14 @@ export function WidgetForm({{!queryValidation.valid ? (<CardContent><div className="flex h-[300px] items-center justify-center">- <Alert variant="destructive" className="max-w-sm">- <AlertCircle className="h-4 w-4" />- <AlertTitle>Invalid query</AlertTitle>- <AlertDescription>{queryValidation.reason}</AlertDescription>- </Alert>+ <div className="w-full max-w-sm">+ <Alert variant="destructive" icon={AlertCircle}>+ <Alert.Title>Invalid query</Alert.Title>+ <Alert.Description>+ {queryValidation.reason}+ </Alert.Description>+ </Alert>+ </div></div></CardContent>) : queryResult.data || chartLoadingState.isLoading ? (diff --git a/web/src/pages/project/[projectId]/settings/integrations/mixpanel.tsx b/web/src/pages/project/[projectId]/settings/integrations/mixpanel.tsxindex fe3e03ec4f..a884bd97f1 100644--- a/web/src/pages/project/[projectId]/settings/integrations/mixpanel.tsx+++ b/web/src/pages/project/[projectId]/settings/integrations/mixpanel.tsx@@ -38,7 +38,7 @@ import {type V4WriteMode,type ExportSourceContext,} from "@langfuse/shared";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";// Shared export-source UI adapters; policy in export-source-policy.ts.import {buildExportSourceContext,@@ -378,10 +378,12 @@ const MixpanelIntegrationSettingsForm = ({)}{!watchedValidation.ok && (<Alert variant="destructive">- <AlertTitle>Saved export source is no longer available</AlertTitle>- <AlertDescription>+ <Alert.Title>+ Saved export source is no longer available+ </Alert.Title>+ <Alert.Description>{getExportSourceUnavailableMessage(watchedValidation.reason)}- </AlertDescription>+ </Alert.Description></Alert>)}<FormFielddiff --git a/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx b/web/src/pages/project/[projectId]/settings/integrations/posthog.tsxindex 3e7077543b..1d10b7a413 100644--- a/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx+++ b/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx@@ -36,7 +36,7 @@ import {type V4WriteMode,type ExportSourceContext,} from "@langfuse/shared";-import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";+import { Alert } from "@/src/components/design-system/Alert/Alert";// Shared export-source UI adapters; policy in export-source-policy.ts.import {buildExportSourceContext,@@ -357,10 +357,12 @@ const PostHogIntegrationSettings = ({)}{!watchedValidation.ok && (<Alert variant="destructive">- <AlertTitle>Saved export source is no longer available</AlertTitle>- <AlertDescription>+ <Alert.Title>+ Saved export source is no longer available+ </Alert.Title>+ <Alert.Description>{getExportSourceUnavailableMessage(watchedValidation.reason)}- </AlertDescription>+ </Alert.Description></Alert>)}<FormField