Skip to content

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

chore: expand project and org name limit to 60 chars (#6455)

Steffen Schmitz82d7cb97698b
diff --git a/web/src/__tests__/async/organizations-api.servertest.ts b/web/src/__tests__/async/organizations-api.servertest.ts
index 87589233ba..d6610c9ed4 100644
--- a/web/src/__tests__/async/organizations-api.servertest.ts
+++ b/web/src/__tests__/async/organizations-api.servertest.ts
@@ -126,7 +126,7 @@ describe("Admin Organizations API", () => {
"POST",
"/api/admin/organizations",
{
- name: "A".repeat(31), // More than 30 characters
+ name: "A".repeat(61), // More than 60 characters
},
`Bearer ${ADMIN_API_KEY}`,
);
diff --git a/web/src/features/auth/lib/projectNameSchema.ts b/web/src/features/auth/lib/projectNameSchema.ts
index 405eae715f..d076151001 100644
--- a/web/src/features/auth/lib/projectNameSchema.ts
+++ b/web/src/features/auth/lib/projectNameSchema.ts
@@ -5,7 +5,7 @@ export const projectNameSchema = z.object({
name: z
.string()
.min(3, "Must have at least 3 characters")
- .max(30, "Must have at most 30 characters")
+ .max(60, "Must have at most 60 characters")
.refine((value) => noHtmlCheck(value), {
message: "Input should not contain HTML",
}),
diff --git a/web/src/features/organizations/components/ProjectOverview.tsx b/web/src/features/organizations/components/ProjectOverview.tsx
index 8c531ba07b..c2d023e987 100644
--- a/web/src/features/organizations/components/ProjectOverview.tsx
+++ b/web/src/features/organizations/components/ProjectOverview.tsx
@@ -49,7 +49,9 @@ const OrganizationProjectTiles = ({
.map((project) => (
<Card key={project.id}>
<CardHeader>
- <CardTitle className="text-base">{project.name}</CardTitle>
+ <CardTitle className="truncate text-base">
+ {project.name}
+ </CardTitle>
</CardHeader>
{!project.deletedAt ? (
<CardFooter className="gap-2">
@@ -213,6 +215,7 @@ const SingleOrganizationProjectOverviewTile = ({
<div key={orgId} className="mb-10">
<Header
title={org.name}
+ className="truncate"
status={orgId === env.NEXT_PUBLIC_DEMO_ORG_ID ? "Demo Org" : undefined}
label={
isCloudPlan(org.plan)
diff --git a/web/src/features/organizations/utils/organizationNameSchema.ts b/web/src/features/organizations/utils/organizationNameSchema.ts
index 747e06a622..f31de7fce1 100644
--- a/web/src/features/organizations/utils/organizationNameSchema.ts
+++ b/web/src/features/organizations/utils/organizationNameSchema.ts
@@ -5,7 +5,7 @@ export const organizationNameSchema = z.object({
name: z
.string()
.min(3, "Must have at least 3 characters")
- .max(30, "Must have at most 30 characters")
+ .max(60, "Must have at most 60 characters")
.refine((value) => noHtmlCheck(value), {
message: "Input should not contain HTML",
}),
diff --git a/web/src/pages/api/public/projects/index.ts b/web/src/pages/api/public/projects/index.ts
index 56c953d663..bd54616198 100644
--- a/web/src/pages/api/public/projects/index.ts
+++ b/web/src/pages/api/public/projects/index.ts
@@ -88,7 +88,7 @@ export default async function handler(
} catch (error) {
return res.status(400).json({
message:
- "Invalid project name length. Should be between 3 and 30 characters.",
+ "Invalid project name length. Should be between 3 and 60 characters.",
});
}