Skip to content

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

refactor(web): Enable react/jsx-no-useless-fragment (#18824)

Ben Bachemc4bd9290f6dc
diff --git a/packages/config-eslint/next.js b/packages/config-eslint/next.js
index 567ca0cd02..24bc1a19f5 100644
--- a/packages/config-eslint/next.js
+++ b/packages/config-eslint/next.js
@@ -77,6 +77,7 @@ export default [
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/jsx-no-target-blank": "off",
+ "react/jsx-no-useless-fragment": "error",
},
},
diff --git a/web/.storybook/docs/ThemeTokens/Layout.tsx b/web/.storybook/docs/ThemeTokens/Layout.tsx
index ec6954871d..7b78032dca 100644
--- a/web/.storybook/docs/ThemeTokens/Layout.tsx
+++ b/web/.storybook/docs/ThemeTokens/Layout.tsx
@@ -377,9 +377,7 @@ function BreakpointsNote() {
<PageSection
title="Breakpoints"
blurb="No custom breakpoint tokens; Tailwind's default sm / md / lg / xl / 2xl screens."
- >
- <></>
- </PageSection>
+ />
);
}
diff --git a/web/.storybook/docs/ThemeTokens/docsChrome.tsx b/web/.storybook/docs/ThemeTokens/docsChrome.tsx
index 1a632c8bfd..09d54e0338 100644
--- a/web/.storybook/docs/ThemeTokens/docsChrome.tsx
+++ b/web/.storybook/docs/ThemeTokens/docsChrome.tsx
@@ -74,7 +74,7 @@ export function DocsSection({
title: ReactNode;
blurb?: ReactNode;
aside?: ReactNode;
- children: ReactNode;
+ children?: ReactNode;
}) {
return (
<section className="flex flex-col gap-4 border-t pt-6">
diff --git a/web/src/__tests__/account-settings-sign-out-all-sessions.clienttest.tsx b/web/src/__tests__/account-settings-sign-out-all-sessions.clienttest.tsx
index 407b1f1b01..189d2a0027 100644
--- a/web/src/__tests__/account-settings-sign-out-all-sessions.clienttest.tsx
+++ b/web/src/__tests__/account-settings-sign-out-all-sessions.clienttest.tsx
@@ -83,7 +83,7 @@ import { useAccountSettingsPages } from "@/src/features/account";
function AccountSettingsPage() {
const [general] = useAccountSettingsPages();
- return <>{general && "content" in general ? general.content : null}</>;
+ return general && "content" in general ? general.content : null;
}
describe("SignOutAllSessionsButton", () => {
diff --git a/web/src/__tests__/chart-loading-state.clienttest.tsx b/web/src/__tests__/chart-loading-state.clienttest.tsx
index 14228ca228..8cb5b440de 100644
--- a/web/src/__tests__/chart-loading-state.clienttest.tsx
+++ b/web/src/__tests__/chart-loading-state.clienttest.tsx
@@ -46,7 +46,7 @@ describe("ChartLoadingState", () => {
expect(container.querySelector("svg")).toBeInTheDocument();
expect(screen.queryByText(SLOW_QUERY_HINT_TEXT)).not.toBeInTheDocument();
- rerender(<></>);
+ rerender(null);
expect(screen.queryByRole("status")).not.toBeInTheDocument();
expect(screen.queryByText(SLOW_QUERY_HINT_TEXT)).not.toBeInTheDocument();
@@ -71,7 +71,7 @@ describe("ChartLoadingState", () => {
expect(screen.getByRole("progressbar")).toBeInTheDocument();
expect(screen.getByText(SLOW_QUERY_HINT_TEXT)).toBeInTheDocument();
- rerender(<></>);
+ rerender(null);
expect(screen.queryByRole("status")).not.toBeInTheDocument();
rerender(<ChartLoadingState progress={null} hintDelayMs={1500} />);
diff --git a/web/src/components/layouts/page.tsx b/web/src/components/layouts/page.tsx
index 5803a2d48f..8d2b44f505 100644
--- a/web/src/components/layouts/page.tsx
+++ b/web/src/components/layouts/page.tsx
@@ -8,7 +8,7 @@ import { useIsMobile } from "@/src/hooks/use-mobile";
import { cn } from "@/src/utils/tailwind";
type PageContainerProps = {
- children: React.ReactNode;
+ children?: React.ReactNode;
headerProps: Omit<PageHeaderProps, "container">;
scrollable?: boolean;
withPadding?: boolean;
diff --git a/web/src/components/table/data-table-pagination.tsx b/web/src/components/table/data-table-pagination.tsx
index af7621e3ab..2bd8d2f82f 100644
--- a/web/src/components/table/data-table-pagination.tsx
+++ b/web/src/components/table/data-table-pagination.tsx
@@ -242,24 +242,21 @@ export function DataTablePagination<TData>({
) : (
`Page ${currentPage}`
)}
- {!hideTotalCount && (
- <>
- {pageCount !== -1 ? (
- <span>of {pageCount}</span>
- ) : (
- <span>
- of{" "}
- {isLoading ? (
- <span className="ml-1 inline-flex align-middle">
- <Spinner size="xxs" variant="muted" display="inline" />
- </span>
- ) : (
- 1
- )}
- </span>
- )}
- </>
- )}
+ {!hideTotalCount &&
+ (pageCount !== -1 ? (
+ <span>of {pageCount}</span>
+ ) : (
+ <span>
+ of{" "}
+ {isLoading ? (
+ <span className="ml-1 inline-flex align-middle">
+ <Spinner size="xxs" variant="muted" display="inline" />
+ </span>
+ ) : (
+ 1
+ )}
+ </span>
+ ))}
</div>
<div className="flex items-center gap-2">
diff --git a/web/src/components/ui/MarkdownJsonView.tsx b/web/src/components/ui/MarkdownJsonView.tsx
index 52eefbd70c..9539263a86 100644
--- a/web/src/components/ui/MarkdownJsonView.tsx
+++ b/web/src/components/ui/MarkdownJsonView.tsx
@@ -168,32 +168,28 @@ export function MarkdownJsonView({
[content, characterLimit],
);
- return (
- <>
- {markdownContent ? (
- <MarkdownView
- markdown={markdownContent.value}
- title={title}
- titleIcon={titleIcon}
- audio={audio}
- media={media}
- controlButtons={controlButtons}
- afterHeader={afterHeader}
- isSystemPrompt={isSystemPrompt}
- />
- ) : (
- <PrettyJsonView
- json={content ?? (audio ? { audio } : null)}
- title={title}
- titleIcon={titleIcon}
- className={className}
- media={media}
- currentView="pretty"
- controlButtons={controlButtons}
- afterHeader={afterHeader}
- isSystemPrompt={isSystemPrompt}
- />
- )}
- </>
+ return markdownContent ? (
+ <MarkdownView
+ markdown={markdownContent.value}
+ title={title}
+ titleIcon={titleIcon}
+ audio={audio}
+ media={media}
+ controlButtons={controlButtons}
+ afterHeader={afterHeader}
+ isSystemPrompt={isSystemPrompt}
+ />
+ ) : (
+ <PrettyJsonView
+ json={content ?? (audio ? { audio } : null)}
+ title={title}
+ titleIcon={titleIcon}
+ className={className}
+ media={media}
+ currentView="pretty"
+ controlButtons={controlButtons}
+ afterHeader={afterHeader}
+ isSystemPrompt={isSystemPrompt}
+ />
);
}
diff --git a/web/src/components/ui/MarkdownViewer.tsx b/web/src/components/ui/MarkdownViewer.tsx
index a797dc61e2..4f18ac0b00 100644
--- a/web/src/components/ui/MarkdownViewer.tsx
+++ b/web/src/components/ui/MarkdownViewer.tsx
@@ -282,7 +282,7 @@ const markdownUrlTransform: NonNullable<Options["urlTransform"]> = (
const markdownComponents: NonNullable<Options["components"]> = {
p({ children, node }) {
if (isImageNode(node)) {
- return <>{children}</>;
+ return children;
}
return <p className="mb-2 whitespace-pre-wrap last:mb-0">{children}</p>;
},
@@ -592,15 +592,13 @@ export function MarkdownView({
return (
<div className="group/iosection overflow-hidden" key={theme}>
{title ? (
- <>
- <MarkdownJsonViewHeader
- title={title}
- titleIcon={titleIcon}
- handleOnCopy={handleOnCopy}
- hoverRevealControls
- controlButtons={controlButtons}
- />
- </>
+ <MarkdownJsonViewHeader
+ title={title}
+ titleIcon={titleIcon}
+ handleOnCopy={handleOnCopy}
+ hoverRevealControls
+ controlButtons={controlButtons}
+ />
) : null}
{afterHeader}
<div
diff --git a/web/src/ee/features/billing/components/BillingCurrentPlanLabel.tsx b/web/src/ee/features/billing/components/BillingCurrentPlanLabel.tsx
index 48ef08363c..8272893670 100644
--- a/web/src/ee/features/billing/components/BillingCurrentPlanLabel.tsx
+++ b/web/src/ee/features/billing/components/BillingCurrentPlanLabel.tsx
@@ -13,7 +13,7 @@ export const BillingCurrentPlanLabel = () => {
return (
<div>
- <>Current plan: {planLabel} </>
+ Current plan: {planLabel}{" "}
{cancellation?.isCancelled && preparedCancellationDate && (
<>
<span>(will end on </span>
diff --git a/web/src/ee/features/billing/components/BillingPlanPeriodView.tsx b/web/src/ee/features/billing/components/BillingPlanPeriodView.tsx
index 780817bd49..85e57c656e 100644
--- a/web/src/ee/features/billing/components/BillingPlanPeriodView.tsx
+++ b/web/src/ee/features/billing/components/BillingPlanPeriodView.tsx
@@ -17,11 +17,9 @@ export const BillingPlanPeriodView = () => {
<BillingCurrentPlanLabel />
<p>
Billing period:{" "}
- {!isLoading && data?.billingPeriod && (
- <>
- {`${formatLocalIsoDate(data.billingPeriod.start, false, "day")} - ${formatLocalIsoDate(data.billingPeriod.end, false, "day")}`}
- </>
- )}
+ {!isLoading &&
+ data?.billingPeriod &&
+ `${formatLocalIsoDate(data.billingPeriod.start, false, "day")} - ${formatLocalIsoDate(data.billingPeriod.end, false, "day")}`}
</p>
</div>
);
diff --git a/web/src/ee/features/sso-settings/components/SsoConfigDialogController.tsx b/web/src/ee/features/sso-settings/components/SsoConfigDialogController.tsx
index 1b83f68474..7a07eb54d1 100644
--- a/web/src/ee/features/sso-settings/components/SsoConfigDialogController.tsx
+++ b/web/src/ee/features/sso-settings/components/SsoConfigDialogController.tsx
@@ -394,33 +394,31 @@ function SsoConfigDialogContent({
) : null}
{selectedProvider === "custom" ? (
- <>
- <FormField
- control={form.control}
- name="authConfig.idToken"
- render={({ field }) => (
- <FormItem className="flex flex-row items-start space-y-0 space-x-3 rounded-md border p-4">
- <FormControl>
- <Checkbox
- checked={field.value ?? false}
- onCheckedChange={(checked) =>
- field.onChange(checked === true)
- }
- />
- </FormControl>
- <div className="space-y-1 leading-none">
- <FormLabel>
- Use id_token claims only (skip userinfo)
- </FormLabel>
- <FormDescription>
- Leave off for IdPs that release email only via the
- userinfo endpoint.
- </FormDescription>
- </div>
- </FormItem>
- )}
- />
- </>
+ <FormField
+ control={form.control}
+ name="authConfig.idToken"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-start space-y-0 space-x-3 rounded-md border p-4">
+ <FormControl>
+ <Checkbox
+ checked={field.value ?? false}
+ onCheckedChange={(checked) =>
+ field.onChange(checked === true)
+ }
+ />
+ </FormControl>
+ <div className="space-y-1 leading-none">
+ <FormLabel>
+ Use id_token claims only (skip userinfo)
+ </FormLabel>
+ <FormDescription>
+ Leave off for IdPs that release email only via the
+ userinfo endpoint.
+ </FormDescription>
+ </div>
+ </FormItem>
+ )}
+ />
) : null}
</DialogBody>
<DialogFooter>
diff --git a/web/src/features/auth/SignInPage.tsx b/web/src/features/auth/SignInPage.tsx
index 913aa3c45e..3a37250d22 100644
--- a/web/src/features/auth/SignInPage.tsx
+++ b/web/src/features/auth/SignInPage.tsx
@@ -844,176 +844,173 @@ export default function SignInPage({
}
return (
- <>
- <div className="flex flex-1 flex-col py-6 sm:min-h-full sm:justify-center sm:px-6 sm:py-12 lg:px-8">
- <div className="sm:mx-auto sm:w-full sm:max-w-md">
- <div className="mx-auto w-fit">
- <LangfuseIcon alt="" />
- </div>
- <h2 className="text-primary mt-4 text-center text-2xl leading-9 font-bold tracking-tight">
- Sign in to your account
- </h2>
+ <div className="flex flex-1 flex-col py-6 sm:min-h-full sm:justify-center sm:px-6 sm:py-12 lg:px-8">
+ <div className="sm:mx-auto sm:w-full sm:max-w-md">
+ <div className="mx-auto w-fit">
+ <LangfuseIcon alt="" />
</div>
+ <h2 className="text-primary mt-4 text-center text-2xl leading-9 font-bold tracking-tight">
+ Sign in to your account
+ </h2>
+ </div>
- {isLangfuseCloud && (
- <div className="bg-card mt-4 -mb-4 rounded-lg p-3 text-center text-sm shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-6">
- If you are experiencing issues signing in, please force refresh this
- page (CMD + SHIFT + R) or clear your browser cache.{" "}
- <a
- href="mailto:[email protected]"
- className="text-link hover:text-link-hover cursor-pointer text-xs font-bold whitespace-nowrap"
- >
- (contact us)
- </a>
- </div>
- )}
-
- {isLangfuseCloud && <CloudRegionSwitch />}
-
- <div className="bg-card mt-14 rounded-lg px-6 py-10 shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-10">
- <div className="space-y-6">
- {/* Email / (optional) password form – only when credentials auth is enabled */}
- {authProviders.credentials && (
- <div>
- <Form {...credentialsForm}>
- <form
- className="space-y-6"
- onSubmit={
- showPasswordStep
- ? credentialsForm.handleSubmit(onCredentialsSubmit)
- : (e) => {
- e.preventDefault();
- handleContinue();
- }
- }
- >
- {/* Email input – always visible */}
+ {isLangfuseCloud && (
+ <div className="bg-card mt-4 -mb-4 rounded-lg p-3 text-center text-sm shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-6">
+ If you are experiencing issues signing in, please force refresh this
+ page (CMD + SHIFT + R) or clear your browser cache.{" "}
+ <a
+ href="mailto:[email protected]"
+ className="text-link hover:text-link-hover cursor-pointer text-xs font-bold whitespace-nowrap"
+ >
+ (contact us)
+ </a>
+ </div>
+ )}
+
+ {isLangfuseCloud && <CloudRegionSwitch />}
+
+ <div className="bg-card mt-14 rounded-lg px-6 py-10 shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-10">
+ <div className="space-y-6">
+ {/* Email / (optional) password form – only when credentials auth is enabled */}
+ {authProviders.credentials && (
+ <div>
+ <Form {...credentialsForm}>
+ <form
+ className="space-y-6"
+ onSubmit={
+ showPasswordStep
+ ? credentialsForm.handleSubmit(onCredentialsSubmit)
+ : (e) => {
+ e.preventDefault();
+ handleContinue();
+ }
+ }
+ >
+ {/* Email input – always visible */}
+ <FormField
+ control={credentialsForm.control}
+ name="email"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>Email</FormLabel>
+ <FormControl>
+ <Input
+ placeholder="[email protected]"
+ allowPasswordManager
+ autoComplete="email"
+ {...field}
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+
+ {/* Password only shown once we know SSO is not configured */}
+ {showPasswordStep && (
<FormField
control={credentialsForm.control}
- name="email"
+ name="password"
render={({ field }) => (
<FormItem>
- <FormLabel>Email</FormLabel>
+ <FormLabel>
+ Password{" "}
+ <Link
+ href={resetPasswordHref}
+ className="text-link hover:text-link-hover ml-1 text-xs"
+ tabIndex={-1}
+ title="What is this?"
+ >
+ (forgot password?)
+ </Link>
+ </FormLabel>
<FormControl>
- <Input
- placeholder="[email protected]"
- allowPasswordManager
- autoComplete="email"
- {...field}
- />
+ <PasswordInput allowPasswordManager {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
+ )}
- {/* Password only shown once we know SSO is not configured */}
- {showPasswordStep && (
- <FormField
- control={credentialsForm.control}
- name="password"
- render={({ field }) => (
- <FormItem>
- <FormLabel>
- Password{" "}
- <Link
- href={resetPasswordHref}
- className="text-link hover:text-link-hover ml-1 text-xs"
- tabIndex={-1}
- title="What is this?"
- >
- (forgot password?)
- </Link>
- </FormLabel>
- <FormControl>
- <PasswordInput allowPasswordManager {...field} />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- )}
-
- {showPasswordStep && turnstileSiteKey && (
- <TurnstileWidget
- ref={turnstileRef}
- siteKey={turnstileSiteKey}
- action={TURNSTILE_ACTIONS.login}
- onTokenChange={setTurnstileToken}
- />
- )}
-
- {/* Primary action button */}
- <Button
- type="submit"
- className="w-full"
- loading={
- showPasswordStep
- ? credentialsForm.formState.isSubmitting
- : continueLoading
- }
- disabled={
- (showPasswordStep &&
- Boolean(turnstileSiteKey) &&
- !turnstileToken) ||
- credentialsForm.watch("email") === "" ||
- (showPasswordStep &&
- credentialsForm.watch("password") === "")
- }
- data-testid="submit-email-password-sign-in-form"
- >
- {showPasswordStep ? "Sign in" : "Continue"}
- </Button>
- </form>
- </Form>
- <div
- className={cn(
- "text-muted-foreground mt-1 text-center text-xs",
- hasMultipleAuthMethods &&
- lastUsedAuthMethod === "credentials"
- ? "block"
- : "hidden",
+ {showPasswordStep && turnstileSiteKey && (
+ <TurnstileWidget
+ ref={turnstileRef}
+ siteKey={turnstileSiteKey}
+ action={TURNSTILE_ACTIONS.login}
+ onTokenChange={setTurnstileToken}
+ />
)}
- >
- Last used
- </div>
- </div>
- )}
- {credentialsFormError ? (
- <div className="text-destructive text-center text-sm font-bold">
- {credentialsFormError}
- <br />
- Contact support if this error is unexpected.{" "}
- {isLangfuseCloud &&
- "Make sure you are using the correct cloud data region."}
- </div>
- ) : null}
- <SSOButtons
- authProviders={authProviders}
- callbackUrl={targetPath}
- lastUsedMethod={lastUsedAuthMethod}
- onProviderSelect={setLastUsedAuthMethod}
- />
- </div>
- {!signUpDisabled &&
- env.NEXT_PUBLIC_SIGN_UP_DISABLED !== "true" &&
- authProviders.credentials ? (
- <p className="text-muted-foreground mt-10 text-center text-sm">
- No account yet?{" "}
- <Link
- href={`/auth/sign-up${router.asPath.includes("?") ? router.asPath.substring(router.asPath.indexOf("?")) : ""}`}
- className="text-link hover:text-link-hover font-bold"
+ {/* Primary action button */}
+ <Button
+ type="submit"
+ className="w-full"
+ loading={
+ showPasswordStep
+ ? credentialsForm.formState.isSubmitting
+ : continueLoading
+ }
+ disabled={
+ (showPasswordStep &&
+ Boolean(turnstileSiteKey) &&
+ !turnstileToken) ||
+ credentialsForm.watch("email") === "" ||
+ (showPasswordStep &&
+ credentialsForm.watch("password") === "")
+ }
+ data-testid="submit-email-password-sign-in-form"
+ >
+ {showPasswordStep ? "Sign in" : "Continue"}
+ </Button>
+ </form>
+ </Form>
+ <div
+ className={cn(
+ "text-muted-foreground mt-1 text-center text-xs",
+ hasMultipleAuthMethods && lastUsedAuthMethod === "credentials"
+ ? "block"
+ : "hidden",
+ )}
>
- Sign up
- </Link>
- </p>
+ Last used
+ </div>
+ </div>
+ )}
+ {credentialsFormError ? (
+ <div className="text-destructive text-center text-sm font-bold">
+ {credentialsFormError}
+ <br />
+ Contact support if this error is unexpected.{" "}
+ {isLangfuseCloud &&
+ "Make sure you are using the correct cloud data region."}
+ </div>
) : null}
+ <SSOButtons
+ authProviders={authProviders}
+ callbackUrl={targetPath}
+ lastUsedMethod={lastUsedAuthMethod}
+ onProviderSelect={setLastUsedAuthMethod}
+ />
</div>
- {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined && (
- <CloudPrivacyNotice action="signing in" />
- )}
+
+ {!signUpDisabled &&
+ env.NEXT_PUBLIC_SIGN_UP_DISABLED !== "true" &&
+ authProviders.credentials ? (
+ <p className="text-muted-foreground mt-10 text-center text-sm">
+ No account yet?{" "}
+ <Link
+ href={`/auth/sign-up${router.asPath.includes("?") ? router.asPath.substring(router.asPath.indexOf("?")) : ""}`}
+ className="text-link hover:text-link-hover font-bold"
+ >
+ Sign up
+ </Link>
+ </p>
+ ) : null}
</div>
- </>
+ {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined && (
+ <CloudPrivacyNotice action="signing in" />
+ )}
+ </div>
);
}
diff --git a/web/src/features/auth/SignUpPage.tsx b/web/src/features/auth/SignUpPage.tsx
index 49519484cd..8f28d7765a 100644
--- a/web/src/features/auth/SignUpPage.tsx
+++ b/web/src/features/auth/SignUpPage.tsx
@@ -636,32 +636,30 @@ function SignupPageShell({ children }: { children: React.ReactNode }) {
const { isLangfuseCloud } = useLangfuseCloudRegion();
return (
- <>
- <div className="flex flex-1 flex-col py-6 sm:min-h-full sm:justify-center sm:px-6 sm:py-12 lg:px-8">
- <div className="sm:mx-auto sm:w-full sm:max-w-md">
- <div className="mx-auto w-fit">
- <LangfuseIcon alt="" />
- </div>
- <h2 className="text-primary mt-4 text-center text-2xl leading-9 font-bold tracking-tight">
- Create new account
- </h2>
+ <div className="flex flex-1 flex-col py-6 sm:min-h-full sm:justify-center sm:px-6 sm:py-12 lg:px-8">
+ <div className="sm:mx-auto sm:w-full sm:max-w-md">
+ <div className="mx-auto w-fit">
+ <LangfuseIcon alt="" />
</div>
- {isLangfuseCloud ? (
- <div className="text-center sm:mx-auto sm:w-full sm:max-w-[480px]">
- No credit card required.
- </div>
- ) : null}
+ <h2 className="text-primary mt-4 text-center text-2xl leading-9 font-bold tracking-tight">
+ Create new account
+ </h2>
+ </div>
+ {isLangfuseCloud ? (
+ <div className="text-center sm:mx-auto sm:w-full sm:max-w-[480px]">
+ No credit card required.
+ </div>
+ ) : null}
- {isLangfuseCloud && <CloudRegionSwitch isSignUpPage />}
+ {isLangfuseCloud && <CloudRegionSwitch isSignUpPage />}
- <div className="bg-card mt-14 rounded-lg px-6 py-10 shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-10">
- {children}
- </div>
- {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined && (
- <CloudPrivacyNotice action="creating an account" />
- )}
+ <div className="bg-card mt-14 rounded-lg px-6 py-10 shadow-sm sm:mx-auto sm:w-full sm:max-w-[480px] sm:px-10">
+ {children}
</div>
- </>
+ {env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined && (
+ <CloudPrivacyNotice action="creating an account" />
+ )}
+ </div>
);
}
diff --git a/web/src/features/automations/components/WebhookSecretRender.tsx b/web/src/features/automations/components/WebhookSecretRender.tsx
index 8148e0214b..c82c2b11af 100644
--- a/web/src/features/automations/components/WebhookSecretRender.tsx
+++ b/web/src/features/automations/components/WebhookSecretRender.tsx
@@ -7,16 +7,14 @@ export const WebhookSecretRender = ({
webhookSecret: string;
}) => {
return (
- <>
- <div className="mb-4">
- <div className="font-bold">Webhook Secret</div>
- <div className="my-2 text-sm">
- This secret can only be viewed once. You can regenerate it in the
- automation settings if needed. Use this secret to verify webhook
- signatures in your endpoint.
- </div>
- <CodeSection variant="outline" content={webhookSecret} />
+ <div className="mb-4">
+ <div className="font-bold">Webhook Secret</div>
+ <div className="my-2 text-sm">
+ This secret can only be viewed once. You can regenerate it in the
+ automation settings if needed. Use this secret to verify webhook
+ signatures in your endpoint.
</div>
- </>
+ <CodeSection variant="outline" content={webhookSecret} />
+ </div>
);
};
diff --git a/web/src/features/batch-actions/components/RunEvaluationDialog/index.tsx b/web/src/features/batch-actions/components/RunEvaluationDialog/index.tsx
index 3b3cf5c245..8de5baee84 100644
--- a/web/src/features/batch-actions/components/RunEvaluationDialog/index.tsx
+++ b/web/src/features/batch-actions/components/RunEvaluationDialog/index.tsx
@@ -328,150 +328,148 @@ export function RunEvaluationDialog(props: RunEvaluationDialogProps) {
});
return (
- <>
- <Dialog
- open
- onOpenChange={(open) =>
- !open && !runEvaluationMutation.isPending && props.onClose()
+ <Dialog
+ open
+ onOpenChange={(open) =>
+ !open && !runEvaluationMutation.isPending && props.onClose()
+ }
+ >
+ <DialogContent
+ {...(showMappingEditor ? { size: "lg" as const } : {})}
+ className={
+ showMappingEditor
+ ? "flex max-h-[85vh] min-h-[38vh] flex-col"
+ : "flex max-h-[62vh] min-h-[38vh] max-w-2xl flex-col"
}
>
- <DialogContent
- {...(showMappingEditor ? { size: "lg" as const } : {})}
+ <DialogHeader>
+ <DialogTitle>
+ {isExperimentsSource
+ ? `Evaluate items from ${displayCount} experiment${displayCount === 1 ? "" : "s"}`
+ : sourceTable === SourceTable.EXPERIMENT_ITEMS
+ ? `Evaluate up to ${displayCount} experiment item${displayCount === 1 ? "" : "s"} across ${experimentItemsExperimentCount} experiment${experimentItemsExperimentCount === 1 ? "" : "s"}`
+ : `Evaluate ${displayCount} ${scopeLabel}${displayCount === 1 ? "" : "s"}`}
+ </DialogTitle>
+ <DialogDescription>
+ {step === "confirm"
+ ? "Review your evaluation configuration before running."
+ : showMappingEditor
+ ? "Select evaluators and review their variable mappings."
+ : "Select one or more evaluators."}
+ </DialogDescription>
+ </DialogHeader>
+
+ <DialogBody
className={
showMappingEditor
- ? "flex max-h-[85vh] min-h-[38vh] flex-col"
- : "flex max-h-[62vh] min-h-[38vh] max-w-2xl flex-col"
+ ? "min-h-0 flex-1 overflow-y-auto"
+ : "flex-1 overflow-hidden"
}
>
- <DialogHeader>
- <DialogTitle>
- {isExperimentsSource
- ? `Evaluate items from ${displayCount} experiment${displayCount === 1 ? "" : "s"}`
- : sourceTable === SourceTable.EXPERIMENT_ITEMS
- ? `Evaluate up to ${displayCount} experiment item${displayCount === 1 ? "" : "s"} across ${experimentItemsExperimentCount} experiment${experimentItemsExperimentCount === 1 ? "" : "s"}`
- : `Evaluate ${displayCount} ${scopeLabel}${displayCount === 1 ? "" : "s"}`}
- </DialogTitle>
- <DialogDescription>
- {step === "confirm"
- ? "Review your evaluation configuration before running."
- : showMappingEditor
- ? "Select evaluators and review their variable mappings."
- : "Select one or more evaluators."}
- </DialogDescription>
- </DialogHeader>
-
- <DialogBody
- className={
- showMappingEditor
- ? "min-h-0 flex-1 overflow-y-auto"
- : "flex-1 overflow-hidden"
- }
- >
- {isExperiencePending ? (
- <Skeleton className="h-20 w-full" />
- ) : step === "select-evaluator" ? (
- showMappingEditor ? (
- <EvaluatorMappingStep
- projectId={projectId}
- store={ruleSetupStore}
- evaluatorOptions={evaluatorOptions}
- isQueryLoading={evaluatorsQuery.isLoading}
- isQueryError={evaluatorsQuery.isError}
- queryErrorMessage={evaluatorsQuery.error?.message}
- search={mappingSearch}
- onSearchChange={(value) => {
- setMappingSearch(value);
- debouncedMappingSearch(value);
- }}
- sampleObject={sampleObject}
- costObservationCount={costObservationCount}
- />
- ) : (
- <EvaluatorSelectionStep
- eligibleEvaluators={eligibleEvaluators}
- selectedEvaluators={selectedEvaluators}
- isQueryLoading={evaluatorsQuery.isLoading}
- isQueryError={evaluatorsQuery.isError}
- queryErrorMessage={evaluatorsQuery.error?.message}
- previewObservation={previewQuery.data?.[0]}
- isPreviewLoading={previewQuery.isLoading}
- selectedEvaluatorIds={selectedEvaluatorIds}
- evaluatorSearchQuery={evaluatorSearchQuery}
- onSearchQueryChange={setEvaluatorSearchQuery}
- onToggleEvaluator={toggleEvaluatorSelection}
- />
- )
- ) : (
- <ConfirmationStep
+ {isExperiencePending ? (
+ <Skeleton className="h-20 w-full" />
+ ) : step === "select-evaluator" ? (
+ showMappingEditor ? (
+ <EvaluatorMappingStep
projectId={projectId}
- displayCount={displayCount}
- evaluators={selectedEvaluators.map((evaluator) => ({
- id: evaluator.id,
- name: evaluator.scoreName,
- }))}
- hideCount={sourceTable !== SourceTable.EVENTS}
- sourceTable={sourceTable}
+ store={ruleSetupStore}
+ evaluatorOptions={evaluatorOptions}
+ isQueryLoading={evaluatorsQuery.isLoading}
+ isQueryError={evaluatorsQuery.isError}
+ queryErrorMessage={evaluatorsQuery.error?.message}
+ search={mappingSearch}
+ onSearchChange={(value) => {
+ setMappingSearch(value);
+ debouncedMappingSearch(value);
+ }}
+ sampleObject={sampleObject}
+ costObservationCount={costObservationCount}
/>
- )}
- </DialogBody>
+ ) : (
+ <EvaluatorSelectionStep
+ eligibleEvaluators={eligibleEvaluators}
+ selectedEvaluators={selectedEvaluators}
+ isQueryLoading={evaluatorsQuery.isLoading}
+ isQueryError={evaluatorsQuery.isError}
+ queryErrorMessage={evaluatorsQuery.error?.message}
+ previewObservation={previewQuery.data?.[0]}
+ isPreviewLoading={previewQuery.isLoading}
+ selectedEvaluatorIds={selectedEvaluatorIds}
+ evaluatorSearchQuery={evaluatorSearchQuery}
+ onSearchQueryChange={setEvaluatorSearchQuery}
+ onToggleEvaluator={toggleEvaluatorSelection}
+ />
+ )
+ ) : (
+ <ConfirmationStep
+ projectId={projectId}
+ displayCount={displayCount}
+ evaluators={selectedEvaluators.map((evaluator) => ({
+ id: evaluator.id,
+ name: evaluator.scoreName,
+ }))}
+ hideCount={sourceTable !== SourceTable.EVENTS}
+ sourceTable={sourceTable}
+ />
+ )}
+ </DialogBody>
- <DialogFooter className="flex justify-between">
- {step === "confirm" ? (
+ <DialogFooter className="flex justify-between">
+ {step === "confirm" ? (
+ <Button
+ variant="ghost"
+ onClick={() => setStep("select-evaluator")}
+ disabled={runEvaluationMutation.isPending}
+ >
+ <ChevronLeft className="icon-base text-icon-foreground mr-1" />
+ Back
+ </Button>
+ ) : (
+ <div />
+ )}
+
+ <div className="flex items-center gap-2">
+ {step !== "confirm" ? (
+ <CreateEvaluatorButton
+ href={createEvaluatorHref}
+ onClick={() => {
+ // The legacy (v3) editor is not part of the onboarding funnel.
+ if (forceV3Experience) return;
+ capture("eval:onboarding_started", {
+ entryPoint: "batch_evaluation",
+ });
+ }}
+ />
+ ) : null}
+ {showMappingEditor ? (
+ <MappingRunButton
+ disabledReason={mappingRunDisabledReason}
+ selectedCount={selectedCount}
+ loading={runEvaluationMutation.isPending}
+ onClick={onSubmit}
+ />
+ ) : step === "select-evaluator" ? (
<Button
- variant="ghost"
- onClick={() => setStep("select-evaluator")}
- disabled={runEvaluationMutation.isPending}
+ onClick={() => setStep("confirm")}
+ disabled={isExperiencePending || selectedCount === 0}
>
- <ChevronLeft className="icon-base text-icon-foreground mr-1" />
- Back
+ Continue{" "}
+ {selectedCount > 0
+ ? `with ${selectedCount} evaluator(s)`
+ : null}
</Button>
) : (
- <div />
+ <Button
+ onClick={onSubmit}
+ loading={runEvaluationMutation.isPending}
+ >
+ Run Evaluation
+ </Button>
)}
-
- <div className="flex items-center gap-2">
- {step !== "confirm" ? (
- <CreateEvaluatorButton
- href={createEvaluatorHref}
- onClick={() => {
- // The legacy (v3) editor is not part of the onboarding funnel.
- if (forceV3Experience) return;
- capture("eval:onboarding_started", {
- entryPoint: "batch_evaluation",
- });
- }}
- />
- ) : null}
- {showMappingEditor ? (
- <MappingRunButton
- disabledReason={mappingRunDisabledReason}
- selectedCount={selectedCount}
- loading={runEvaluationMutation.isPending}
- onClick={onSubmit}
- />
- ) : step === "select-evaluator" ? (
- <Button
- onClick={() => setStep("confirm")}
- disabled={isExperiencePending || selectedCount === 0}
- >
- Continue{" "}
- {selectedCount > 0
- ? `with ${selectedCount} evaluator(s)`
- : null}
- </Button>
- ) : (
- <Button
- onClick={onSubmit}
- loading={runEvaluationMutation.isPending}
- >
- Run Evaluation
- </Button>
- )}
- </div>
- </DialogFooter>
- </DialogContent>
- </Dialog>
- </>
+ </div>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
);
}
diff --git a/web/src/features/blobstorage-integration/BlobStorageIntegrationPage.tsx b/web/src/features/blobstorage-integration/BlobStorageIntegrationPage.tsx
index a84ff38fc0..efa69dee7d 100644
--- a/web/src/features/blobstorage-integration/BlobStorageIntegrationPage.tsx
+++ b/web/src/features/blobstorage-integration/BlobStorageIntegrationPage.tsx
@@ -73,10 +73,8 @@ export default function BlobStorageIntegrationPage() {
breadcrumb: [
{ name: "Settings", href: `/project/${projectId}/settings` },
],
- actionButtonsLeft: (
- <>
- {syncStatus && <StatusBadge type={syncStatusToBadge[syncStatus]} />}
- </>
+ actionButtonsLeft: syncStatus && (
+ <StatusBadge type={syncStatusToBadge[syncStatus]} />
),
actionButtonsRight: (
<Button asChild variant="secondary">
diff --git a/web/src/features/comments/components/MentionAutocomplete.tsx b/web/src/features/comments/components/MentionAutocomplete.tsx
index 3ba93e0c15..c6ad9d2241 100644
--- a/web/src/features/comments/components/MentionAutocomplete.tsx
+++ b/web/src/features/comments/components/MentionAutocomplete.tsx
@@ -71,47 +71,45 @@ export function MentionAutocomplete({
<CommandEmpty role="status">No users found</CommandEmpty>
)}
{!isLoading && users.length > 0 && (
- <>
- <CommandGroup>
- {users.map((user, index) => {
- const displayName = user.name || user.email || "User";
- const isSelected = index === selectedIndex;
- const userLabel = displayName;
- return (
- <CommandItem
- key={user.id}
- value={user.id}
- onSelect={() => onSelect(user.id, displayName)}
- onMouseEnter={() => onSelectedIndexChange(index)}
- ref={isSelected ? selectedItemRef : null}
- role="option"
- aria-selected={isSelected}
- id={user.id}
- >
- <Avatar
- size="sm"
- aria-hidden="true"
- displayName={displayName}
- email={user.email ?? undefined}
- />
- <div className="text-foreground flex-1 overflow-hidden">
- <div className="truncate font-bold" title={userLabel}>
- {userLabel}
- </div>
- {user.email && (
- <div
- className="text-muted-foreground truncate text-xs"
- title={user.email}
- >
- {user.email}
- </div>
- )}
+ <CommandGroup>
+ {users.map((user, index) => {
+ const displayName = user.name || user.email || "User";
+ const isSelected = index === selectedIndex;
+ const userLabel = displayName;
+ return (
+ <CommandItem
+ key={user.id}
+ value={user.id}
+ onSelect={() => onSelect(user.id, displayName)}
+ onMouseEnter={() => onSelectedIndexChange(index)}
+ ref={isSelected ? selectedItemRef : null}
+ role="option"
+ aria-selected={isSelected}
+ id={user.id}
+ >
+ <Avatar
+ size="sm"
+ aria-hidden="true"
+ displayName={displayName}
+ email={user.email ?? undefined}
+ />
+ <div className="text-foreground flex-1 overflow-hidden">
+ <div className="truncate font-bold" title={userLabel}>
+ {userLabel}
</div>
- </CommandItem>
- );
- })}
- </CommandGroup>
- </>
+ {user.email && (
+ <div
+ className="text-muted-foreground truncate text-xs"
+ title={user.email}
+ >
+ {user.email}
+ </div>
+ )}
+ </div>
+ </CommandItem>
+ );
+ })}
+ </CommandGroup>
)}
</CommandList>
</Command>
diff --git a/web/src/features/dashboard/components/LatencyChart.tsx b/web/src/features/dashboard/components/LatencyChart.tsx
index 6e00cccb23..3b2eea1618 100644
--- a/web/src/features/dashboard/components/LatencyChart.tsx
+++ b/web/src/features/dashboard/components/LatencyChart.tsx
@@ -170,30 +170,26 @@ export const GenerationLatencyChart = ({
tabs={data.map((item) => {
return {
tabTitle: item.tabTitle,
- content: (
- <>
- {!isEmptyTimeSeries({ data: item.data }) ? (
- // The height is the flex basis (floor); grow lets the chart absorb
- // extra tile height. On grid (lg) screens the floor is smaller so
- // tiles fit narrow viewports — grow recovers the height above the
- // grid's rowHeight floor. (LFE-10813)
- <div className="h-80 w-full shrink-0 grow lg:h-56">
- <DashboardLineTimeSeriesChart
- data={item.data}
- label="Latency"
- unit="millisecond"
- syncId={syncId}
- sync={sync}
- missingValue="gap"
- />
- </div>
- ) : (
- <NoDataOrLoading
- isLoading={isLoading || latencies.isPending}
- className="h-auto grow"
- />
- )}
- </>
+ content: !isEmptyTimeSeries({ data: item.data }) ? (
+ // The height is the flex basis (floor); grow lets the chart absorb
+ // extra tile height. On grid (lg) screens the floor is smaller so
+ // tiles fit narrow viewports — grow recovers the height above the
+ // grid's rowHeight floor. (LFE-10813)
+ <div className="h-80 w-full shrink-0 grow lg:h-56">
+ <DashboardLineTimeSeriesChart
+ data={item.data}
+ label="Latency"
+ unit="millisecond"
+ syncId={syncId}
+ sync={sync}
+ missingValue="gap"
+ />
+ </div>
+ ) : (
+ <NoDataOrLoading
+ isLoading={isLoading || latencies.isPending}
+ className="h-auto grow"
+ />
),
};
})}
diff --git a/web/src/features/dashboard/components/UserChart.tsx b/web/src/features/dashboard/components/UserChart.tsx
index 24fc7ddcf4..2055721c1d 100644
--- a/web/src/features/dashboard/components/UserChart.tsx
+++ b/web/src/features/dashboard/components/UserChart.tsx
@@ -193,31 +193,28 @@ export const UserChart = ({
tabs={data.map((item) => {
return {
tabTitle: item.tabTitle,
- content: (
- <>
- {item.data.length > 0 ? (
- <div className="flex min-h-0 grow flex-col">
- <TotalMetric
- metric={item.totalMetric}
- description={item.metricDescription}
- />
- <BarListChartArea
- data={item.data}
- maxBars={MAX_BARS}
- metricLabel={item.chartMetricLabel}
- unit={item.chartUnit}
- />
- </div>
- ) : (
- <NoDataOrLoading
- isLoading={isLoading || user.isPending}
- description="Consumption per user is tracked by passing their ids on traces."
- href="https://langfuse.com/docs/observability/features/users"
- className="h-auto grow"
+ content:
+ item.data.length > 0 ? (
+ <div className="flex min-h-0 grow flex-col">
+ <TotalMetric
+ metric={item.totalMetric}
+ description={item.metricDescription}
/>
- )}
- </>
- ),
+ <BarListChartArea
+ data={item.data}
+ maxBars={MAX_BARS}
+ metricLabel={item.chartMetricLabel}
+ unit={item.chartUnit}
+ />
+ </div>
+ ) : (
+ <NoDataOrLoading
+ isLoading={isLoading || user.isPending}
+ description="Consumption per user is tracked by passing their ids on traces."
+ href="https://langfuse.com/docs/observability/features/users"
+ className="h-auto grow"
+ />
+ ),
};
})}
/>
diff --git a/web/src/features/datasets/DatasetExperimentsPage.tsx b/web/src/features/datasets/DatasetExperimentsPage.tsx
index f8bd993cb1..07ca2d60ce 100644
--- a/web/src/features/datasets/DatasetExperimentsPage.tsx
+++ b/web/src/features/datasets/DatasetExperimentsPage.tsx
@@ -206,34 +206,32 @@ function DatasetExperimentsView({
activeTab: DATASET_TABS.EXPERIMENTS,
},
actionButtonsRight: (
- <>
- <Dialog
- open={isCreateExperimentDialogOpen}
- onOpenChange={setIsCreateExperimentDialogOpen}
- >
- <DialogTrigger asChild disabled={!hasExperimentWriteAccess}>
- <Button
- disabled={!hasExperimentWriteAccess}
- onClick={() => capture("dataset_run:new_form_open")}
- >
- <FlaskConical className="icon-base text-icon-foreground" />
- <span className="ml-2 hidden md:block">Run experiment</span>
- </Button>
- </DialogTrigger>
- <DialogContent className="max-h-[90vh] max-w-3xl overflow-y-auto">
- <CreateExperimentsForm
- key={`create-experiment-form-${datasetId}`}
- projectId={projectId as string}
- setFormOpen={setIsCreateExperimentDialogOpen}
- defaultValues={{
- datasetId,
- }}
- handleExperimentSuccess={handleExperimentSuccess}
- showSDKRunInfoPage
- />
- </DialogContent>
- </Dialog>
- </>
+ <Dialog
+ open={isCreateExperimentDialogOpen}
+ onOpenChange={setIsCreateExperimentDialogOpen}
+ >
+ <DialogTrigger asChild disabled={!hasExperimentWriteAccess}>
+ <Button
+ disabled={!hasExperimentWriteAccess}
+ onClick={() => capture("dataset_run:new_form_open")}
+ >
+ <FlaskConical className="icon-base text-icon-foreground" />
+ <span className="ml-2 hidden md:block">Run experiment</span>
+ </Button>
+ </DialogTrigger>
+ <DialogContent className="max-h-[90vh] max-w-3xl overflow-y-auto">
+ <CreateExperimentsForm
+ key={`create-experiment-form-${datasetId}`}
+ projectId={projectId as string}
+ setFormOpen={setIsCreateExperimentDialogOpen}
+ defaultValues={{
+ datasetId,
+ }}
+ handleExperimentSuccess={handleExperimentSuccess}
+ showSDKRunInfoPage
+ />
+ </DialogContent>
+ </Dialog>
),
}}
>
diff --git a/web/src/features/datasets/components/DatasetRunItemsByItemTable.tsx b/web/src/features/datasets/components/DatasetRunItemsByItemTable.tsx
index 06a00e5be7..1e95f0ac1d 100644
--- a/web/src/features/datasets/components/DatasetRunItemsByItemTable.tsx
+++ b/web/src/features/datasets/components/DatasetRunItemsByItemTable.tsx
@@ -195,7 +195,7 @@ export function DatasetRunItemsByItemTable(props: {
cell: ({ row }) => {
const latency: DatasetRunItemByItemRowData["latency"] =
row.getValue("latency");
- return <>{!!latency ? formatIntervalSeconds(latency) : null}</>;
+ return !!latency ? formatIntervalSeconds(latency) : null;
},
},
createNumberTableColumn<DatasetRunItemByItemRowData>({
diff --git a/web/src/features/datasets/components/DatasetRunItemsByRunTable.tsx b/web/src/features/datasets/components/DatasetRunItemsByRunTable.tsx
index 95a906f674..2e52ee3e2e 100644
--- a/web/src/features/datasets/components/DatasetRunItemsByRunTable.tsx
+++ b/web/src/features/datasets/components/DatasetRunItemsByRunTable.tsx
@@ -177,7 +177,7 @@ export function DatasetRunItemsByRunTable(props: {
cell: ({ row }) => {
const latency: DatasetRunItemByRunRowData["latency"] =
row.getValue("latency");
- return <>{!!latency ? formatIntervalSeconds(latency) : null}</>;
+ return !!latency ? formatIntervalSeconds(latency) : null;
},
},
createNumberTableColumn<DatasetRunItemByRunRowData>({
diff --git a/web/src/features/datasets/components/DatasetRunsTable.tsx b/web/src/features/datasets/components/DatasetRunsTable.tsx
index 275a02ad2a..0d0a9ed435 100644
--- a/web/src/features/datasets/components/DatasetRunsTable.tsx
+++ b/web/src/features/datasets/components/DatasetRunsTable.tsx
@@ -553,249 +553,236 @@ function DatasetRunsTableInternal(
// Check if we have charts to display
const hasCharts = Boolean(props.selectedMetrics.length);
- return (
- <>
- {hasCharts ? (
- <ResizablePanelGroup
- orientation="vertical"
- className="h-full"
- onLayoutChanged={(layout) => {
- const charts = layout["dataset-charts"];
- if (charts != null) setChartsPanelSize(charts);
- }}
- >
- <ResizablePanel
- id="dataset-charts"
- defaultSize={`${chartsPanelSize}%`}
- minSize="20%"
- className="overflow-hidden"
- >
- <div className="h-full w-full overflow-x-auto overflow-y-auto p-3">
- <div className="flex h-full w-full gap-4">
- {props.selectedMetrics.map((key) => {
- const title =
- RESOURCE_METRICS.find((metric) => metric.key === key)
- ?.label ?? getScoreLabelFromKey(key);
-
- if (!Boolean(runAggregatedMetrics?.size)) {
- return (
- <div
- key={key}
- className="flex h-full max-w-full min-w-80 flex-col gap-2"
- >
- <span className="shrink-0 text-sm font-bold">
- {title}
- </span>
- <NoDataOrLoading
- isLoading={runsMetrics.isPending}
- className="min-h-[200px]"
- />
- </div>
- );
- }
+ return hasCharts ? (
+ <ResizablePanelGroup
+ orientation="vertical"
+ className="h-full"
+ onLayoutChanged={(layout) => {
+ const charts = layout["dataset-charts"];
+ if (charts != null) setChartsPanelSize(charts);
+ }}
+ >
+ <ResizablePanel
+ id="dataset-charts"
+ defaultSize={`${chartsPanelSize}%`}
+ minSize="20%"
+ className="overflow-hidden"
+ >
+ <div className="h-full w-full overflow-x-auto overflow-y-auto p-3">
+ <div className="flex h-full w-full gap-4">
+ {props.selectedMetrics.map((key) => {
+ const title =
+ RESOURCE_METRICS.find((metric) => metric.key === key)?.label ??
+ getScoreLabelFromKey(key);
+
+ if (!Boolean(runAggregatedMetrics?.size)) {
+ return (
+ <div
+ key={key}
+ className="flex h-full max-w-full min-w-80 flex-col gap-2"
+ >
+ <span className="shrink-0 text-sm font-bold">{title}</span>
+ <NoDataOrLoading
+ isLoading={runsMetrics.isPending}
+ className="min-h-[200px]"
+ />
+ </div>
+ );
+ }
- const adapter = new CompareViewAdapter(
- runAggregatedMetrics,
- key,
- );
- const { chartData, chartLabels } = adapter.toChartData();
-
- const dataPoints = compareViewChartDataToDataPoints(
- chartData,
- chartLabels,
- key,
- );
-
- const chartType =
- chartLabels.length === 1
- ? "LINE_TIME_SERIES"
- : "BAR_TIME_SERIES";
-
- if (dataPoints.length === 0) {
- return (
- <div
- key={key}
- className="flex h-full max-w-full min-w-80 flex-col gap-2"
- >
- <span className="shrink-0 text-sm font-bold">
- {title}
- </span>
- <NoDataOrLoading
- isLoading={runsMetrics.isPending}
- description="No chart data available for the selected runs."
- className="min-h-[200px]"
- />
- </div>
- );
- }
+ const adapter = new CompareViewAdapter(runAggregatedMetrics, key);
+ const { chartData, chartLabels } = adapter.toChartData();
+
+ const dataPoints = compareViewChartDataToDataPoints(
+ chartData,
+ chartLabels,
+ key,
+ );
+
+ const chartType =
+ chartLabels.length === 1
+ ? "LINE_TIME_SERIES"
+ : "BAR_TIME_SERIES";
+
+ if (dataPoints.length === 0) {
+ return (
+ <div
+ key={key}
+ className="flex h-full max-w-full min-w-80 flex-col gap-2"
+ >
+ <span className="shrink-0 text-sm font-bold">{title}</span>
+ <NoDataOrLoading
+ isLoading={runsMetrics.isPending}
+ description="No chart data available for the selected runs."
+ className="min-h-[200px]"
+ />
+ </div>
+ );
+ }
- return (
- <div
- key={key}
- className="flex h-full max-w-full min-w-80 flex-col gap-2"
- >
- <span className="shrink-0 text-sm font-bold">
- {title}
- </span>
- <div className="min-h-[200px] min-w-0 flex-1">
- <Chart
- chartType={chartType}
- data={dataPoints}
- rowLimit={Math.max(dataPoints.length, 1)}
- chartConfig={{
- type: chartType,
- unit: getCompareViewChartUnit(key),
- }}
- />
- </div>
- </div>
- );
- })}
- </div>
- </div>
- </ResizablePanel>
- <ResizableHandle withHandle className="bg-border" />
- <ResizablePanel
- minSize="40%"
- className="flex h-full flex-1 flex-col overflow-hidden"
- >
- <DataTableToolbar
- columns={columns}
- tableName="dataset-runs"
- filterColumnDefinition={transformedFilterOptions}
- filterState={userFilterState}
- setFilterState={setFilterState}
- columnVisibility={columnVisibility}
- setColumnVisibility={setColumnVisibility}
- columnOrder={columnOrder}
- setColumnOrder={setColumnOrder}
- rowHeight={rowHeight}
- setRowHeight={setRowHeight}
- customRowHeight={customRowHeightMenu(rowHeights)}
- actionButtons={[
- Object.keys(selectedRows).filter((runId) =>
+ return (
+ <div
+ key={key}
+ className="flex h-full max-w-full min-w-80 flex-col gap-2"
+ >
+ <span className="shrink-0 text-sm font-bold">{title}</span>
+ <div className="min-h-[200px] min-w-0 flex-1">
+ <Chart
+ chartType={chartType}
+ data={dataPoints}
+ rowLimit={Math.max(dataPoints.length, 1)}
+ chartConfig={{
+ type: chartType,
+ unit: getCompareViewChartUnit(key),
+ }}
+ />
+ </div>
+ </div>
+ );
+ })}
+ </div>
+ </div>
+ </ResizablePanel>
+ <ResizableHandle withHandle className="bg-border" />
+ <ResizablePanel
+ minSize="40%"
+ className="flex h-full flex-1 flex-col overflow-hidden"
+ >
+ <DataTableToolbar
+ columns={columns}
+ tableName="dataset-runs"
+ filterColumnDefinition={transformedFilterOptions}
+ filterState={userFilterState}
+ setFilterState={setFilterState}
+ columnVisibility={columnVisibility}
+ setColumnVisibility={setColumnVisibility}
+ columnOrder={columnOrder}
+ setColumnOrder={setColumnOrder}
+ rowHeight={rowHeight}
+ setRowHeight={setRowHeight}
+ customRowHeight={customRowHeightMenu(rowHeights)}
+ actionButtons={[
+ Object.keys(selectedRows).filter((runId) =>
+ runs.data?.runs.map((run) => run.id).includes(runId),
+ ).length > 0 ? (
+ <DatasetRunTableMultiSelectAction
+ key="multi-select-action"
+ // Exclude items that are not in the current page
+ selectedRunIds={Object.keys(selectedRows).filter((runId) =>
runs.data?.runs.map((run) => run.id).includes(runId),
- ).length > 0 ? (
- <DatasetRunTableMultiSelectAction
- key="multi-select-action"
- // Exclude items that are not in the current page
- selectedRunIds={Object.keys(selectedRows).filter((runId) =>
- runs.data?.runs.map((run) => run.id).includes(runId),
- )}
- projectId={props.projectId}
- datasetId={props.datasetId}
- setRowSelection={setSelectedRows}
- />
- ) : null,
- ]}
- />
- <DataTable
- tableName="datasetRuns"
- columns={columns}
- data={
- runs.isPending
- ? { isLoading: true, isError: false }
- : runs.isError
- ? {
- isLoading: false,
- isError: true,
- error: runs.error.message,
- }
- : {
- isLoading: false,
- isError: false,
- data: (runsWithMetrics.rows ?? []).map((t) =>
- convertToTableRow(t),
- ),
- }
- }
- pagination={{
- totalCount: runs.data?.totalRuns ?? null,
- onChange: setPaginationState,
- state: paginationState,
- }}
- columnVisibility={columnVisibility}
- onColumnVisibilityChange={setColumnVisibility}
- columnOrder={columnOrder}
- onColumnOrderChange={setColumnOrder}
- rowHeight={rowHeight}
- customRowHeightPx={rowHeights.activeHeightPx}
- onCustomRowHeightChange={rowHeights.setCustomPx}
- onSelectRowHeight={setRowHeight}
- rowSelection={selectedRows}
+ )}
+ projectId={props.projectId}
+ datasetId={props.datasetId}
+ setRowSelection={setSelectedRows}
+ />
+ ) : null,
+ ]}
+ />
+ <DataTable
+ tableName="datasetRuns"
+ columns={columns}
+ data={
+ runs.isPending
+ ? { isLoading: true, isError: false }
+ : runs.isError
+ ? {
+ isLoading: false,
+ isError: true,
+ error: runs.error.message,
+ }
+ : {
+ isLoading: false,
+ isError: false,
+ data: (runsWithMetrics.rows ?? []).map((t) =>
+ convertToTableRow(t),
+ ),
+ }
+ }
+ pagination={{
+ totalCount: runs.data?.totalRuns ?? null,
+ onChange: setPaginationState,
+ state: paginationState,
+ }}
+ columnVisibility={columnVisibility}
+ onColumnVisibilityChange={setColumnVisibility}
+ columnOrder={columnOrder}
+ onColumnOrderChange={setColumnOrder}
+ rowHeight={rowHeight}
+ customRowHeightPx={rowHeights.activeHeightPx}
+ onCustomRowHeightChange={rowHeights.setCustomPx}
+ onSelectRowHeight={setRowHeight}
+ rowSelection={selectedRows}
+ setRowSelection={setSelectedRows}
+ />
+ </ResizablePanel>
+ </ResizablePanelGroup>
+ ) : (
+ <>
+ <DataTableToolbar
+ columns={columns}
+ tableName="dataset-runs"
+ filterColumnDefinition={transformedFilterOptions}
+ filterState={userFilterState}
+ setFilterState={setFilterState}
+ columnVisibility={columnVisibility}
+ setColumnVisibility={setColumnVisibility}
+ columnOrder={columnOrder}
+ setColumnOrder={setColumnOrder}
+ rowHeight={rowHeight}
+ setRowHeight={setRowHeight}
+ customRowHeight={customRowHeightMenu(rowHeights)}
+ actionButtons={[
+ Object.keys(selectedRows).filter((runId) =>
+ runs.data?.runs.map((run) => run.id).includes(runId),
+ ).length > 0 ? (
+ <DatasetRunTableMultiSelectAction
+ // Exclude items that are not in the current page
+ selectedRunIds={Object.keys(selectedRows).filter((runId) =>
+ runs.data?.runs.map((run) => run.id).includes(runId),
+ )}
+ projectId={props.projectId}
+ datasetId={props.datasetId}
setRowSelection={setSelectedRows}
/>
- </ResizablePanel>
- </ResizablePanelGroup>
- ) : (
- <>
- <DataTableToolbar
- columns={columns}
- tableName="dataset-runs"
- filterColumnDefinition={transformedFilterOptions}
- filterState={userFilterState}
- setFilterState={setFilterState}
- columnVisibility={columnVisibility}
- setColumnVisibility={setColumnVisibility}
- columnOrder={columnOrder}
- setColumnOrder={setColumnOrder}
- rowHeight={rowHeight}
- setRowHeight={setRowHeight}
- customRowHeight={customRowHeightMenu(rowHeights)}
- actionButtons={[
- Object.keys(selectedRows).filter((runId) =>
- runs.data?.runs.map((run) => run.id).includes(runId),
- ).length > 0 ? (
- <DatasetRunTableMultiSelectAction
- // Exclude items that are not in the current page
- selectedRunIds={Object.keys(selectedRows).filter((runId) =>
- runs.data?.runs.map((run) => run.id).includes(runId),
- )}
- projectId={props.projectId}
- datasetId={props.datasetId}
- setRowSelection={setSelectedRows}
- />
- ) : null,
- ]}
- />
- <DataTable
- tableName="datasetRuns"
- columns={columns}
- data={
- runs.isPending
- ? { isLoading: true, isError: false }
- : runs.isError
- ? {
- isLoading: false,
- isError: true,
- error: runs.error.message,
- }
- : {
- isLoading: false,
- isError: false,
- data: (runsWithMetrics.rows ?? []).map((t) =>
- convertToTableRow(t),
- ),
- }
- }
- pagination={{
- totalCount: runs.data?.totalRuns ?? null,
- onChange: setPaginationState,
- state: paginationState,
- }}
- columnVisibility={columnVisibility}
- onColumnVisibilityChange={setColumnVisibility}
- columnOrder={columnOrder}
- onColumnOrderChange={setColumnOrder}
- rowHeight={rowHeight}
- customRowHeightPx={rowHeights.activeHeightPx}
- onCustomRowHeightChange={rowHeights.setCustomPx}
- onSelectRowHeight={setRowHeight}
- rowSelection={selectedRows}
- setRowSelection={setSelectedRows}
- />
- </>
- )}
+ ) : null,
+ ]}
+ />
+ <DataTable
+ tableName="datasetRuns"
+ columns={columns}
+ data={
+ runs.isPending
+ ? { isLoading: true, isError: false }
+ : runs.isError
+ ? {
+ isLoading: false,
+ isError: true,
+ error: runs.error.message,
+ }
+ : {
+ isLoading: false,
+ isError: false,
+ data: (runsWithMetrics.rows ?? []).map((t) =>
+ convertToTableRow(t),
+ ),
+ }
+ }
+ pagination={{
+ totalCount: runs.data?.totalRuns ?? null,
+ onChange: setPaginationState,
+ state: paginationState,
+ }}
+ columnVisibility={columnVisibility}
+ onColumnVisibilityChange={setColumnVisibility}
+ columnOrder={columnOrder}
+ onColumnOrderChange={setColumnOrder}
+ rowHeight={rowHeight}
+ customRowHeightPx={rowHeights.activeHeightPx}
+ onCustomRowHeightChange={rowHeights.setCustomPx}
+ onSelectRowHeight={setRowHeight}
+ rowSelection={selectedRows}
+ setRowSelection={setSelectedRows}
+ />
</>
);
}
diff --git a/web/src/features/evals/components/evaluator-form.tsx b/web/src/features/evals/components/evaluator-form.tsx
index c2478ef717..ce53c9cccf 100644
--- a/web/src/features/evals/components/evaluator-form.tsx
+++ b/web/src/features/evals/components/evaluator-form.tsx
@@ -30,31 +30,27 @@ export const EvaluatorForm = (props: {
isCodeEvalTemplate: isCodeEvalTemplate(props.evalTemplate),
});
- return (
- <>
- {evalCapabilities.isLoading ? (
- <Skeleton className="h-[30dvh] w-full" />
- ) : (
- <InnerEvaluatorForm
- projectId={props.projectId}
- disabled={props.disabled}
- existingEvaluator={props.existingEvaluator}
- evalTemplate={props.evalTemplate}
- onFormSuccess={props.onFormSuccess}
- shouldWrapVariables={props.shouldWrapVariables}
- hideTargetSection={props.hideTargetSection}
- hideTargetSelection={props.hideTargetSelection}
- mode={props.mode}
- preventRedirect={props.preventRedirect ?? true}
- preprocessFormValues={props.preprocessFormValues}
- useDialog={props.useDialog}
- evalCapabilities={evalCapabilities}
- defaultRunOnLive={props.defaultRunOnLive}
- hidePreviewTable={props.hidePreviewTable}
- defaultTarget={props.defaultTarget}
- />
- )}
- </>
+ return evalCapabilities.isLoading ? (
+ <Skeleton className="h-[30dvh] w-full" />
+ ) : (
+ <InnerEvaluatorForm
+ projectId={props.projectId}
+ disabled={props.disabled}
+ existingEvaluator={props.existingEvaluator}
+ evalTemplate={props.evalTemplate}
+ onFormSuccess={props.onFormSuccess}
+ shouldWrapVariables={props.shouldWrapVariables}
+ hideTargetSection={props.hideTargetSection}
+ hideTargetSelection={props.hideTargetSelection}
+ mode={props.mode}
+ preventRedirect={props.preventRedirect ?? true}
+ preprocessFormValues={props.preprocessFormValues}
+ useDialog={props.useDialog}
+ evalCapabilities={evalCapabilities}
+ defaultRunOnLive={props.defaultRunOnLive}
+ hidePreviewTable={props.hidePreviewTable}
+ defaultTarget={props.defaultTarget}
+ />
);
};
diff --git a/web/src/features/evals/components/evaluator-selector.tsx b/web/src/features/evals/components/evaluator-selector.tsx
index b5406df3ee..e2215df8d8 100644
--- a/web/src/features/evals/components/evaluator-selector.tsx
+++ b/web/src/features/evals/components/evaluator-selector.tsx
@@ -240,77 +240,75 @@ export function EvaluatorSelector({
)}
{filteredTemplates.langfuse.length > 0 && (
- <>
- <InputCommandGroup heading="Langfuse managed evaluators">
- {filteredTemplates.langfuse.map((template) => {
- const isInvalid = isTemplateInvalid(template);
+ <InputCommandGroup heading="Langfuse managed evaluators">
+ {filteredTemplates.langfuse.map((template) => {
+ const isInvalid = isTemplateInvalid(template);
- return (
- <InputCommandItem
- key={`langfuse-${template.id}`}
- disabled={isInvalid}
- onSelect={() => {
- onTemplateSelect(
- template.id,
- template.name,
- template.version,
- );
- }}
- className={cn(
- template.id === selectedTemplateId && "bg-secondary",
- )}
- >
+ return (
+ <InputCommandItem
+ key={`langfuse-${template.id}`}
+ disabled={isInvalid}
+ onSelect={() => {
+ onTemplateSelect(
+ template.id,
+ template.name,
+ template.version,
+ );
+ }}
+ className={cn(
+ template.id === selectedTemplateId && "bg-secondary",
+ )}
+ >
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div className="mr-1 flex min-w-0 items-center">
+ <span className="truncate" title={template.name}>
+ {template.name}
+ </span>
+ {template.type === EvalTemplateType.CODE &&
+ (template.sourceCodeLanguage ===
+ EvalTemplateSourceCodeLanguage.TYPESCRIPT ||
+ template.sourceCodeLanguage ===
+ EvalTemplateSourceCodeLanguage.PYTHON) ? (
+ <CodeTemplateLanguageIcon
+ sourceCodeLanguage={template.sourceCodeLanguage}
+ />
+ ) : null}
+ </div>
+ </TooltipTrigger>
+ <TooltipContent
+ side="right"
+ className="max-h-[70dvh] w-[720px] max-w-[calc(100vw-3rem)] overflow-y-auto"
+ >
+ <TemplatePreviewTooltipContent template={template} />
+ </TooltipContent>
+ </Tooltip>
+ <MaintainerTooltip maintainer={getMaintainer(template)} />
+ {isInvalid && (
<Tooltip>
<TooltipTrigger asChild>
- <div className="mr-1 flex min-w-0 items-center">
- <span className="truncate" title={template.name}>
- {template.name}
- </span>
- {template.type === EvalTemplateType.CODE &&
- (template.sourceCodeLanguage ===
- EvalTemplateSourceCodeLanguage.TYPESCRIPT ||
- template.sourceCodeLanguage ===
- EvalTemplateSourceCodeLanguage.PYTHON) ? (
- <CodeTemplateLanguageIcon
- sourceCodeLanguage={template.sourceCodeLanguage}
- />
- ) : null}
- </div>
+ <AlertCircle className="icon-base ml-1 text-yellow-500" />
</TooltipTrigger>
- <TooltipContent
- side="right"
- className="max-h-[70dvh] w-[720px] max-w-[calc(100vw-3rem)] overflow-y-auto"
- >
- <TemplatePreviewTooltipContent template={template} />
+ <TooltipContent className="max-h-[50dvh] overflow-y-auto text-sm break-normal whitespace-normal">
+ <p>Requires project-level evaluation model</p>
+ <Link
+ href={`/project/${projectId}/evals/default-model`}
+ className="mt-2 block text-blue-600 hover:underline"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ Configure default model
+ </Link>
</TooltipContent>
</Tooltip>
- <MaintainerTooltip maintainer={getMaintainer(template)} />
- {isInvalid && (
- <Tooltip>
- <TooltipTrigger asChild>
- <AlertCircle className="icon-base ml-1 text-yellow-500" />
- </TooltipTrigger>
- <TooltipContent className="max-h-[50dvh] overflow-y-auto text-sm break-normal whitespace-normal">
- <p>Requires project-level evaluation model</p>
- <Link
- href={`/project/${projectId}/evals/default-model`}
- className="mt-2 block text-blue-600 hover:underline"
- target="_blank"
- rel="noopener noreferrer"
- >
- Configure default model
- </Link>
- </TooltipContent>
- </Tooltip>
- )}
- {template.id === selectedTemplateId && (
- <CheckIcon className="icon-base ml-auto" />
- )}
- </InputCommandItem>
- );
- })}
- </InputCommandGroup>
- </>
+ )}
+ {template.id === selectedTemplateId && (
+ <CheckIcon className="icon-base ml-auto" />
+ )}
+ </InputCommandItem>
+ );
+ })}
+ </InputCommandGroup>
)}
</InputCommandList>
</InputCommand>
diff --git a/web/src/features/evals/components/execution-count-tooltip.tsx b/web/src/features/evals/components/execution-count-tooltip.tsx
index cf8d8c08e0..f5492c06db 100644
--- a/web/src/features/evals/components/execution-count-tooltip.tsx
+++ b/web/src/features/evals/components/execution-count-tooltip.tsx
@@ -26,20 +26,18 @@ export const ExecutionCountTooltip = ({
});
return (
- <>
- <span className="text-sm leading-none font-bold peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
- (
- {isLoading ? (
- <span className="inline-block font-mono">...</span>
- ) : (
- compactNumberFormatter(
- !globalConfig.data || (totalCount && totalCount < globalConfig.data)
- ? totalCount
- : globalConfig.data,
- )
- )}
- {isTraceTarget ? " traces" : " dataset run items"})
- </span>
- </>
+ <span className="text-sm leading-none font-bold peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
+ (
+ {isLoading ? (
+ <span className="inline-block font-mono">...</span>
+ ) : (
+ compactNumberFormatter(
+ !globalConfig.data || (totalCount && totalCount < globalConfig.data)
+ ? totalCount
+ : globalConfig.data,
+ )
+ )}
+ {isTraceTarget ? " traces" : " dataset run items"})
+ </span>
);
};
diff --git a/web/src/features/evals/components/template-form.tsx b/web/src/features/evals/components/template-form.tsx
index 02abf304a0..92add8a294 100644
--- a/web/src/features/evals/components/template-form.tsx
+++ b/web/src/features/evals/components/template-form.tsx
@@ -753,32 +753,30 @@ const InnerEvalTemplateForm = (props: {
control={form.control}
name="prompt"
render={({ field }) => (
- <>
- <FormItem>
- <FormLabel>Evaluation prompt</FormLabel>
- <FormDescription>
- Define your llm-as-a-judge evaluation template. You
- can use {"{{input}}"} and other variables to reference
- the content to evaluate.
- </FormDescription>
- <FormControl>
- <CodeMirrorEditor
- value={field.value ?? ""}
- onChange={field.onChange}
- editable={props.isEditing}
- mode="prompt"
- minHeight={200}
- maxHeight="50dvh"
- />
- </FormControl>
- <FormMessage />
- {extractedVariables?.length ? (
- <PromptVariableListPreview
- variables={extractedVariables}
- />
- ) : null}
- </FormItem>
- </>
+ <FormItem>
+ <FormLabel>Evaluation prompt</FormLabel>
+ <FormDescription>
+ Define your llm-as-a-judge evaluation template. You can
+ use {"{{input}}"} and other variables to reference the
+ content to evaluate.
+ </FormDescription>
+ <FormControl>
+ <CodeMirrorEditor
+ value={field.value ?? ""}
+ onChange={field.onChange}
+ editable={props.isEditing}
+ mode="prompt"
+ minHeight={200}
+ maxHeight="50dvh"
+ />
+ </FormControl>
+ <FormMessage />
+ {extractedVariables?.length ? (
+ <PromptVariableListPreview
+ variables={extractedVariables}
+ />
+ ) : null}
+ </FormItem>
)}
/>
</div>
diff --git a/web/src/features/evals/components/template-selector.tsx b/web/src/features/evals/components/template-selector.tsx
index 7693c2460e..475e515e57 100644
--- a/web/src/features/evals/components/template-selector.tsx
+++ b/web/src/features/evals/components/template-selector.tsx
@@ -157,143 +157,51 @@ export const TemplateSelector = ({
: "Select evaluators";
return (
- <>
- <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>
- <PopoverTrigger asChild>
- <Button
- variant="outline"
- role="combobox"
- aria-expanded={isPopoverOpen}
- className={cn(
- "w-full justify-between gap-2 px-2 font-normal",
- className,
- )}
+ <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>
+ <PopoverTrigger asChild>
+ <Button
+ variant="outline"
+ role="combobox"
+ aria-expanded={isPopoverOpen}
+ className={cn(
+ "w-full justify-between gap-2 px-2 font-normal",
+ className,
+ )}
+ >
+ <div className="flex items-center gap-1 overflow-hidden">
+ <span className="mr-1 truncate" title={triggerLabel}>
+ {triggerLabel}
+ </span>
+ </div>
+ <DropdownIndicator />
+ </Button>
+ </PopoverTrigger>
+ <PopoverContent className="w-[300px] p-0" align="start">
+ <InputCommand>
+ <InputCommandInput
+ placeholder="Search evaluators..."
+ className="h-9"
+ value={search}
+ onValueChange={setSearch}
+ variant="bottom"
+ />
+ <div
+ tabIndex={0}
+ className="overflow-y-auto focus:outline-hidden"
+ style={{ maxHeight: "300px" }}
>
- <div className="flex items-center gap-1 overflow-hidden">
- <span className="mr-1 truncate" title={triggerLabel}>
- {triggerLabel}
- </span>
- </div>
- <DropdownIndicator />
- </Button>
- </PopoverTrigger>
- <PopoverContent className="w-[300px] p-0" align="start">
- <InputCommand>
- <InputCommandInput
- placeholder="Search evaluators..."
- className="h-9"
- value={search}
- onValueChange={setSearch}
- variant="bottom"
- />
- <div
- tabIndex={0}
- className="overflow-y-auto focus:outline-hidden"
- style={{ maxHeight: "300px" }}
- >
- <InputCommandList className="max-h-full overflow-visible overflow-x-hidden">
- {!hasResults && (
- <InputCommandEmpty>No evaluator found.</InputCommandEmpty>
- )}
-
- {filteredTemplates.custom.length > 0 && (
- <>
- <InputCommandGroup
- heading="Custom evaluators"
- className="max-h-full"
- >
- {filteredTemplates.custom.map(([familyKey, template]) => {
- const isActive = isTemplateActive(familyKey);
- const isInactive = isTemplateInactive(familyKey);
- const isInvalid = isTemplateInvalid(template);
- const isLegacy =
- existingEvaluators[familyKey]?.targetObject ===
- "dataset";
+ <InputCommandList className="max-h-full overflow-visible overflow-x-hidden">
+ {!hasResults && (
+ <InputCommandEmpty>No evaluator found.</InputCommandEmpty>
+ )}
- return (
- <InputCommandItem
- key={`custom-${familyKey}`}
- onSelect={() => {
- handleRowClick(template.id, familyKey);
- }}
- disabled={isInvalid || disabled}
- >
- {isActive ? (
- <CheckIcon className="icon-base mr-2" />
- ) : (
- <div className="mr-2 h-4 w-4" />
- )}
- {template.name}
- {isLegacy && (
- <Badge variant="outline" className="ml-2 text-xs">
- legacy
- </Badge>
- )}
- {isInvalid && (
- <Tooltip>
- <TooltipTrigger asChild>
- <AlertCircle className="icon-base ml-1 text-yellow-500" />
- </TooltipTrigger>
- <TooltipContent className="max-h-[50dvh] overflow-y-auto text-xs break-normal whitespace-normal">
- <p>Requires project-level evaluation model</p>
- <Link
- href={`/project/${projectId}/evals/default-model`}
- className="mt-2 flex items-center gap-1 text-blue-600 hover:underline"
- target="_blank"
- rel="noopener noreferrer"
- >
- <ExternalLinkIcon className="icon-base" />
- Configure default model
- </Link>
- </TooltipContent>
- </Tooltip>
- )}
- {isInactive && (
- <div
- title="The evaluator has been used in the past but is currently paused. It will not run against outputs created in this dataset run. You can reactivate it if you wish"
- className="text-muted-foreground ml-2 text-xs"
- >
- Paused
- </div>
- )}
- {isActive && (
- <Button
- variant="ghost"
- size="icon-xs"
- onClick={(e) =>
- handleConfigureTemplate(
- e,
- existingEvaluators[familyKey]
- ?.evalTemplateId ?? template.id,
- )
- }
- className="ml-auto"
- title={
- isInvalid
- ? "Configure default model first"
- : "Configure evaluator"
- }
- disabled={isInvalid || disabled}
- >
- <Cog className="icon-sm text-icon-foreground" />
- </Button>
- )}
- </InputCommandItem>
- );
- })}
- </InputCommandGroup>
- {filteredTemplates.custom.length > 0 && (
- <InputCommandSeparator />
- )}
- </>
- )}
-
- {filteredTemplates.langfuse.length > 0 && (
+ {filteredTemplates.custom.length > 0 && (
+ <>
<InputCommandGroup
- heading="Langfuse managed evaluators"
- className="max-h-full min-h-0"
+ heading="Custom evaluators"
+ className="max-h-full"
>
- {filteredTemplates.langfuse.map(([familyKey, template]) => {
+ {filteredTemplates.custom.map(([familyKey, template]) => {
const isActive = isTemplateActive(familyKey);
const isInactive = isTemplateInactive(familyKey);
const isInvalid = isTemplateInvalid(template);
@@ -303,7 +211,7 @@ export const TemplateSelector = ({
return (
<InputCommandItem
- key={`langfuse-${familyKey}`}
+ key={`custom-${familyKey}`}
onSelect={() => {
handleRowClick(template.id, familyKey);
}}
@@ -314,10 +222,7 @@ export const TemplateSelector = ({
) : (
<div className="mr-2 h-4 w-4" />
)}
- <div className="mr-1">{template.name}</div>
- <MaintainerTooltip
- maintainer={getMaintainer(template)}
- />
+ {template.name}
{isLegacy && (
<Badge variant="outline" className="ml-2 text-xs">
legacy
@@ -354,7 +259,6 @@ export const TemplateSelector = ({
<Button
variant="ghost"
size="icon-xs"
- className="ml-auto"
onClick={(e) =>
handleConfigureTemplate(
e,
@@ -362,6 +266,7 @@ export const TemplateSelector = ({
?.evalTemplateId ?? template.id,
)
}
+ className="ml-auto"
title={
isInvalid
? "Configure default model first"
@@ -376,43 +281,135 @@ export const TemplateSelector = ({
);
})}
</InputCommandGroup>
- )}
+ {filteredTemplates.custom.length > 0 && (
+ <InputCommandSeparator />
+ )}
+ </>
+ )}
+
+ {filteredTemplates.langfuse.length > 0 && (
+ <InputCommandGroup
+ heading="Langfuse managed evaluators"
+ className="max-h-full min-h-0"
+ >
+ {filteredTemplates.langfuse.map(([familyKey, template]) => {
+ const isActive = isTemplateActive(familyKey);
+ const isInactive = isTemplateInactive(familyKey);
+ const isInvalid = isTemplateInvalid(template);
+ const isLegacy =
+ existingEvaluators[familyKey]?.targetObject === "dataset";
- <InputCommandSeparator alwaysRender />
- <InputCommandGroup forceMount>
+ return (
+ <InputCommandItem
+ key={`langfuse-${familyKey}`}
+ onSelect={() => {
+ handleRowClick(template.id, familyKey);
+ }}
+ disabled={isInvalid || disabled}
+ >
+ {isActive ? (
+ <CheckIcon className="icon-base mr-2" />
+ ) : (
+ <div className="mr-2 h-4 w-4" />
+ )}
+ <div className="mr-1">{template.name}</div>
+ <MaintainerTooltip
+ maintainer={getMaintainer(template)}
+ />
+ {isLegacy && (
+ <Badge variant="outline" className="ml-2 text-xs">
+ legacy
+ </Badge>
+ )}
+ {isInvalid && (
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <AlertCircle className="icon-base ml-1 text-yellow-500" />
+ </TooltipTrigger>
+ <TooltipContent className="max-h-[50dvh] overflow-y-auto text-xs break-normal whitespace-normal">
+ <p>Requires project-level evaluation model</p>
+ <Link
+ href={`/project/${projectId}/evals/default-model`}
+ className="mt-2 flex items-center gap-1 text-blue-600 hover:underline"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <ExternalLinkIcon className="icon-base" />
+ Configure default model
+ </Link>
+ </TooltipContent>
+ </Tooltip>
+ )}
+ {isInactive && (
+ <div
+ title="The evaluator has been used in the past but is currently paused. It will not run against outputs created in this dataset run. You can reactivate it if you wish"
+ className="text-muted-foreground ml-2 text-xs"
+ >
+ Paused
+ </div>
+ )}
+ {isActive && (
+ <Button
+ variant="ghost"
+ size="icon-xs"
+ className="ml-auto"
+ onClick={(e) =>
+ handleConfigureTemplate(
+ e,
+ existingEvaluators[familyKey]?.evalTemplateId ??
+ template.id,
+ )
+ }
+ title={
+ isInvalid
+ ? "Configure default model first"
+ : "Configure evaluator"
+ }
+ disabled={isInvalid || disabled}
+ >
+ <Cog className="icon-sm text-icon-foreground" />
+ </Button>
+ )}
+ </InputCommandItem>
+ );
+ })}
+ </InputCommandGroup>
+ )}
+
+ <InputCommandSeparator alwaysRender />
+ <InputCommandGroup forceMount>
+ <InputCommandItem
+ onSelect={() => {
+ if (disabled) return;
+ window.open(
+ `${env.NEXT_PUBLIC_BASE_PATH ?? ""}/project/${projectId}/evals/templates/new`,
+ "_blank",
+ );
+ }}
+ >
+ Create custom evaluator
+ <ExternalLink className="icon-base ml-auto" />
+ </InputCommandItem>
+ {!hasDefaultModel && (
<InputCommandItem
onSelect={() => {
if (disabled) return;
window.open(
- `${env.NEXT_PUBLIC_BASE_PATH ?? ""}/project/${projectId}/evals/templates/new`,
+ `${env.NEXT_PUBLIC_BASE_PATH ?? ""}/project/${projectId}/evals/default-model`,
"_blank",
);
}}
>
- Create custom evaluator
+ Configure default model
<ExternalLink className="icon-base ml-auto" />
</InputCommandItem>
- {!hasDefaultModel && (
- <InputCommandItem
- onSelect={() => {
- if (disabled) return;
- window.open(
- `${env.NEXT_PUBLIC_BASE_PATH ?? ""}/project/${projectId}/evals/default-model`,
- "_blank",
- );
- }}
- >
- Configure default model
- <ExternalLink className="icon-base ml-auto" />
- </InputCommandItem>
- )}
- </InputCommandGroup>
- </InputCommandList>
- </div>
- </InputCommand>
- </PopoverContent>
- </Popover>
- </>
+ )}
+ </InputCommandGroup>
+ </InputCommandList>
+ </div>
+ </InputCommand>
+ </PopoverContent>
+ </Popover>
);
};
diff --git a/web/src/features/evals/v2/components/Evaluators/EvaluationTypeConfiguration/components/EvaluationTypeToggle/EvaluationTypeToggle.stories.tsx b/web/src/features/evals/v2/components/Evaluators/EvaluationTypeConfiguration/components/EvaluationTypeToggle/EvaluationTypeToggle.stories.tsx
index 621712a46d..cc22724609 100644
--- a/web/src/features/evals/v2/components/Evaluators/EvaluationTypeConfiguration/components/EvaluationTypeToggle/EvaluationTypeToggle.stories.tsx
+++ b/web/src/features/evals/v2/components/Evaluators/EvaluationTypeConfiguration/components/EvaluationTypeToggle/EvaluationTypeToggle.stories.tsx
@@ -83,40 +83,38 @@ export const WithJudgeModel = meta.story({
onValueChange={setEvaluatorType}
/>
{evaluatorType === EvalTemplateTypeEnum.LLM_AS_JUDGE ? (
- <>
- <JudgeModelPicker
- open={modelPickerOpen}
- onOpenChange={setModelPickerOpen}
- mode={judgeModelMode}
- defaultModel={{ provider: "OpenAI", model: "gpt-4.1-mini" }}
- providerGroups={[
- ["OpenAI", ["gpt-4.1-mini", "gpt-4.1"]],
- ["Anthropic", ["claude-sonnet-4"]],
- ]}
- selectedModel={selectedModel}
- onModeChange={setJudgeModelMode}
- onSelectCustom={(model) => {
- setSelectedModel(model);
- setJudgeModelMode("custom");
- }}
- onConfigureProviders={fn()}
- onConfigureModel={fn()}
- canSetProjectDefault
- onSetProjectDefault={fn()}
- >
- <PopoverTrigger asChild>
- <JudgeModelPickerTrigger
- mode={judgeModelMode}
- defaultModel={{
- provider: "OpenAI",
- model: "gpt-4.1-mini",
- }}
- selectedModel={selectedModel}
- disabled={false}
- />
- </PopoverTrigger>
- </JudgeModelPicker>
- </>
+ <JudgeModelPicker
+ open={modelPickerOpen}
+ onOpenChange={setModelPickerOpen}
+ mode={judgeModelMode}
+ defaultModel={{ provider: "OpenAI", model: "gpt-4.1-mini" }}
+ providerGroups={[
+ ["OpenAI", ["gpt-4.1-mini", "gpt-4.1"]],
+ ["Anthropic", ["claude-sonnet-4"]],
+ ]}
+ selectedModel={selectedModel}
+ onModeChange={setJudgeModelMode}
+ onSelectCustom={(model) => {
+ setSelectedModel(model);
+ setJudgeModelMode("custom");
+ }}
+ onConfigureProviders={fn()}
+ onConfigureModel={fn()}
+ canSetProjectDefault
+ onSetProjectDefault={fn()}
+ >
+ <PopoverTrigger asChild>
+ <JudgeModelPickerTrigger
+ mode={judgeModelMode}
+ defaultModel={{
+ provider: "OpenAI",
+ model: "gpt-4.1-mini",
+ }}
+ selectedModel={selectedModel}
+ disabled={false}
+ />
+ </PopoverTrigger>
+ </JudgeModelPicker>
) : null}
</div>
);
diff --git a/web/src/features/evals/v2/components/Evaluators/EvaluatorBlockedBanner/EvaluatorBlockedBanner.tsx b/web/src/features/evals/v2/components/Evaluators/EvaluatorBlockedBanner/EvaluatorBlockedBanner.tsx
index f5ace2725c..acd498c0dd 100644
--- a/web/src/features/evals/v2/components/Evaluators/EvaluatorBlockedBanner/EvaluatorBlockedBanner.tsx
+++ b/web/src/features/evals/v2/components/Evaluators/EvaluatorBlockedBanner/EvaluatorBlockedBanner.tsx
@@ -5,7 +5,6 @@ import {
} from "@langfuse/shared";
import { AlertTriangle, ExternalLinkIcon, RefreshCcw } from "lucide-react";
import Link from "next/link";
-import { Fragment } from "react";
import { Button } from "@/src/components/ui/button";
@@ -81,12 +80,10 @@ export function EvaluatorBlockedBanner({
<span className="text-muted-foreground font-bold">
{blockMetadata.shortLabel}
</span>
- <Fragment>
- <span className="bg-border h-1 w-1 rounded-full" />
- <span title={blockedAt.toLocaleString()}>
- Paused {blockedAtLabel}
- </span>
- </Fragment>
+ <span className="bg-border h-1 w-1 rounded-full" />
+ <span title={blockedAt.toLocaleString()}>
+ Paused {blockedAtLabel}
+ </span>
</div>
<p className="text-muted-foreground mt-2 max-w-3xl text-sm">
diff --git a/web/src/features/evals/v2/components/Evaluators/EvaluatorStatusBadge/EvaluatorStatusBadge.tsx b/web/src/features/evals/v2/components/Evaluators/EvaluatorStatusBadge/EvaluatorStatusBadge.tsx
index f512247a4b..bcd81eb34a 100644
--- a/web/src/features/evals/v2/components/Evaluators/EvaluatorStatusBadge/EvaluatorStatusBadge.tsx
+++ b/web/src/features/evals/v2/components/Evaluators/EvaluatorStatusBadge/EvaluatorStatusBadge.tsx
@@ -99,26 +99,24 @@ export function EvaluatorStatusBadge({
</div>
}
>
- {({ getTriggerProps }) => (
- <>
- {executionsHref ? (
- <Link
- {...getTriggerProps({
- onClick: (event) => event.stopPropagation(),
- })}
- href={executionsHref}
- aria-label={`View executions: ${status}`}
- className="focus-visible:ring-ring inline-flex rounded-sm focus-visible:ring-2 focus-visible:outline-none"
- >
- {badge}
- </Link>
- ) : (
- <span className="inline-flex" tabIndex={0} {...getTriggerProps()}>
- {badge}
- </span>
- )}
- </>
- )}
+ {({ getTriggerProps }) =>
+ executionsHref ? (
+ <Link
+ {...getTriggerProps({
+ onClick: (event) => event.stopPropagation(),
+ })}
+ href={executionsHref}
+ aria-label={`View executions: ${status}`}
+ className="focus-visible:ring-ring inline-flex rounded-sm focus-visible:ring-2 focus-visible:outline-none"
+ >
+ {badge}
+ </Link>
+ ) : (
+ <span className="inline-flex" tabIndex={0} {...getTriggerProps()}>
+ {badge}
+ </span>
+ )
+ }
</HoverCard>
);
}
diff --git a/web/src/features/experiments/components/ExperimentChartsLayout.tsx b/web/src/features/experiments/components/ExperimentChartsLayout.tsx
index 905776f327..aaf2cacc46 100644
--- a/web/src/features/experiments/components/ExperimentChartsLayout.tsx
+++ b/web/src/features/experiments/components/ExperimentChartsLayout.tsx
@@ -37,7 +37,7 @@ type Props = {
};
export function ExperimentChartsLayout(props: Props) {
- if (!props.fromTimestamp || !props.toTimestamp) return <>{props.children}</>;
+ if (!props.fromTimestamp || !props.toTimestamp) return props.children;
return (
<ChartsLayout
key={props.projectId}
diff --git a/web/src/features/experiments/components/table/ExperimentsTable.tsx b/web/src/features/experiments/components/table/ExperimentsTable.tsx
index 2e60100992..6e631dc063 100644
--- a/web/src/features/experiments/components/table/ExperimentsTable.tsx
+++ b/web/src/features/experiments/components/table/ExperimentsTable.tsx
@@ -996,201 +996,197 @@ export default function ExperimentsTable({
});
return (
- <>
- <DataTableControlsProvider tableName={filterConfig.tableName}>
- <div className="flex h-full w-full flex-col">
- {showControlsInPageHeader && (
- <TableHeaderControls
+ <DataTableControlsProvider tableName={filterConfig.tableName}>
+ <div className="flex h-full w-full flex-col">
+ {showControlsInPageHeader && (
+ <TableHeaderControls
+ timeRange={timeRange}
+ setTimeRange={setTimeRange}
+ desktopOnly
+ />
+ )}
+ <StickySearchableTableFilterLayout
+ search={
+ <TableSearchBar
+ size={showControlsInPageHeader ? "large" : "default"}
+ key={`${viewControllers.filterEditorResetKey}-${queryFilter.draftResetKey}`}
+ isV4={true}
+ filterState={queryFilter.searchBarFilterState}
+ setFilterState={setFiltersWrapper}
+ projectId={projectId}
+ tableName={filterConfig.tableName}
+ observed={observedOptions}
+ registry={searchRegistry}
+ />
+ }
+ toolbar={
+ <DataTableToolbar
+ rowClassName="my-1"
+ columns={columns}
+ filterState={queryFilter.filterState}
+ viewConfig={{
+ tableName: TableViewPresetTableName.Experiments,
+ projectId,
+ controllers: viewControllers,
+ }}
+ tableName={filterConfig.tableName}
+ isV4={true}
+ onColumnGroupToggle={handleColumnGroupToggle}
+ columnsWithCustomSelect={["name", "datasetId"]}
+ columnVisibility={columnVisibility}
+ setColumnVisibility={handleColumnVisibilityChange}
+ columnOrder={columnOrder}
+ setColumnOrder={handleColumnOrderChange}
+ orderByState={orderByState}
+ rowHeight={rowHeight}
+ setRowHeight={setRowHeight}
+ customRowHeight={customRowHeightMenu(rowHeights)}
+ timeRange={showControlsInPageHeader ? undefined : timeRange}
+ setTimeRange={showControlsInPageHeader ? undefined : setTimeRange}
+ actionButtons={[
+ <ExperimentsMultiSelectActionMenu
+ key="experiments-multi-select-actions"
+ projectId={projectId}
+ store={experimentsTableStore}
+ datasetIdByExperimentId={datasetIdByExperimentId}
+ />,
+ ]}
+ hideMobileFilterControls
+ />
+ }
+ mobileControls={
+ <DataTableMobileFilterControls
+ viewConfig={{
+ tableName: TableViewPresetTableName.Experiments,
+ projectId,
+ controllers: viewControllers,
+ }}
+ orderByState={orderByState}
+ filterState={queryFilter.filterState}
+ columnOrder={columnOrder}
+ columnVisibility={columnVisibility}
timeRange={timeRange}
setTimeRange={setTimeRange}
- desktopOnly
- />
- )}
- <StickySearchableTableFilterLayout
- search={
- <TableSearchBar
- size={showControlsInPageHeader ? "large" : "default"}
- key={`${viewControllers.filterEditorResetKey}-${queryFilter.draftResetKey}`}
- isV4={true}
- filterState={queryFilter.searchBarFilterState}
- setFilterState={setFiltersWrapper}
- projectId={projectId}
- tableName={filterConfig.tableName}
- observed={observedOptions}
- registry={searchRegistry}
- />
- }
- toolbar={
- <DataTableToolbar
- rowClassName="my-1"
- columns={columns}
- filterState={queryFilter.filterState}
- viewConfig={{
- tableName: TableViewPresetTableName.Experiments,
- projectId,
- controllers: viewControllers,
- }}
- tableName={filterConfig.tableName}
- isV4={true}
- onColumnGroupToggle={handleColumnGroupToggle}
- columnsWithCustomSelect={["name", "datasetId"]}
- columnVisibility={columnVisibility}
- setColumnVisibility={handleColumnVisibilityChange}
- columnOrder={columnOrder}
- setColumnOrder={handleColumnOrderChange}
- orderByState={orderByState}
- rowHeight={rowHeight}
- setRowHeight={setRowHeight}
- customRowHeight={customRowHeightMenu(rowHeights)}
- timeRange={showControlsInPageHeader ? undefined : timeRange}
- setTimeRange={
- showControlsInPageHeader ? undefined : setTimeRange
- }
- actionButtons={[
- <ExperimentsMultiSelectActionMenu
- key="experiments-multi-select-actions"
- projectId={projectId}
- store={experimentsTableStore}
- datasetIdByExperimentId={datasetIdByExperimentId}
- />,
- ]}
- hideMobileFilterControls
- />
- }
- mobileControls={
- <DataTableMobileFilterControls
- viewConfig={{
- tableName: TableViewPresetTableName.Experiments,
- projectId,
- controllers: viewControllers,
- }}
- orderByState={orderByState}
- filterState={queryFilter.filterState}
- columnOrder={columnOrder}
- columnVisibility={columnVisibility}
- timeRange={timeRange}
- setTimeRange={setTimeRange}
- />
- }
- nonStickyContent={
- isShowingMostRecent ? (
- <div className="text-muted-foreground border-t px-3 py-1.5 text-xs">
- No experiments started in the selected time range. Showing the{" "}
- {mostRecentCount === 1
- ? "most recent run"
- : `${mostRecentCount} most recent runs`}{" "}
- instead.
- </div>
- ) : null
- }
- >
- <DataTableControls
- // Remount the sidebar when the saved view changes so the new view's filters replace any stale draft UI state.
- key={viewControllers.filterEditorResetKey}
- queryFilter={queryFilter}
/>
+ }
+ nonStickyContent={
+ isShowingMostRecent ? (
+ <div className="text-muted-foreground border-t px-3 py-1.5 text-xs">
+ No experiments started in the selected time range. Showing the{" "}
+ {mostRecentCount === 1
+ ? "most recent run"
+ : `${mostRecentCount} most recent runs`}{" "}
+ instead.
+ </div>
+ ) : null
+ }
+ >
+ <DataTableControls
+ // Remount the sidebar when the saved view changes so the new view's filters replace any stale draft UI state.
+ key={viewControllers.filterEditorResetKey}
+ queryFilter={queryFilter}
+ />
- <div className="flex flex-1 flex-col overflow-hidden">
- {/* Table-width, like the events table's pulse strip: inside the
+ <div className="flex flex-1 flex-col overflow-hidden">
+ {/* Table-width, like the events table's pulse strip: inside the
layout so the facet sidebar keeps its full height and the
strip resizes with the table. */}
- <ExperimentChartsLayout
- projectId={projectId}
- experiments={chartExperiments}
- fromTimestamp={chartDateRange?.from}
- toTimestamp={chartDateRange?.to}
- isExternalLoading={experiments.status === "loading"}
- scoreCoverage={scoreCoverage}
- availableMetricOptions={availableMetricOptions}
- isMetricOptionsLoading={
- metricsLoading ||
- isObservationItemScoreLoading ||
- isExperimentScoreColumnLoading
- }
- metricOptionsError={
- metricsError?.message ??
- observationScoreOptionsError?.message ??
- experimentScoreOptionsError?.message ??
- null
+ <ExperimentChartsLayout
+ projectId={projectId}
+ experiments={chartExperiments}
+ fromTimestamp={chartDateRange?.from}
+ toTimestamp={chartDateRange?.to}
+ isExternalLoading={experiments.status === "loading"}
+ scoreCoverage={scoreCoverage}
+ availableMetricOptions={availableMetricOptions}
+ isMetricOptionsLoading={
+ metricsLoading ||
+ isObservationItemScoreLoading ||
+ isExperimentScoreColumnLoading
+ }
+ metricOptionsError={
+ metricsError?.message ??
+ observationScoreOptionsError?.message ??
+ experimentScoreOptionsError?.message ??
+ null
+ }
+ onRetryMetricOptions={() => {
+ refetchMetrics();
+ refetchObservationScoreOptions();
+ refetchExperimentScoreOptions();
+ }}
+ >
+ <DataTable
+ key={`experiments-table-${dataUpdatedAt}`}
+ tableName="experiments"
+ columns={columns}
+ data={
+ experiments.status === "loading" || isViewLoading
+ ? { isLoading: true, isError: false }
+ : experiments.status === "error"
+ ? {
+ isLoading: false,
+ isError: true,
+ error: "",
+ }
+ : {
+ isLoading: false,
+ isError: false,
+ data: rows,
+ }
}
- onRetryMetricOptions={() => {
- refetchMetrics();
- refetchObservationScoreOptions();
- refetchExperimentScoreOptions();
+ pagination={{
+ totalCount,
+ onChange: (updater) => {
+ const newState =
+ typeof updater === "function"
+ ? updater({
+ pageIndex: paginationState.page - 1,
+ pageSize: paginationState.limit,
+ })
+ : updater;
+ setPaginationState({
+ page: newState.pageIndex + 1,
+ limit: newState.pageSize,
+ });
+ },
+ state: {
+ pageIndex: paginationState.page - 1,
+ pageSize: paginationState.limit,
+ },
}}
- >
- <DataTable
- key={`experiments-table-${dataUpdatedAt}`}
- tableName="experiments"
- columns={columns}
- data={
- experiments.status === "loading" || isViewLoading
- ? { isLoading: true, isError: false }
- : experiments.status === "error"
- ? {
- isLoading: false,
- isError: true,
- error: "",
- }
- : {
- isLoading: false,
- isError: false,
- data: rows,
- }
+ selectionStore={experimentsTableStore}
+ setOrderBy={handleOrderByChange}
+ orderBy={orderByState}
+ columnOrder={columnOrder}
+ onColumnOrderChange={handleColumnOrderChange}
+ columnVisibility={columnVisibility}
+ onColumnVisibilityChange={handleColumnVisibilityChange}
+ rowHeight={rowHeight}
+ customRowHeightPx={rowHeights.activeHeightPx}
+ onCustomRowHeightChange={rowHeights.setCustomPx}
+ onSelectRowHeight={setRowHeight}
+ onRowClick={(row, event) => {
+ // Handle Command/Ctrl+click to open experiment in new tab
+ if (event && (event.metaKey || event.ctrlKey)) {
+ event.preventDefault();
+ const experimentId = row.id;
+ const experimentUrl = `/project/${projectId}/experiments/results?baseline=${encodeURIComponent(experimentId)}`;
+ const fullUrl = `${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}${experimentUrl}`;
+ window.open(fullUrl, "_blank");
}
- pagination={{
- totalCount,
- onChange: (updater) => {
- const newState =
- typeof updater === "function"
- ? updater({
- pageIndex: paginationState.page - 1,
- pageSize: paginationState.limit,
- })
- : updater;
- setPaginationState({
- page: newState.pageIndex + 1,
- limit: newState.pageSize,
- });
- },
- state: {
- pageIndex: paginationState.page - 1,
- pageSize: paginationState.limit,
- },
- }}
- selectionStore={experimentsTableStore}
- setOrderBy={handleOrderByChange}
- orderBy={orderByState}
- columnOrder={columnOrder}
- onColumnOrderChange={handleColumnOrderChange}
- columnVisibility={columnVisibility}
- onColumnVisibilityChange={handleColumnVisibilityChange}
- rowHeight={rowHeight}
- customRowHeightPx={rowHeights.activeHeightPx}
- onCustomRowHeightChange={rowHeights.setCustomPx}
- onSelectRowHeight={setRowHeight}
- onRowClick={(row, event) => {
- // Handle Command/Ctrl+click to open experiment in new tab
- if (event && (event.metaKey || event.ctrlKey)) {
- event.preventDefault();
- const experimentId = row.id;
- const experimentUrl = `/project/${projectId}/experiments/results?baseline=${encodeURIComponent(experimentId)}`;
- const fullUrl = `${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}${experimentUrl}`;
- window.open(fullUrl, "_blank");
- }
- // For normal clicks, navigate to experiment detail page
- else {
- router.push(
- `/project/${projectId}/experiments/results?baseline=${encodeURIComponent(row.id)}`,
- );
- }
- }}
- />
- </ExperimentChartsLayout>
- </div>
- </StickySearchableTableFilterLayout>
- </div>
- </DataTableControlsProvider>
- </>
+ // For normal clicks, navigate to experiment detail page
+ else {
+ router.push(
+ `/project/${projectId}/experiments/results?baseline=${encodeURIComponent(row.id)}`,
+ );
+ }
+ }}
+ />
+ </ExperimentChartsLayout>
+ </div>
+ </StickySearchableTableFilterLayout>
+ </div>
+ </DataTableControlsProvider>
);
}
diff --git a/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.clienttest.tsx b/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.clienttest.tsx
index 2c9b0c2c5f..829a1a9403 100644
--- a/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.clienttest.tsx
+++ b/web/src/features/feature-flags/components/OrganizationFeaturePreviewsSettings.clienttest.tsx
@@ -80,7 +80,7 @@ vi.mock("@/src/components/design-system/Switch/Switch", () => ({
}));
vi.mock("@/src/components/ui/alert-dialog", () => ({
- AlertDialog: ({ children }: { children: ReactNode }) => <>{children}</>,
+ AlertDialog: ({ children }: { children: ReactNode }) => children,
AlertDialogContent: ({ children }: { children: ReactNode }) => (
<div>{children}</div>
),
diff --git a/web/src/features/feature-flags/components/UserFeaturePreviewsPopover.clienttest.tsx b/web/src/features/feature-flags/components/UserFeaturePreviewsPopover.clienttest.tsx
index 8cc8b1eff9..e4cbc2dea2 100644
--- a/web/src/features/feature-flags/components/UserFeaturePreviewsPopover.clienttest.tsx
+++ b/web/src/features/feature-flags/components/UserFeaturePreviewsPopover.clienttest.tsx
@@ -49,8 +49,8 @@ vi.mock("@/src/features/notifications/showSuccessToast", () => ({
}));
vi.mock("@/src/components/ui/popover", () => ({
- Popover: ({ children }: { children: ReactNode }) => <>{children}</>,
- PopoverTrigger: ({ children }: { children: ReactNode }) => <>{children}</>,
+ Popover: ({ children }: { children: ReactNode }) => children,
+ PopoverTrigger: ({ children }: { children: ReactNode }) => children,
PopoverContent: ({ children }: { children: ReactNode }) => (
<div>{children}</div>
),
diff --git a/web/src/features/in-app-agent/components/InAppAiAgentProvider.tsx b/web/src/features/in-app-agent/components/InAppAiAgentProvider.tsx
index b15cd0c02b..765492450a 100644
--- a/web/src/features/in-app-agent/components/InAppAiAgentProvider.tsx
+++ b/web/src/features/in-app-agent/components/InAppAiAgentProvider.tsx
@@ -237,7 +237,7 @@ export function InAppAiAgentProvider({
const hasInAppAgentEntitlement = useHasEntitlement("in-app-agent");
if (!projectId || !hasInAppAgentEntitlement) {
- return <>{children}</>;
+ return children;
}
return (
diff --git a/web/src/features/mixpanel-integration/MixpanelIntegrationPage.tsx b/web/src/features/mixpanel-integration/MixpanelIntegrationPage.tsx
index dc20c6e783..e9a882537a 100644
--- a/web/src/features/mixpanel-integration/MixpanelIntegrationPage.tsx
+++ b/web/src/features/mixpanel-integration/MixpanelIntegrationPage.tsx
@@ -90,7 +90,7 @@ export default function MixpanelIntegrationPage() {
breadcrumb: [
{ name: "Settings", href: `/project/${projectId}/settings` },
],
- actionButtonsLeft: <>{status && <StatusBadge type={status} />}</>,
+ actionButtonsLeft: status && <StatusBadge type={status} />,
actionButtonsRight: (
<Button asChild variant="secondary">
<Link href="https://langfuse.com/integrations/analytics/mixpanel">
diff --git a/web/src/features/models/ModelDefinitionsTable/ConnectedModelDefinitionsTable.tsx b/web/src/features/models/ModelDefinitionsTable/ConnectedModelDefinitionsTable.tsx
index 93059c54a8..c3b7cd6d9a 100644
--- a/web/src/features/models/ModelDefinitionsTable/ConnectedModelDefinitionsTable.tsx
+++ b/web/src/features/models/ModelDefinitionsTable/ConnectedModelDefinitionsTable.tsx
@@ -99,123 +99,121 @@ export function ConnectedModelDefinitionsTable({
)}
>
{({ openDialog: openTestMatchDialog }) => (
- <>
- <DialogController<{
- action: "edit" | "clone";
- model: GetModelResult;
- }>
- onBeforeClose={() => editCloseGuard.current()}
- renderDialog={({ state, closeDialog }) => (
- <UpsertModelFormDialogContent
- projectId={projectId}
- action={state.action}
- modelData={state.model}
- closeDialog={closeDialog}
- closeGuardRef={editCloseGuard}
- />
- )}
- >
- {({ openDialog }) => {
- const openCloneDialog = (model: ModelTableRow) => {
- openDialog({
- action: "clone",
- model: model.serverResponse,
- });
- };
- const openEditDialog = (model: ModelTableRow) => {
- openDialog({
- action: "edit",
- model: model.serverResponse,
- });
- };
+ <DialogController<{
+ action: "edit" | "clone";
+ model: GetModelResult;
+ }>
+ onBeforeClose={() => editCloseGuard.current()}
+ renderDialog={({ state, closeDialog }) => (
+ <UpsertModelFormDialogContent
+ projectId={projectId}
+ action={state.action}
+ modelData={state.model}
+ closeDialog={closeDialog}
+ closeGuardRef={editCloseGuard}
+ />
+ )}
+ >
+ {({ openDialog }) => {
+ const openCloneDialog = (model: ModelTableRow) => {
+ openDialog({
+ action: "clone",
+ model: model.serverResponse,
+ });
+ };
+ const openEditDialog = (model: ModelTableRow) => {
+ openDialog({
+ action: "edit",
+ model: model.serverResponse,
+ });
+ };
- return (
- <UpsertModelFormDialogController
- projectId={projectId}
- action="create"
- >
- {({ openDialog: openCreateDialog }) => (
- <ConfirmationDialogController<GetModelResult>
- title="Delete model?"
- text="This action permanently deletes this model definition."
- confirmLabel="Delete model"
- variant="destructive"
- loading={deleteModel.isPending}
- error={deleteModel.error?.message}
- onAfterDismiss={deleteModel.reset}
- onConfirm={async (model) => {
- capture("models:delete_button_click");
- try {
- await deleteModel.mutateAsync({
- projectId,
- modelId: model.id,
- });
- } catch (error) {
- reportTrpcErrorWithoutToast(error, "models");
- throw error;
- }
- }}
- >
- {({ openDialog: openDeleteDialog }) => (
- <ModelDefinitionsTable
- data={data}
- pagination={{
- mode: "offset",
- totalCount: models.data?.totalCount ?? null,
- onChange: setPaginationState,
- state: paginationState,
- }}
- search={{
- value: queryParams.search,
- onChange: (search) => setQueryParams({ search }),
- }}
- rowHeight={rowHeight}
- onRowHeightChange={setRowHeight}
- priceUnit={priceUnit}
- priceUnitMultiplier={priceUnitMultiplier}
- priceUnitSelector={<PriceUnitSelector />}
- lastUsed={lastUsed.data}
- toolbarActions={[
- {
- id: "test-model-match",
- label: "Test Model Match",
- variant: "secondary",
- icon: <FlaskConical className="icon-base" />,
- onClick: openTestMatchDialog,
- },
- {
- id: "add-model-definition",
- label: "Add Model Definition",
- variant: "secondary",
- icon: <PlusIcon className="icon-base" />,
- hasAccess: hasWriteAccess,
- trackingEventName: "models:new_form_open",
- onClick: openCreateDialog,
- },
- ]}
- modelActions={{
- canEdit: hasWriteAccess,
- onClone: openCloneDialog,
- onEdit: openEditDialog,
- onDelete: (model) => {
- deleteModel.reset();
- openDeleteDialog(model.serverResponse);
- },
- }}
- onRowClick={(model) => {
- router.push(
- `/project/${projectId}/settings/models/${model.modelId}`,
- );
- }}
- />
- )}
- </ConfirmationDialogController>
- )}
- </UpsertModelFormDialogController>
- );
- }}
- </DialogController>
- </>
+ return (
+ <UpsertModelFormDialogController
+ projectId={projectId}
+ action="create"
+ >
+ {({ openDialog: openCreateDialog }) => (
+ <ConfirmationDialogController<GetModelResult>
+ title="Delete model?"
+ text="This action permanently deletes this model definition."
+ confirmLabel="Delete model"
+ variant="destructive"
+ loading={deleteModel.isPending}
+ error={deleteModel.error?.message}
+ onAfterDismiss={deleteModel.reset}
+ onConfirm={async (model) => {
+ capture("models:delete_button_click");
+ try {
+ await deleteModel.mutateAsync({
+ projectId,
+ modelId: model.id,
+ });
+ } catch (error) {
+ reportTrpcErrorWithoutToast(error, "models");
+ throw error;
+ }
+ }}
+ >
+ {({ openDialog: openDeleteDialog }) => (
+ <ModelDefinitionsTable
+ data={data}
+ pagination={{
+ mode: "offset",
+ totalCount: models.data?.totalCount ?? null,
+ onChange: setPaginationState,
+ state: paginationState,
+ }}
+ search={{
+ value: queryParams.search,
+ onChange: (search) => setQueryParams({ search }),
+ }}
+ rowHeight={rowHeight}
+ onRowHeightChange={setRowHeight}
+ priceUnit={priceUnit}
+ priceUnitMultiplier={priceUnitMultiplier}
+ priceUnitSelector={<PriceUnitSelector />}
+ lastUsed={lastUsed.data}
+ toolbarActions={[
+ {
+ id: "test-model-match",
+ label: "Test Model Match",
+ variant: "secondary",
+ icon: <FlaskConical className="icon-base" />,
+ onClick: openTestMatchDialog,
+ },
+ {
+ id: "add-model-definition",
+ label: "Add Model Definition",
+ variant: "secondary",
+ icon: <PlusIcon className="icon-base" />,
+ hasAccess: hasWriteAccess,
+ trackingEventName: "models:new_form_open",
+ onClick: openCreateDialog,
+ },
+ ]}
+ modelActions={{
+ canEdit: hasWriteAccess,
+ onClone: openCloneDialog,
+ onEdit: openEditDialog,
+ onDelete: (model) => {
+ deleteModel.reset();
+ openDeleteDialog(model.serverResponse);
+ },
+ }}
+ onRowClick={(model) => {
+ router.push(
+ `/project/${projectId}/settings/models/${model.modelId}`,
+ );
+ }}
+ />
+ )}
+ </ConfirmationDialogController>
+ )}
+ </UpsertModelFormDialogController>
+ );
+ }}
+ </DialogController>
)}
</DialogController>
);
diff --git a/web/src/features/models/components/PriceBreakdownTooltip.tsx b/web/src/features/models/components/PriceBreakdownTooltip.tsx
index 745cade83b..b8dce0cca9 100644
--- a/web/src/features/models/components/PriceBreakdownTooltip.tsx
+++ b/web/src/features/models/components/PriceBreakdownTooltip.tsx
@@ -38,76 +38,67 @@ export const PriceBreakdownTooltip = ({
[prices, priceUnitMultiplier],
);
- return (
- <>
- {Object.keys(prices).length === 0 ? (
- <p>No prices</p>
- ) : Object.keys(prices).length <= (rowHeight === "m" ? 4 : 2) ? (
- <div className="grid w-full grid-cols-[2fr_3fr] gap-x-2">
- {Object.entries(prices).map(([type, price]) => (
- <span key={type}>
- <span
- key={`${type}-label`}
- className="truncate font-mono text-xs font-bold"
- title={type}
- >
- {type}
- </span>
- <span
- key={`${type}-price`}
- className="text-left font-mono text-xs font-bold tabular-nums"
- >
- $
- {new Decimal(price)
- .mul(priceUnitMultiplier)
- .toFixed(maxDecimals)}
- </span>
- </span>
- ))}
- </div>
- ) : (
- <TooltipProvider>
- <Tooltip open={isOpen} onOpenChange={setIsOpen}>
- <TooltipTrigger
- className="flex cursor-pointer items-center gap-2 pr-4 text-xs"
- onClick={() => setIsOpen(!isOpen)}
- >
- <InfoIcon className="icon-sm" />
- {Object.keys(prices).length} prices set
- </TooltipTrigger>
- <TooltipContent className="min-w-64 grow p-4">
- <div className="flex flex-col gap-4">
- <div className="flex flex-col gap-1">
- <span className="font-bold">Price breakdown</span>
- <span className="font-mono text-xs font-bold">
- {modelName}
+ return Object.keys(prices).length === 0 ? (
+ <p>No prices</p>
+ ) : Object.keys(prices).length <= (rowHeight === "m" ? 4 : 2) ? (
+ <div className="grid w-full grid-cols-[2fr_3fr] gap-x-2">
+ {Object.entries(prices).map(([type, price]) => (
+ <span key={type}>
+ <span
+ key={`${type}-label`}
+ className="truncate font-mono text-xs font-bold"
+ title={type}
+ >
+ {type}
+ </span>
+ <span
+ key={`${type}-price`}
+ className="text-left font-mono text-xs font-bold tabular-nums"
+ >
+ ${new Decimal(price).mul(priceUnitMultiplier).toFixed(maxDecimals)}
+ </span>
+ </span>
+ ))}
+ </div>
+ ) : (
+ <TooltipProvider>
+ <Tooltip open={isOpen} onOpenChange={setIsOpen}>
+ <TooltipTrigger
+ className="flex cursor-pointer items-center gap-2 pr-4 text-xs"
+ onClick={() => setIsOpen(!isOpen)}
+ >
+ <InfoIcon className="icon-sm" />
+ {Object.keys(prices).length} prices set
+ </TooltipTrigger>
+ <TooltipContent className="min-w-64 grow p-4">
+ <div className="flex flex-col gap-4">
+ <div className="flex flex-col gap-1">
+ <span className="font-bold">Price breakdown</span>
+ <span className="font-mono text-xs font-bold">{modelName}</span>
+ </div>
+ <div className="flex flex-col gap-2">
+ <div className="flex justify-between font-mono text-xs font-bold">
+ <span className="mr-4">Usage Type</span>
+ <span>Price {priceUnit}</span>
+ </div>
+ {Object.entries(prices).map(([usageType, price]) => (
+ <div
+ key={usageType}
+ className="flex justify-between font-mono text-xs"
+ >
+ <span className="mr-4">{usageType}</span>
+ <span>
+ {"$" +
+ new Decimal(price)
+ .mul(priceUnitMultiplier)
+ .toFixed(maxDecimals)}
</span>
</div>
- <div className="flex flex-col gap-2">
- <div className="flex justify-between font-mono text-xs font-bold">
- <span className="mr-4">Usage Type</span>
- <span>Price {priceUnit}</span>
- </div>
- {Object.entries(prices).map(([usageType, price]) => (
- <div
- key={usageType}
- className="flex justify-between font-mono text-xs"
- >
- <span className="mr-4">{usageType}</span>
- <span>
- {"$" +
- new Decimal(price)
- .mul(priceUnitMultiplier)
- .toFixed(maxDecimals)}
- </span>
- </div>
- ))}
- </div>
- </div>
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
- )}
- </>
+ ))}
+ </div>
+ </div>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
);
};
diff --git a/web/src/features/models/components/test-match/TestModelMatchDialog.tsx b/web/src/features/models/components/test-match/TestModelMatchDialog.tsx
index 8ac957fc82..9e15fb082c 100644
--- a/web/src/features/models/components/test-match/TestModelMatchDialog.tsx
+++ b/web/src/features/models/components/test-match/TestModelMatchDialog.tsx
@@ -102,138 +102,135 @@ export function TestModelMatchDialogContent({
}, [open]);
return (
- <>
- <DialogContent size="lg" className="min-h-[62vh] overflow-y-auto">
- <form onSubmit={handleSubmit} className="flex flex-1 flex-col">
- <DialogHeader>
- <DialogTitle>Test Model Match</DialogTitle>
- <DialogDescription className="mt-1">
- Test which model and pricing tier your ingestion data would match
- against.
- </DialogDescription>
- </DialogHeader>
-
- <DialogBody className="grid grid-cols-[1fr_1px_1fr] gap-6">
- {/* Left Column: Input Form */}
- <div className="flex flex-col justify-between space-y-6">
- <div className="space-y-6">
- {/* Model Name Input */}
- <div className="space-y-2">
- <div className="text-sm font-bold">Model Name *</div>
- <div className="text-muted-foreground text-sm">
- The model name on your generations.
- </div>
- <Input
- placeholder="e.g. gpt-4-turbo"
- value={modelName}
- onChange={(e) => setModelName(e.target.value.trim())}
- autoFocus
- required
- />
+ <DialogContent size="lg" className="min-h-[62vh] overflow-y-auto">
+ <form onSubmit={handleSubmit} className="flex flex-1 flex-col">
+ <DialogHeader>
+ <DialogTitle>Test Model Match</DialogTitle>
+ <DialogDescription className="mt-1">
+ Test which model and pricing tier your ingestion data would match
+ against.
+ </DialogDescription>
+ </DialogHeader>
+
+ <DialogBody className="grid grid-cols-[1fr_1px_1fr] gap-6">
+ {/* Left Column: Input Form */}
+ <div className="flex flex-col justify-between space-y-6">
+ <div className="space-y-6">
+ {/* Model Name Input */}
+ <div className="space-y-2">
+ <div className="text-sm font-bold">Model Name *</div>
+ <div className="text-muted-foreground text-sm">
+ The model name on your generations.
</div>
-
- {/* Usage Details Editor */}
- <UsageDetailsEditor
- usageDetails={usageDetails}
- onChange={setUsageDetails}
- />
-
- <StringMapEditor
- title="Model Parameters"
- description="Add top-level model parameters used by pricing tier conditions."
- entries={modelParameterEntries}
- onChange={setModelParameterEntries}
- />
-
- <StringMapEditor
- title="Metadata"
- description="Add top-level metadata used by pricing tier conditions."
- entries={metadataEntries}
- onChange={setMetadataEntries}
+ <Input
+ placeholder="e.g. gpt-4-turbo"
+ value={modelName}
+ onChange={(e) => setModelName(e.target.value.trim())}
+ autoFocus
+ required
/>
</div>
- {/* Buttons at bottom of left column */}
- <div className="flex gap-2 border-t pt-4">
- <Button
- type="button"
- variant="outline"
- onClick={onClose}
- className="flex-1"
- >
- Close
- </Button>
- <Button
- type="submit"
- disabled={!modelName.trim() || isLoading}
- className="flex-1"
- >
- Test Match
- </Button>
- </div>
+ {/* Usage Details Editor */}
+ <UsageDetailsEditor
+ usageDetails={usageDetails}
+ onChange={setUsageDetails}
+ />
+
+ <StringMapEditor
+ title="Model Parameters"
+ description="Add top-level model parameters used by pricing tier conditions."
+ entries={modelParameterEntries}
+ onChange={setModelParameterEntries}
+ />
+
+ <StringMapEditor
+ title="Metadata"
+ description="Add top-level metadata used by pricing tier conditions."
+ entries={metadataEntries}
+ onChange={setMetadataEntries}
+ />
</div>
- {/* Vertical Divider */}
- <div className="bg-border" />
-
- {/* Right Column: Results Panel */}
- <div className="flex flex-col justify-between">
- <div className="space-y-4 overflow-y-auto pb-4">
- {hasSubmitted && (
- <>
- {isLoading && (
- <div className="bg-muted/30 text-muted-foreground flex min-h-[300px] items-center justify-center gap-2 rounded-lg border p-6">
- <Spinner size="md" />
- <span>Testing match...</span>
- </div>
- )}
-
- {error && (
- <div className="border-destructive/50 bg-destructive/5 text-destructive rounded-lg border p-4 text-sm">
- Error: {error.message}
- </div>
- )}
-
- {!isLoading && !error && data && (
+ {/* Buttons at bottom of left column */}
+ <div className="flex gap-2 border-t pt-4">
+ <Button
+ type="button"
+ variant="outline"
+ onClick={onClose}
+ className="flex-1"
+ >
+ Close
+ </Button>
+ <Button
+ type="submit"
+ disabled={!modelName.trim() || isLoading}
+ className="flex-1"
+ >
+ Test Match
+ </Button>
+ </div>
+ </div>
+
+ {/* Vertical Divider */}
+ <div className="bg-border" />
+
+ {/* Right Column: Results Panel */}
+ <div className="flex flex-col justify-between">
+ <div className="space-y-4 overflow-y-auto pb-4">
+ {hasSubmitted && (
+ <>
+ {isLoading && (
+ <div className="bg-muted/30 text-muted-foreground flex min-h-[300px] items-center justify-center gap-2 rounded-lg border p-6">
+ <Spinner size="md" />
+ <span>Testing match...</span>
+ </div>
+ )}
+
+ {error && (
+ <div className="border-destructive/50 bg-destructive/5 text-destructive rounded-lg border p-4 text-sm">
+ Error: {error.message}
+ </div>
+ )}
+
+ {!isLoading &&
+ !error &&
+ data &&
+ (data.matched ? (
<>
- {data.matched ? (
- <>
- <div className="flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-2.5 dark:border-green-900 dark:bg-green-950">
- <CheckCircle className="icon-base text-green-600 dark:text-green-400" />
- <span className="text-sm font-bold text-green-900 dark:text-green-100">
- Match Found
- </span>
- </div>
- <MatchedModelCard model={data.model} />
- <MatchedTierCard tier={data.matchedTier} />
- </>
- ) : (
- <NoMatchDisplay modelName={modelName} />
- )}
+ <div className="flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-2.5 dark:border-green-900 dark:bg-green-950">
+ <CheckCircle className="icon-base text-green-600 dark:text-green-400" />
+ <span className="text-sm font-bold text-green-900 dark:text-green-100">
+ Match Found
+ </span>
+ </div>
+ <MatchedModelCard model={data.model} />
+ <MatchedTierCard tier={data.matchedTier} />
</>
- )}
- </>
- )}
- </div>
-
- {/* View Model Details button at bottom */}
- {hasSubmitted && !isLoading && !error && data?.matched && (
- <div className="border-t pt-4">
- <Button variant="outline" asChild className="w-full">
- <Link
- href={`/project/${projectId}/settings/models/${data.model.id}?pricingTier=${data.matchedTier.id}`}
- target="_blank"
- >
- View Model Details
- <SquareArrowOutUpRight className="icon-base text-icon-foreground ml-2" />
- </Link>
- </Button>
- </div>
+ ) : (
+ <NoMatchDisplay modelName={modelName} />
+ ))}
+ </>
)}
</div>
- </DialogBody>
- </form>
- </DialogContent>
- </>
+
+ {/* View Model Details button at bottom */}
+ {hasSubmitted && !isLoading && !error && data?.matched && (
+ <div className="border-t pt-4">
+ <Button variant="outline" asChild className="w-full">
+ <Link
+ href={`/project/${projectId}/settings/models/${data.model.id}?pricingTier=${data.matchedTier.id}`}
+ target="_blank"
+ >
+ View Model Details
+ <SquareArrowOutUpRight className="icon-base text-icon-foreground ml-2" />
+ </Link>
+ </Button>
+ </div>
+ )}
+ </div>
+ </DialogBody>
+ </form>
+ </DialogContent>
);
}
diff --git a/web/src/features/monitors/components/MonitorPagePermissions.tsx b/web/src/features/monitors/components/MonitorPagePermissions.tsx
index a14367159b..9a0e3b5c96 100644
--- a/web/src/features/monitors/components/MonitorPagePermissions.tsx
+++ b/web/src/features/monitors/components/MonitorPagePermissions.tsx
@@ -29,5 +29,5 @@ export function MonitorPagePermissions({
return <SupportOrUpgradePage />;
}
- return <>{children}</>;
+ return children;
}
diff --git a/web/src/features/monitors/pages/EditMonitorPage.tsx b/web/src/features/monitors/pages/EditMonitorPage.tsx
index 6791d2e989..307065202b 100644
--- a/web/src/features/monitors/pages/EditMonitorPage.tsx
+++ b/web/src/features/monitors/pages/EditMonitorPage.tsx
@@ -117,9 +117,7 @@ const GetMonitorErrorPage = ({ error }: { error: APIError }) => {
/** EditMonitorLoadingPage renders a loading page while the monitor is loading */
const EditMonitorLoadingPage = ({ projectId }: { projectId: string }) => (
- <Page withPadding headerProps={getHeaderProps(projectId)}>
- <></>
- </Page>
+ <Page withPadding headerProps={getHeaderProps(projectId)} />
);
/** getHeaderProps returns the page header properties for the EditMonitors page */
diff --git a/web/src/features/posthog-integration/PostHogIntegrationPage.tsx b/web/src/features/posthog-integration/PostHogIntegrationPage.tsx
index 9535f9a919..31f86ac697 100644
--- a/web/src/features/posthog-integration/PostHogIntegrationPage.tsx
+++ b/web/src/features/posthog-integration/PostHogIntegrationPage.tsx
@@ -70,7 +70,7 @@ export default function PostHogIntegrationPage() {
breadcrumb: [
{ name: "Settings", href: `/project/${projectId}/settings` },
],
- actionButtonsLeft: <>{status && <StatusBadge type={status} />}</>,
+ actionButtonsLeft: status && <StatusBadge type={status} />,
actionButtonsRight: (
<Button
href="https://langfuse.com/integrations/analytics/posthog"
diff --git a/web/src/features/prompts/components/NewPromptForm/index.tsx b/web/src/features/prompts/components/NewPromptForm/index.tsx
index 839ae8e97c..f8aee9567d 100644
--- a/web/src/features/prompts/components/NewPromptForm/index.tsx
+++ b/web/src/features/prompts/components/NewPromptForm/index.tsx
@@ -278,114 +278,112 @@ export const NewPromptForm: React.FC<NewPromptFormProps> = (props) => {
) : null}
{/* Prompt content field - text vs. chat */}
- <>
- <FormItem>
- <FormLabel>Prompt</FormLabel>
- <FormDescription>
- Define your prompt template. You can use{" "}
- <code className="text-xs">{"{{variable}}"}</code> to insert
- variables into your prompt.
- <b className="font-bold"> Note:</b> Variables must be alphabetical
- characters or underscores. You can also link other text prompts
- using the plus button.
- </FormDescription>
- <Tabs
- value={form.watch("type")}
- onValueChange={(e) => {
- form.setValue("type", e as PromptType);
- }}
- >
- {!initialPrompt ? (
- <Tabs.List variant="inset" size="md" layout="full">
- <span className="flex-1">
- <Tabs.Trigger
- disabled={
- Boolean(initialPromptVariant) &&
- initialPromptVariant?.type !== PromptType.Text
- }
- value={PromptType.Text}
- label={capitalize(PromptType.Text)}
- />
- </span>
- <span className="flex-1">
- <Tabs.Trigger
- disabled={
- Boolean(initialPromptVariant) &&
- initialPromptVariant?.type !== PromptType.Chat
- }
- value={PromptType.Chat}
- label={capitalize(PromptType.Chat)}
- />
- </span>
- </Tabs.List>
- ) : null}
- {hadDraft && (
- <p
- className={`text-muted-foreground mb-1 text-right text-xs ${initialPrompt ? "-mt-2" : "mt-1"}`}
- >
- Draft restored.{" "}
- <button
- type="button"
- className="hover:text-foreground underline"
- onClick={() => {
- clearDraft();
- form.reset(defaultValues);
- setInitialMessages(
- initialPrompt?.type === PromptType.Chat
- ? initialPrompt.prompt
- : [],
- );
- }}
- >
- Discard
- </button>
- </p>
- )}
- <div className="mt-2">
- <Tabs.Content value={PromptType.Text}>
- <FormField
- control={form.control}
- name="textPrompt"
- render={({ field }) => (
- <>
- <FormControl>
- <PromptLinkingEditor
- value={field.value}
- onChange={field.onChange}
- onBlur={field.onBlur}
- minHeight={200}
- />
- </FormControl>
- <FormMessage />
- </>
- )}
+ <FormItem>
+ <FormLabel>Prompt</FormLabel>
+ <FormDescription>
+ Define your prompt template. You can use{" "}
+ <code className="text-xs">{"{{variable}}"}</code> to insert
+ variables into your prompt.
+ <b className="font-bold"> Note:</b> Variables must be alphabetical
+ characters or underscores. You can also link other text prompts
+ using the plus button.
+ </FormDescription>
+ <Tabs
+ value={form.watch("type")}
+ onValueChange={(e) => {
+ form.setValue("type", e as PromptType);
+ }}
+ >
+ {!initialPrompt ? (
+ <Tabs.List variant="inset" size="md" layout="full">
+ <span className="flex-1">
+ <Tabs.Trigger
+ disabled={
+ Boolean(initialPromptVariant) &&
+ initialPromptVariant?.type !== PromptType.Text
+ }
+ value={PromptType.Text}
+ label={capitalize(PromptType.Text)}
/>
- </Tabs.Content>
- </div>
- <div className="mt-2">
- <Tabs.Content value={PromptType.Chat}>
- <FormField
- control={form.control}
- name="chatPrompt"
- render={({ field }) => (
- <>
- <PromptChatMessages
- {...field}
- initialMessages={initialMessages}
- projectId={projectId}
- />
- <FormMessage />
- </>
- )}
+ </span>
+ <span className="flex-1">
+ <Tabs.Trigger
+ disabled={
+ Boolean(initialPromptVariant) &&
+ initialPromptVariant?.type !== PromptType.Chat
+ }
+ value={PromptType.Chat}
+ label={capitalize(PromptType.Chat)}
/>
- </Tabs.Content>
- </div>
- </Tabs>
- </FormItem>
- {currentExtractedVariables.length > 0 && (
- <PromptVariableListPreview variables={currentExtractedVariables} />
- )}
- </>
+ </span>
+ </Tabs.List>
+ ) : null}
+ {hadDraft && (
+ <p
+ className={`text-muted-foreground mb-1 text-right text-xs ${initialPrompt ? "-mt-2" : "mt-1"}`}
+ >
+ Draft restored.{" "}
+ <button
+ type="button"
+ className="hover:text-foreground underline"
+ onClick={() => {
+ clearDraft();
+ form.reset(defaultValues);
+ setInitialMessages(
+ initialPrompt?.type === PromptType.Chat
+ ? initialPrompt.prompt
+ : [],
+ );
+ }}
+ >
+ Discard
+ </button>
+ </p>
+ )}
+ <div className="mt-2">
+ <Tabs.Content value={PromptType.Text}>
+ <FormField
+ control={form.control}
+ name="textPrompt"
+ render={({ field }) => (
+ <>
+ <FormControl>
+ <PromptLinkingEditor
+ value={field.value}
+ onChange={field.onChange}
+ onBlur={field.onBlur}
+ minHeight={200}
+ />
+ </FormControl>
+ <FormMessage />
+ </>
+ )}
+ />
+ </Tabs.Content>
+ </div>
+ <div className="mt-2">
+ <Tabs.Content value={PromptType.Chat}>
+ <FormField
+ control={form.control}
+ name="chatPrompt"
+ render={({ field }) => (
+ <>
+ <PromptChatMessages
+ {...field}
+ initialMessages={initialMessages}
+ projectId={projectId}
+ />
+ <FormMessage />
+ </>
+ )}
+ />
+ </Tabs.Content>
+ </div>
+ </Tabs>
+ </FormItem>
+ {currentExtractedVariables.length > 0 && (
+ <PromptVariableListPreview variables={currentExtractedVariables} />
+ )}
{/* Prompt Config field */}
<FormField
diff --git a/web/src/features/search-bar/components/ComposerTokens.tsx b/web/src/features/search-bar/components/ComposerTokens.tsx
index b904cce52a..ed198ae5a6 100644
--- a/web/src/features/search-bar/components/ComposerTokens.tsx
+++ b/web/src/features/search-bar/components/ComposerTokens.tsx
@@ -226,5 +226,5 @@ export function ComposerTokens({
freeTextReason,
highlightedSegmentId,
]);
- return <>{out}</>;
+ return out;
}
diff --git a/web/src/features/sessions/ModernSessionFilterControls.clienttest.tsx b/web/src/features/sessions/ModernSessionFilterControls.clienttest.tsx
index d0c877b8c4..d45ae95596 100644
--- a/web/src/features/sessions/ModernSessionFilterControls.clienttest.tsx
+++ b/web/src/features/sessions/ModernSessionFilterControls.clienttest.tsx
@@ -38,14 +38,13 @@ vi.mock("@/src/features/posthog-analytics/usePostHogClientCapture", () => ({
vi.mock(
"@/src/components/table/table-view-presets/components/data-table-view-presets-drawer",
() => ({
- TableViewPresetsDrawerRoot: ({ children }: { children: ReactNode }) => (
- <>{children}</>
- ),
+ TableViewPresetsDrawerRoot: ({ children }: { children: ReactNode }) =>
+ children,
TableViewPresetsDrawerContent: () => <div />,
}),
);
vi.mock("@/src/components/ui/dialog", () => ({
- Dialog: ({ children }: { children: ReactNode }) => <>{children}</>,
+ Dialog: ({ children }: { children: ReactNode }) => children,
}));
vi.mock("./ModernSessionFilterDialogContent", () => ({
ModernSessionFilterDialogContent: ({
diff --git a/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineToolRow/SessionTimelineToolRow.tsx b/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineToolRow/SessionTimelineToolRow.tsx
index 9505807dcc..15167426dc 100644
--- a/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineToolRow/SessionTimelineToolRow.tsx
+++ b/web/src/features/sessions/components/ConnectedModernSessionBodyTimeline/components/ConnectedSessionConversationTimeline/components/SessionConversationalView/components/SessionConversationTimeline/components/SessionConversationTimelineTrace/components/SessionTranscriptContent/components/SessionTimelineToolRow/SessionTimelineToolRow.tsx
@@ -50,44 +50,42 @@ export function SessionTimelineToolRow({
onExpandedChange={onExpandedChange}
trailingContent={trailingContent}
labelTrailingContent={
- <>
- {level &&
- StatusIcon &&
- (statusMessage || level === "WARNING" || level === "ERROR") ? (
- <SessionToolTooltip
- variant="timeline"
- content={{
- type: "status",
- name,
- level,
- message: statusMessage || level,
- }}
- >
- {({ getTriggerProps }) => (
- <span
- {...getTriggerProps()}
- tabIndex={0}
- aria-label={`Tool status: ${level}`}
- className={cn(
- "ml-1 flex shrink-0 items-center",
- (
- {
- ERROR: "dark:text-dark-red/90 text-red-800",
- WARNING: "dark:text-dark-yellow text-yellow-800",
- DEFAULT:
- "text-muted-foreground opacity-0 group-hover/collapsible-row:opacity-100 group-has-[:focus-visible]/collapsible-row:opacity-100 group-data-[expanded=true]/collapsible-row:opacity-100",
- DEBUG:
- "text-muted-foreground opacity-0 group-hover/collapsible-row:opacity-100 group-has-[:focus-visible]/collapsible-row:opacity-100 group-data-[expanded=true]/collapsible-row:opacity-100",
- } satisfies Record<Observation["level"], string>
- )[level],
- )}
- >
- <StatusIcon className="icon-sm" aria-hidden="true" />
- </span>
- )}
- </SessionToolTooltip>
- ) : null}
- </>
+ level &&
+ StatusIcon &&
+ (statusMessage || level === "WARNING" || level === "ERROR") ? (
+ <SessionToolTooltip
+ variant="timeline"
+ content={{
+ type: "status",
+ name,
+ level,
+ message: statusMessage || level,
+ }}
+ >
+ {({ getTriggerProps }) => (
+ <span
+ {...getTriggerProps()}
+ tabIndex={0}
+ aria-label={`Tool status: ${level}`}
+ className={cn(
+ "ml-1 flex shrink-0 items-center",
+ (
+ {
+ ERROR: "dark:text-dark-red/90 text-red-800",
+ WARNING: "dark:text-dark-yellow text-yellow-800",
+ DEFAULT:
+ "text-muted-foreground opacity-0 group-hover/collapsible-row:opacity-100 group-has-[:focus-visible]/collapsible-row:opacity-100 group-data-[expanded=true]/collapsible-row:opacity-100",
+ DEBUG:
+ "text-muted-foreground opacity-0 group-hover/collapsible-row:opacity-100 group-has-[:focus-visible]/collapsible-row:opacity-100 group-data-[expanded=true]/collapsible-row:opacity-100",
+ } satisfies Record<Observation["level"], string>
+ )[level],
+ )}
+ >
+ <StatusIcon className="icon-sm" aria-hidden="true" />
+ </span>
+ )}
+ </SessionToolTooltip>
+ ) : null
}
>
<div className="flex min-w-0 flex-col gap-3 pl-[22px]">
diff --git a/web/src/features/slack/SlackIntegrationPage.tsx b/web/src/features/slack/SlackIntegrationPage.tsx
index fca4f32a8f..63e7ed3e69 100644
--- a/web/src/features/slack/SlackIntegrationPage.tsx
+++ b/web/src/features/slack/SlackIntegrationPage.tsx
@@ -100,7 +100,7 @@ export default function SlackIntegrationPage() {
breadcrumb: [
{ name: "Settings", href: `/project/${projectId}/settings` },
],
- actionButtonsLeft: <>{status && <StatusBadge type={status} />}</>,
+ actionButtonsLeft: status && <StatusBadge type={status} />,
actionButtonsRight: <AutomationButton projectId={projectId} />,
}}
>
diff --git a/web/src/features/topics/TopicPipelineForm.tsx b/web/src/features/topics/TopicPipelineForm.tsx
index d06a42074a..2f1e4a2096 100644
--- a/web/src/features/topics/TopicPipelineForm.tsx
+++ b/web/src/features/topics/TopicPipelineForm.tsx
@@ -166,28 +166,26 @@ export function useTopicPipelineForm({
}
}
const operationControls = (
- <>
- <div className="flex flex-wrap items-center justify-between gap-3">
- <div className="w-64 max-w-full">
- <SelectInput
- aria-label="Pipeline operation"
- placeholder="Pipeline operation"
- options={[
- { value: "process", label: "Process traces" },
- { value: "update", label: "Update topics" },
- ]}
- value={operation}
- onValueChange={(value) => {
- setOperation(value as TopicOperation);
- resetTraceSelection();
- setError(null);
- if (value === "update")
- utils.topics.summaryCounts.invalidate({ projectId });
- }}
- />
- </div>
+ <div className="flex flex-wrap items-center justify-between gap-3">
+ <div className="w-64 max-w-full">
+ <SelectInput
+ aria-label="Pipeline operation"
+ placeholder="Pipeline operation"
+ options={[
+ { value: "process", label: "Process traces" },
+ { value: "update", label: "Update topics" },
+ ]}
+ value={operation}
+ onValueChange={(value) => {
+ setOperation(value as TopicOperation);
+ resetTraceSelection();
+ setError(null);
+ if (value === "update")
+ utils.topics.summaryCounts.invalidate({ projectId });
+ }}
+ />
</div>
- </>
+ </div>
);
let actionLabel = "Update topics";
if (operation === "process")
diff --git a/web/src/features/traces/TracesPage.tsx b/web/src/features/traces/TracesPage.tsx
index 4e5505d8d1..7a585722be 100644
--- a/web/src/features/traces/TracesPage.tsx
+++ b/web/src/features/traces/TracesPage.tsx
@@ -87,14 +87,11 @@ export default function TracesPage() {
},
}}
>
- {!isResolved ? (
- <>
- {/* Wait for the beta flag before mounting either table. Otherwise the
- legacy table can briefly mount, restore a v3 saved view, and
- promote its viewId into the URL before the correct mode
- resolves. */}
- </>
- ) : isV4 ? (
+ {/* Wait for the beta flag before mounting either table. Otherwise the
+ legacy table can briefly mount, restore a v3 saved view, and
+ promote its viewId into the URL before the correct mode
+ resolves. */}
+ {!isResolved ? null : isV4 ? (
<ObservationsEventsTable
projectId={projectId}
showControlsInPageHeader
diff --git a/web/src/features/traces/components/VirtualizedTreeNodeWrapper.tsx b/web/src/features/traces/components/VirtualizedTreeNodeWrapper.tsx
index 75dcbceb5f..22289cfb57 100644
--- a/web/src/features/traces/components/VirtualizedTreeNodeWrapper.tsx
+++ b/web/src/features/traces/components/VirtualizedTreeNodeWrapper.tsx
@@ -131,14 +131,12 @@ export function VirtualizedTreeNodeWrapper(
{/* 2. Current element bars: up/down/horizontal connectors */}
{visualDepth > 0 && (
<div className="relative w-5 shrink-0">
- <>
- {/* Spine continuing to the next sibling */}
- {!isLastSibling && (
- <div className="bg-border-contrast absolute top-0 bottom-0 left-3 w-px" />
- )}
- {/* Rounded elbow into the icon */}
- <div className="border-border-contrast absolute top-0 left-3 z-20 h-3.5 w-3 rounded-bl-md border-b border-l mask-r-from-40%" />
- </>
+ {/* Spine continuing to the next sibling */}
+ {!isLastSibling && (
+ <div className="bg-border-contrast absolute top-0 bottom-0 left-3 w-px" />
+ )}
+ {/* Rounded elbow into the icon */}
+ <div className="border-border-contrast absolute top-0 left-3 z-20 h-3.5 w-3 rounded-bl-md border-b border-l mask-r-from-40%" />
</div>
)}
diff --git a/web/src/features/tracing-tables/observations/ObservationsPage.tsx b/web/src/features/tracing-tables/observations/ObservationsPage.tsx
index 7d92dda891..f84bd1f824 100644
--- a/web/src/features/tracing-tables/observations/ObservationsPage.tsx
+++ b/web/src/features/tracing-tables/observations/ObservationsPage.tsx
@@ -61,16 +61,13 @@ export default function ObservationsPage() {
scrollable={showOnboarding}
>
{/* Show onboarding screen if user has no traces */}
+ {/* Wait for the beta flag before mounting either table. Otherwise the
+ legacy table can briefly mount, restore a v3 saved view, and
+ promote its viewId into the URL before the correct mode
+ resolves. */}
{showOnboarding ? (
<TracesOnboarding projectId={projectId} />
- ) : !isResolved ? (
- <>
- {/* Wait for the beta flag before mounting either table. Otherwise the
- legacy table can briefly mount, restore a v3 saved view, and
- promote its viewId into the URL before the correct mode
- resolves. */}
- </>
- ) : isV4 ? (
+ ) : !isResolved ? null : isV4 ? (
<ObservationsEventsTable
projectId={projectId}
showControlsInPageHeader
diff --git a/web/src/features/v4-migration/V4MigrationEntryPoints.clienttest.tsx b/web/src/features/v4-migration/V4MigrationEntryPoints.clienttest.tsx
index 6bcf1abc23..a6b8ea0d4d 100644
--- a/web/src/features/v4-migration/V4MigrationEntryPoints.clienttest.tsx
+++ b/web/src/features/v4-migration/V4MigrationEntryPoints.clienttest.tsx
@@ -9,7 +9,7 @@ import {
function V4MigrationNavItemHarness() {
const project = useV4MigrationNavItemProject();
- return <>{project && <V4MigrationNavItem project={project} />}</>;
+ return project && <V4MigrationNavItem project={project} />;
}
import { V4MigrationProjectChip } from "./V4MigrationProjectChip";
import { type ProjectMigrationStatus } from "./migrationData";
diff --git a/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx b/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx
index 1d1818df43..f39fd898ee 100644
--- a/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx
+++ b/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx
@@ -60,7 +60,7 @@ vi.mock("next-auth/react", () => ({
}));
vi.mock("@/src/components/layouts/container-page", () => ({
- default: ({ children }: { children: React.ReactNode }) => <>{children}</>,
+ default: ({ children }: { children: React.ReactNode }) => children,
}));
vi.mock("@/src/features/support-chat/SupportDrawerProvider", () => ({