🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(v4): prevent project overview layout shift; change deprecation date to Oct 9 (#15869)
marliessophie55e23b29db6f
diff --git a/web/src/features/organizations/components/ProjectOverview.tsx b/web/src/features/organizations/components/ProjectOverview.tsxindex de50b4175c..2aa545d704 100644--- a/web/src/features/organizations/components/ProjectOverview.tsx+++ b/web/src/features/organizations/components/ProjectOverview.tsx@@ -49,11 +49,10 @@ const OrganizationProjectTiles = ({search?: string;}) => {const v4UpgradeUiEnabled = useV4UpgradeUiEnabled();- const { data: lastTraceTimes } =- api.organizations.lastTraceByProject.useQuery(- { orgId: org.id },- { enabled: v4UpgradeUiEnabled },- );+ const lastTraceQuery = api.organizations.lastTraceByProject.useQuery(+ { orgId: org.id },+ { enabled: v4UpgradeUiEnabled },+ );const migrationStatusByProjectId = useAccountV4MigrationData({organizations: [{@@ -101,17 +100,19 @@ const OrganizationProjectTiles = ({)}</div></CardHeader>- {!project.deletedAt && lastTraceTimes && (- <CardContent className="pb-3">+ {!project.deletedAt && (+ <CardContent className="min-h-7 pb-3"><p className="text-muted-foreground text-xs">- {(() => {- const lastTraceAt = lastTraceTimes.find(- (t) => t.projectId === project.id,- )?.lastTraceAt;- return lastTraceAt- ? `Last trace ${formatCompactRelativeTime(new Date(lastTraceAt))}`- : "No traces in the last 30d";- })()}+ {lastTraceQuery.isSuccess+ ? (() => {+ const lastTraceAt = lastTraceQuery.data?.find(+ (t) => t.projectId === project.id,+ )?.lastTraceAt;+ return lastTraceAt+ ? `Last trace ${formatCompactRelativeTime(new Date(lastTraceAt))}`+ : "No traces in the last 30d";+ })()+ : null}</p></CardContent>)}diff --git a/web/src/features/v4-migration/V4MigrationContent.clienttest.tsx b/web/src/features/v4-migration/V4MigrationContent.clienttest.tsxindex d5dde68bab..30bcf9a61f 100644--- a/web/src/features/v4-migration/V4MigrationContent.clienttest.tsx+++ b/web/src/features/v4-migration/V4MigrationContent.clienttest.tsx@@ -401,7 +401,7 @@ describe("V4MigrationHeaderContent", () => {titleRowClassName="pr-6"/>,);- const link = screen.getByRole("link", { name: "View Status" });+ const link = screen.getByRole("link", { name: "View Org status" });expect(link).toHaveAttribute("href", "/v4-migration");expect(link.parentElement).toHaveClass("pr-6");});diff --git a/web/src/features/v4-migration/V4MigrationContent.tsx b/web/src/features/v4-migration/V4MigrationContent.tsxindex f551a65e8d..179521fdb4 100644--- a/web/src/features/v4-migration/V4MigrationContent.tsx+++ b/web/src/features/v4-migration/V4MigrationContent.tsx@@ -52,6 +52,7 @@ import { api, reportNonTrpcError } from "@/src/utils/api";// (side panel and modal) render these components — edit copy here only.const V4_DOCS_URL = "https://langfuse.com/docs/v4";+export const V4_MIGRATION_DEADLINE = "Oct 9";const SDK_UPGRADE_URL ="https://langfuse.com/docs/observability/sdk/upgrade-path";const OTEL_V4_MIGRATION_URL =@@ -410,7 +411,10 @@ export function V4MigrationHeaderContent({titleRowClassName,)}>- <p className="min-w-0 text-lg font-bold">+ <p+ className="min-w-0 flex-1 truncate text-lg font-bold"+ title={projectName ? `Migrate ${projectName} to v4` : "Migrate to v4"}+ >{projectName ? <>Migrate {projectName} to v4</> : "Migrate to v4"}</p><Link@@ -421,7 +425,7 @@ export function V4MigrationHeaderContent({}}className="shrink-0 text-sm underline">- View Status+ View Org status</Link></div><p className="text-muted-foreground mb-3 text-sm leading-relaxed">@@ -431,7 +435,7 @@ export function V4MigrationHeaderContent({is here: real-time, up to 165× faster, plus new dashboards, alerting,sessions, and trace view.{needsMigration &&- " This project still uses the previous setup, which stops working soon."}+ ` This project still uses the previous setup, which stops working on ${V4_MIGRATION_DEADLINE}.`}</p><div className="flex flex-col gap-2">{promptVisible && (@@ -589,7 +593,7 @@ export function V4MigrationDetailsContent({</a></div><p className="text-muted-foreground text-sm">- Some features will stop working soon.+ Some features will stop working on {V4_MIGRATION_DEADLINE}.</p><div><V4MigrationSdkSection sdk={migrationData.sdk} />@@ -621,7 +625,7 @@ export function V4MigrationDetailsContent({trace input/output, which{" "}<span className="text-dark-yellow">{migrationData.evals.count === 1 ? "stops" : "stop"} running- soon+ on {V4_MIGRATION_DEADLINE}</span>. Repointing {migrationData.evals.count === 1 ? "it" : "them"}{" "}at observations or experiments requires minimal changes@@ -745,7 +749,8 @@ export function V4MigrationDetailsContent({<><p className="text-muted-foreground mb-2 text-sm">You've called these deprecated endpoints in the last{" "}- {V4_MIGRATION_LOOKBACK_DAYS} days. They stop working soon; the{" "}+ {V4_MIGRATION_LOOKBACK_DAYS} days. They stop working on{" "}+ {V4_MIGRATION_DEADLINE}; the{" "}<ExternalLink href={DEPRECATED_API_MIGRATION_URL}>migration guide</ExternalLink>{" "}diff --git a/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx b/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsxindex f1c0e82806..c002a912fa 100644--- a/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx+++ b/web/src/features/v4-migration/V4MigrationStatusPage.clienttest.tsx@@ -67,6 +67,7 @@ vi.mock("@/src/features/in-app-agent/components/InAppAiAgentProvider", () => ({}));vi.mock("@/src/features/v4-migration/V4MigrationContent", () => ({+ V4_MIGRATION_DEADLINE: "Oct 9",useCopyMigrationPrompt: () => vi.fn(),}));diff --git a/web/src/features/v4-migration/V4MigrationStatusPage.tsx b/web/src/features/v4-migration/V4MigrationStatusPage.tsxindex 4b0e584228..fb3c1c1f5e 100644--- a/web/src/features/v4-migration/V4MigrationStatusPage.tsx+++ b/web/src/features/v4-migration/V4MigrationStatusPage.tsx@@ -13,7 +13,10 @@ import {TableHeader,TableRow,} from "@/src/components/ui/table";-import { useCopyMigrationPrompt } from "@/src/features/v4-migration/V4MigrationContent";+import {+ useCopyMigrationPrompt,+ V4_MIGRATION_DEADLINE,+} from "@/src/features/v4-migration/V4MigrationContent";import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";import { api } from "@/src/utils/api";import { formatCompactRelativeTime } from "@/src/utils/dates";@@ -491,8 +494,8 @@ function V4MigrationStatusPageContent() {Yes, eventually. The{" "}<FaqLink href={SDK_UPGRADE_URL}>old SDKs</FaqLink>, trace-level evals,and APIs are frozen and stop working{" "}- <span className="underline">soon</span>. They keep running until then,- but we're no longer fixing bugs in them.+ <span className="underline">on {V4_MIGRATION_DEADLINE}</span>. They+ keep running until then, but we're no longer fixing bugs in them.</>),},@@ -517,8 +520,8 @@ function V4MigrationStatusPageContent() {q: "What if I do nothing?",a: (<>- <span className="underline">Soon</span>, old SDKs stop sending data,- and the{" "}+ <span className="underline">On {V4_MIGRATION_DEADLINE}</span>, old+ SDKs stop sending data, and the{" "}<FaqLink href={API_REFERENCE_URL}>deprecated evals and endpoints</FaqLink>{" "}