Skip to content

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

chore: layout settings + early access cards (#1689)

Marc Klingen7c29b9041a1f
diff --git a/web/public/images/posthog-logo.svg b/web/public/images/posthog-logo.svg
new file mode 100644
index 0000000000..1c09be906a
--- /dev/null
+++ b/web/public/images/posthog-logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 140"><g fill-rule="nonzero" fill="none"><path d="M55.383 75.225c-1.874 3.748-7.222 3.748-9.096 0l-4.482-8.963a5.085 5.085 0 0 1 0-4.548l4.482-8.964c1.874-3.748 7.222-3.748 9.096 0l4.482 8.964a5.084 5.084 0 0 1 0 4.548l-4.482 8.963Zm0 50.836c-1.874 3.747-7.222 3.747-9.096 0l-4.482-8.964a5.085 5.085 0 0 1 0-4.548l4.482-8.964c1.874-3.748 7.222-3.748 9.096 0l4.482 8.964a5.084 5.084 0 0 1 0 4.548l-4.482 8.964Z" fill="#1D4AFF"/><path d="M0 106.765c0-4.53 5.477-6.8 8.68-3.596l23.307 23.307c3.204 3.204.935 8.68-3.595 8.68H5.085A5.085 5.085 0 0 1 0 130.073v-23.307Zm0-24.55c0 1.35.536 2.643 1.49 3.596l47.856 47.856a5.086 5.086 0 0 0 3.595 1.49h26.286c4.53 0 6.799-5.477 3.595-8.681L8.681 52.334C5.477 49.131 0 51.4 0 55.93v26.286Zm0-50.834c0 1.348.536 2.642 1.49 3.595l98.69 98.691a5.086 5.086 0 0 0 3.596 1.49h26.285c4.53 0 6.8-5.477 3.596-8.681L8.681 1.5C5.477-1.704 0 .565 0 5.095v26.286Zm50.835 0c0 1.348.536 2.642 1.49 3.595l91.5 91.5c3.203 3.204 8.68.935 8.68-3.596V96.595a5.086 5.086 0 0 0-1.49-3.596l-91.5-91.5c-3.203-3.203-8.68-.934-8.68 3.596v26.286ZM110.35 1.5c-3.203-3.204-8.68-.935-8.68 3.595v26.286c0 1.348.536 2.642 1.49 3.595l40.664 40.665c3.204 3.204 8.68.935 8.68-3.596V45.76a5.086 5.086 0 0 0-1.489-3.596L110.35 1.5Z" fill="#F9BD2B"/><path d="m216.24 107.388-47.864-47.863c-3.204-3.204-8.681-.935-8.681 3.595v66.952a5.085 5.085 0 0 0 5.085 5.085h74.142a5.085 5.085 0 0 0 5.085-5.085v-6.097c0-2.809-2.286-5.052-5.07-5.414a39.27 39.27 0 0 1-22.698-11.173Zm-32.145 11.502a8.137 8.137 0 0 1-8.133-8.134 8.137 8.137 0 0 1 8.133-8.134 8.137 8.137 0 0 1 8.134 8.134 8.137 8.137 0 0 1-8.134 8.134Z" fill="#000"/><path d="M0 130.072a5.085 5.085 0 0 0 5.085 5.085h23.307c4.53 0 6.799-5.477 3.595-8.681L8.681 103.169C5.477 99.966 0 102.235 0 106.765v23.307Zm50.835-86.418L8.68 1.5C5.477-1.704 0 .565 0 5.095v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V43.654ZM8.68 52.334C5.477 49.131 0 51.4 0 55.93v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V94.489L8.68 52.334Z" fill="#1D4AFF"/><path d="M101.67 45.76a5.083 5.083 0 0 0-1.49-3.596L59.516 1.5c-3.204-3.204-8.681-.935-8.681 3.595v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V45.76Zm-50.835 89.397h28.392c4.53 0 6.799-5.477 3.595-8.681L50.835 94.489v40.668Zm0-91.503v38.562c0 1.348.536 2.642 1.49 3.595l49.345 49.346V96.595a5.084 5.084 0 0 0-1.49-3.596L50.835 43.654Z" fill="#F54E00"/><path d="M303.32 114.86h20.888V80.22h17.452c19.17 0 31.466-11.37 31.466-28.954 0-17.584-12.295-28.954-31.466-28.954h-38.34v92.547Zm20.888-52.488V40.16h15.337c7.932 0 12.692 4.23 12.692 11.105 0 6.876-4.76 11.106-12.692 11.106h-15.337Zm86.71 53.545c20.36 0 35.167-14.543 35.167-34.375 0-19.831-14.807-34.374-35.167-34.374-20.625 0-35.168 14.543-35.168 34.374 0 19.832 14.543 34.375 35.168 34.375Zm-15.866-34.375c0-10.577 6.346-17.848 15.866-17.848 9.386 0 15.733 7.271 15.733 17.848 0 10.577-6.347 17.849-15.733 17.849-9.52 0-15.866-7.272-15.866-17.849Zm84.462 34.375c15.601 0 26.178-9.784 26.178-21.286 0-26.97-35.829-18.245-35.829-28.822 0-2.908 3.04-4.759 7.404-4.759 4.495 0 9.916 2.776 11.634 8.858l15.601-6.479c-3.04-9.65-14.279-16.261-27.896-16.261-14.676 0-23.798 8.725-23.798 19.17 0 25.252 35.3 18.245 35.3 28.69 0 3.702-3.437 6.214-8.594 6.214-7.403 0-12.56-5.156-14.146-11.37l-15.601 6.081c3.438 10.048 13.486 19.964 29.747 19.964Zm76.43-1.718-1.321-16.791c-2.248 1.19-5.157 1.586-7.536 1.586-4.76 0-7.933-3.437-7.933-9.387V64.355h16.13v-16.13h-16.13V28.923h-19.435v19.302h-10.577v16.13h10.577v27.764c0 16.13 10.974 23.798 25.384 23.798 3.967 0 7.669-.66 10.842-1.718Zm67.764-91.887v35.961h-36.755v-35.96h-20.89v92.546h20.89V76.122h36.755v38.737h21.021V22.312h-21.021Zm67.386 93.605c20.36 0 35.168-14.543 35.168-34.375 0-19.831-14.807-34.374-35.168-34.374-20.625 0-35.168 14.543-35.168 34.374 0 19.832 14.543 34.375 35.168 34.375ZM675.23 81.542c0-10.577 6.346-17.848 15.865-17.848 9.387 0 15.733 7.271 15.733 17.848 0 10.577-6.346 17.849-15.733 17.849-9.519 0-15.865-7.272-15.865-17.849Zm88.545 31.202c7.272 0 13.75-2.512 17.188-6.875v6.346c0 7.404-5.95 12.56-15.072 12.56-6.479 0-12.164-3.173-13.09-8.594l-17.715 2.777c2.38 12.56 15.204 21.022 30.805 21.022 20.492 0 34.11-12.032 34.11-29.88V48.225h-19.17v5.685c-3.57-4.098-9.652-6.742-17.452-6.742-18.51 0-30.144 12.692-30.144 32.788 0 20.096 11.634 32.788 30.54 32.788ZM752.14 79.956c0-9.916 5.817-16.262 14.807-16.262 9.123 0 14.94 6.346 14.94 16.262s-5.817 16.262-14.94 16.262c-8.99 0-14.807-6.346-14.807-16.262Z" fill="#000"/></g></svg>
\ No newline at end of file
diff --git a/web/src/components/layouts/header.tsx b/web/src/components/layouts/header.tsx
index 7747acdee1..38f46e445a 100644
--- a/web/src/components/layouts/header.tsx
+++ b/web/src/components/layouts/header.tsx
@@ -40,7 +40,7 @@ export default function Header({
[...props.breadcrumb.map((i) => i.href).filter(Boolean)].pop();
return (
- <div className={cn(level === "h2" ? "mb-4" : "mb-1")}>
+ <div className={cn(level === "h2" ? "mb-4" : "mb-2")}>
<div>
{backHref ? (
<nav className="sm:hidden" aria-label="Back">
diff --git a/web/src/features/projects/components/DeleteProjectButton.tsx b/web/src/features/projects/components/DeleteProjectButton.tsx
index 6ae5395607..a675c7c891 100644
--- a/web/src/features/projects/components/DeleteProjectButton.tsx
+++ b/web/src/features/projects/components/DeleteProjectButton.tsx
@@ -23,6 +23,7 @@ import { useRouter } from "next/router";
import * as z from "zod";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
+import Header from "@/src/components/layouts/header";
export function DeleteProjectButton(props: { projectId: string }) {
const utils = api.useUtils();
@@ -79,9 +80,7 @@ export function DeleteProjectButton(props: { projectId: string }) {
return (
<div>
- <h2 className="mb-6 text-base font-semibold leading-6 text-gray-900">
- Danger Zone
- </h2>
+ <Header title="Danger Zone" level="h3" />
<Dialog>
<DialogTrigger asChild>
<Button variant="destructive" disabled={!hasAccess}>
diff --git a/web/src/features/projects/components/HostNameProject.tsx b/web/src/features/projects/components/HostNameProject.tsx
index bc02155197..d7c77ec25d 100644
--- a/web/src/features/projects/components/HostNameProject.tsx
+++ b/web/src/features/projects/components/HostNameProject.tsx
@@ -1,12 +1,11 @@
import { Card } from "@tremor/react";
import { CodeView } from "@/src/components/ui/code";
+import Header from "@/src/components/layouts/header";
export function HostNameProject() {
return (
<div>
- <h2 className="mb-5 text-base font-semibold leading-6 text-gray-900">
- Host Name
- </h2>
+ <Header title="Host Name" level="h3" />
<Card className="mb-4 p-4">
<div className="mb-6">
<div className="my-2">
diff --git a/web/src/features/projects/components/RenameProject.tsx b/web/src/features/projects/components/RenameProject.tsx
index b96ca9f61c..21b1489e47 100644
--- a/web/src/features/projects/components/RenameProject.tsx
+++ b/web/src/features/projects/components/RenameProject.tsx
@@ -15,6 +15,7 @@ import {
} from "@/src/components/ui/form";
import { useHasAccess } from "@/src/features/rbac/utils/checkAccess";
import { projectNameSchema } from "@/src/features/auth/lib/projectNameSchema";
+import Header from "@/src/components/layouts/header";
export default function RenameProject(props: { projectId: string }) {
const utils = api.useUtils();
@@ -59,9 +60,7 @@ export default function RenameProject(props: { projectId: string }) {
return (
<div>
- <h2 className="mb-5 text-base font-semibold leading-6 text-gray-900">
- Project Name
- </h2>
+ <Header title="Project Name" level="h3" />
<Card className="mb-4 p-4">
{form.getValues().name !== "" ? (
<p className="mb-4 text-sm text-gray-700">
diff --git a/web/src/features/public-api/components/ApiKeyList.tsx b/web/src/features/public-api/components/ApiKeyList.tsx
index 10bcf8df0a..ef4d5c6497 100644
--- a/web/src/features/public-api/components/ApiKeyList.tsx
+++ b/web/src/features/public-api/components/ApiKeyList.tsx
@@ -1,3 +1,4 @@
+import Header from "@/src/components/layouts/header";
import { Button } from "@/src/components/ui/button";
import { Card } from "@/src/components/ui/card";
import { CodeView } from "@/src/components/ui/code";
@@ -44,9 +45,7 @@ export function ApiKeyList(props: { projectId: string }) {
return (
<div>
- <h2 className="mb-5 text-base font-semibold leading-6 text-gray-900">
- API keys
- </h2>
+ <Header title="API keys" level="h3" />
<Card className="mb-4">
<Table>
<TableHeader>
diff --git a/web/src/features/rbac/components/ProjectMembersTable.tsx b/web/src/features/rbac/components/ProjectMembersTable.tsx
index f3a5252ee8..fa4360ef0c 100644
--- a/web/src/features/rbac/components/ProjectMembersTable.tsx
+++ b/web/src/features/rbac/components/ProjectMembersTable.tsx
@@ -13,6 +13,7 @@ import { TrashIcon } from "lucide-react";
import { useHasAccess } from "@/src/features/rbac/utils/checkAccess";
import { CreateProjectMemberButton } from "@/src/features/rbac/components/CreateProjectMemberButton";
import { useSession } from "next-auth/react";
+import Header from "@/src/components/layouts/header";
export function ProjectMembersTable({ projectId }: { projectId: string }) {
const hasReadAccess = useHasAccess({
@@ -50,9 +51,7 @@ export function ProjectMembersTable({ projectId }: { projectId: string }) {
return (
<div>
- <h2 className="mb-5 text-base font-semibold leading-6 text-gray-900">
- Project Members
- </h2>
+ <Header title="Project Members" level="h3" />
<Card className="mb-4">
<Table className="text-sm">
<TableHeader>
diff --git a/web/src/features/usage-metering/ProjectUsageChart.tsx b/web/src/features/usage-metering/ProjectUsageChart.tsx
index 08a6e86d8d..f1b25aa2d7 100644
--- a/web/src/features/usage-metering/ProjectUsageChart.tsx
+++ b/web/src/features/usage-metering/ProjectUsageChart.tsx
@@ -34,9 +34,7 @@ export const ProjectUsageChart: React.FC<{ projectId: string }> = ({
return (
<div>
- <h2 className="mb-5 text-base font-semibold leading-6 text-gray-900">
- Usage
- </h2>
+ <Header title="Usage" level="h3" />
<Card className="p-4 lg:w-1/2">
{usage.data !== undefined && (
<>
diff --git a/web/src/pages/project/[projectId]/settings.tsx b/web/src/pages/project/[projectId]/settings.tsx
index a341d41699..698f0f0e15 100644
--- a/web/src/pages/project/[projectId]/settings.tsx
+++ b/web/src/pages/project/[projectId]/settings.tsx
@@ -11,6 +11,10 @@ import { HostNameProject } from "@/src/features/projects/components/HostNameProj
import { ProjectUsageChart } from "@/src/features/usage-metering/ProjectUsageChart";
import { TransferOwnershipButton } from "@/src/features/projects/components/TransferOwnershipButton";
import RenameProject from "@/src/features/projects/components/RenameProject";
+import { env } from "@/src/env.mjs";
+import { Card } from "@tremor/react";
+import { Button } from "@/src/components/ui/button";
+import Link from "next/link";
export default function SettingsPage() {
const router = useRouter();
@@ -24,6 +28,7 @@ export default function SettingsPage() {
<HostNameProject />
<ApiKeyList projectId={projectId} />
<ProjectUsageChart projectId={projectId} />
+ <Beta />
<Instructions />
<div className="space-y-3">
<DeleteProjectButton projectId={projectId} />
@@ -78,9 +83,7 @@ const instructionItems = [
function Instructions() {
return (
<div>
- <h2 className="text-base font-semibold leading-6 text-gray-900">
- Integrate langfuse
- </h2>
+ <Header title="Docs" level="h3" />
<ul
role="list"
className="mt-6 divide-y divide-gray-200 border-b border-t border-gray-200"
@@ -115,3 +118,39 @@ function Instructions() {
</div>
);
}
+
+const Beta = () => {
+ if (env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === undefined) return null;
+
+ return (
+ <div>
+ <Header title="Early Access" level="h3" />
+ <Card className="p-4 lg:w-1/2">
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img
+ src="/images/posthog-logo.svg"
+ alt="Posthog Logo"
+ className="mb-4 w-32"
+ />
+ <p className="mb-4 text-sm text-gray-700">
+ We have teamed up with PostHog (OSS product analytics) to make
+ Langfuse Events/Metrics available in your Posthog Dashboards.
+ </p>
+ <div className="flex items-center gap-2">
+ <Button asChild variant="secondary">
+ <Link
+ href={`mailto:[email protected]?subject=I%20am%20interested%20in%20the%20Langfuse%3C%3EPosthog%20Integration&body=%23%23%20Please%20fill%20in%20the%20following%20details%20to%20help%20us%20set%20up%20the%20integration%20for%20you.%20These%20settings%20will%20be%20available%20within%20Langfuse%20once%20this%20integration%20is%20generally%20available.%0A%0ALangfuse%20Project%3A%20${encodeURIComponent(window.location.href.replace("/settings", ""))}%0APostHog%20Host%20(EU%2C%20US%20or%20self-hosted)%3A%0APostHog%20Key%20(starting%20with%20%22phc_%22)%3A%0A%0A%0A%23%23%20Do%20you%20prefer%20to%20set%20this%20up%20via%20a%20short%20call%20or%20async%20via%20email%3F%0A%0A%0A%0A%23%23%20Any%20Questions%3F%0A%0A%0A%0A%23%23%20Links%20to%20docs%0A%0Ahttps%3A%2F%2Flangfuse.com%2Fdocs%2Fanalytics%2Fposthog%0Ahttps%3A%2F%2Fposthog.com%2Fdocs%2Fproduct-analytics%2Fllms%0A`}
+ >
+ Request Access (Email)
+ </Link>
+ </Button>
+ <Button asChild variant="ghost">
+ <Link href="https://langfuse.com/docs/analytics/posthog">
+ Integration Docs
+ </Link>
+ </Button>
+ </div>
+ </Card>
+ </div>
+ );
+};