Skip to content

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

fix(ui): overflow of ids/links in tables (#2795)

Marc Klingenc6151dd04281
diff --git a/web/src/components/table/table-link.tsx b/web/src/components/table/table-link.tsx
index af84b27da0..748aefd90a 100644
--- a/web/src/components/table/table-link.tsx
+++ b/web/src/components/table/table-link.tsx
@@ -4,7 +4,6 @@ import Link from "next/link";
export type TableLinkProps = {
path: string;
value: string;
- truncateAt?: number;
icon?: React.ReactNode;
className?: string;
};
@@ -12,24 +11,19 @@ export type TableLinkProps = {
export default function TableLink({
path,
value,
- truncateAt = 7,
icon,
className,
}: TableLinkProps) {
- const truncatedValue =
- value.length - truncateAt > 3
- ? `...${value.substring(value.length - truncateAt)}`
- : value;
return (
<Link
className={cn(
- "inline-block rounded bg-primary-accent/20 px-2 py-1 text-xs font-semibold text-accent-dark-blue shadow-sm hover:bg-accent-light-blue/45",
+ "inline-block max-w-full overflow-hidden text-ellipsis text-nowrap rounded bg-primary-accent/20 px-2 py-1 text-xs font-semibold text-accent-dark-blue shadow-sm hover:bg-accent-light-blue/45",
className,
)}
href={path}
title={value}
>
- {icon ? icon : truncatedValue}
+ {icon ? icon : value}
</Link>
);
}
diff --git a/web/src/components/table/use-cases/generations.tsx b/web/src/components/table/use-cases/generations.tsx
index 7ffeb381b2..488ef8b5b2 100644
--- a/web/src/components/table/use-cases/generations.tsx
+++ b/web/src/components/table/use-cases/generations.tsx
@@ -649,7 +649,6 @@ export default function GenerationsTable({
<TableLink
path={`/project/${projectId}/prompts/${encodeURIComponent(promptName)}?version=${promptVersion}`}
value={value}
- truncateAt={40}
/>
)
);
diff --git a/web/src/components/table/use-cases/scores.tsx b/web/src/components/table/use-cases/scores.tsx
index 8c8a6ba7b7..4db9f7f0ee 100644
--- a/web/src/components/table/use-cases/scores.tsx
+++ b/web/src/components/table/use-cases/scores.tsx
@@ -191,7 +191,6 @@ export default function ScoresTable({
<TableLink
path={`/project/${projectId}/traces?filter=${value ? filter : ""}`}
value={value}
- truncateAt={40}
/>
) : undefined;
},
@@ -214,7 +213,6 @@ export default function ScoresTable({
<TableLink
path={`/project/${projectId}/users/${value}`}
value={value}
- truncateAt={40}
/>
</>
) : undefined;
@@ -314,7 +312,6 @@ export default function ScoresTable({
<TableLink
path={`/project/${projectId}/evals/configs/${value}`}
value={value}
- truncateAt={40}
/>
</>
) : undefined;
diff --git a/web/src/components/table/use-cases/sessions.tsx b/web/src/components/table/use-cases/sessions.tsx
index 37523b7799..edf330a87c 100644
--- a/web/src/components/table/use-cases/sessions.tsx
+++ b/web/src/components/table/use-cases/sessions.tsx
@@ -176,7 +176,6 @@ export default function SessionsTable({
<TableLink
path={`/project/${projectId}/sessions/${encodeURIComponent(value)}`}
value={value}
- truncateAt={40}
/>
) : undefined;
},
@@ -220,8 +219,6 @@ export default function SessionsTable({
key={user}
path={`/project/${projectId}/users/${encodeURIComponent(user)}`}
value={user}
- truncateAt={40}
- className="text-nowrap"
/>
))}
</div>
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsx
index 23cd543b5d..7b1c5ce2b7 100644
--- a/web/src/components/table/use-cases/traces.tsx
+++ b/web/src/components/table/use-cases/traces.tsx
@@ -308,7 +308,6 @@ export default function TracesTable({
<TableLink
path={`/project/${projectId}/users/${encodeURIComponent(value)}`}
value={value}
- truncateAt={40}
/>
) : undefined;
},
@@ -331,7 +330,6 @@ export default function TracesTable({
<TableLink
path={`/project/${projectId}/sessions/${encodeURIComponent(value)}`}
value={value}
- truncateAt={40}
/>
) : undefined;
},
diff --git a/web/src/ee/features/evals/components/eval-config-detail.tsx b/web/src/ee/features/evals/components/eval-config-detail.tsx
index 34093c70b8..7830ab9729 100644
--- a/web/src/ee/features/evals/components/eval-config-detail.tsx
+++ b/web/src/ee/features/evals/components/eval-config-detail.tsx
@@ -93,7 +93,6 @@ export const EvalConfigDetail = () => {
`${existingEvalConfig.evalTemplate.name} (v${existingEvalConfig.evalTemplate.version})` ??
""
}
- truncateAt={40}
/>
</div>
diff --git a/web/src/ee/features/evals/components/eval-config-table.tsx b/web/src/ee/features/evals/components/eval-config-table.tsx
index 6c7777a1b4..e702a074de 100644
--- a/web/src/ee/features/evals/components/eval-config-table.tsx
+++ b/web/src/ee/features/evals/components/eval-config-table.tsx
@@ -44,7 +44,6 @@ export default function EvalConfigTable({ projectId }: { projectId: string }) {
<TableLink
path={`/project/${projectId}/evals/configs/${encodeURIComponent(id)}`}
value={id}
- truncateAt={50}
/>
) : undefined;
},
diff --git a/web/src/ee/features/evals/components/eval-log.tsx b/web/src/ee/features/evals/components/eval-log.tsx
index 0aa746370e..9f3e7fba30 100644
--- a/web/src/ee/features/evals/components/eval-log.tsx
+++ b/web/src/ee/features/evals/components/eval-log.tsx
@@ -23,7 +23,6 @@ export type JobExecutionRow = {
error?: string;
};
-
export default function EvalLogTable({
projectId,
jobConfigurationId,
@@ -116,7 +115,6 @@ export default function EvalLogTable({
<TableLink
path={`/project/${projectId}/traces/${encodeURIComponent(traceId)}`}
value={traceId}
- truncateAt={10}
/>
) : undefined;
},
@@ -130,7 +128,6 @@ export default function EvalLogTable({
<TableLink
path={`/project/${projectId}/evals/templates/${encodeURIComponent(templateId)}`}
value={templateId}
- truncateAt={10}
/>
) : undefined;
},
@@ -148,7 +145,6 @@ export default function EvalLogTable({
<TableLink
path={`/project/${projectId}/evals/configs/${encodeURIComponent(configId)}`}
value={configId}
- truncateAt={10}
/>
) : undefined;
},
diff --git a/web/src/ee/features/evals/components/eval-templates-table.tsx b/web/src/ee/features/evals/components/eval-templates-table.tsx
index f078cbe7bc..51d07a56ed 100644
--- a/web/src/ee/features/evals/components/eval-templates-table.tsx
+++ b/web/src/ee/features/evals/components/eval-templates-table.tsx
@@ -48,7 +48,6 @@ export default function EvalsTemplateTable({
<TableLink
path={`/project/${projectId}/evals/templates/${encodeURIComponent(id)}`}
value={name}
- truncateAt={50}
/>
) : undefined;
},
diff --git a/web/src/features/datasets/components/DatasetItemsTable.tsx b/web/src/features/datasets/components/DatasetItemsTable.tsx
index e78aea9820..9dab3edf8b 100644
--- a/web/src/features/datasets/components/DatasetItemsTable.tsx
+++ b/web/src/features/datasets/components/DatasetItemsTable.tsx
@@ -92,7 +92,6 @@ export function DatasetItemsTable({
<TableLink
path={`/project/${projectId}/datasets/${datasetId}/items/${id}`}
value={id}
- truncateAt={7}
/>
);
},
diff --git a/web/src/features/datasets/components/DatasetRunItemsTable.tsx b/web/src/features/datasets/components/DatasetRunItemsTable.tsx
index dd66b46120..8b1e6bb17a 100644
--- a/web/src/features/datasets/components/DatasetRunItemsTable.tsx
+++ b/web/src/features/datasets/components/DatasetRunItemsTable.tsx
@@ -95,7 +95,6 @@ export function DatasetRunItemsTable(
<TableLink
path={`/project/${props.projectId}/datasets/${props.datasetId}/items/${datasetItemId}`}
value={datasetItemId}
- truncateAt={7}
/>
);
},
diff --git a/web/src/features/datasets/components/DatasetRunsTable.tsx b/web/src/features/datasets/components/DatasetRunsTable.tsx
index d86ec3ac15..8a999f4199 100644
--- a/web/src/features/datasets/components/DatasetRunsTable.tsx
+++ b/web/src/features/datasets/components/DatasetRunsTable.tsx
@@ -71,7 +71,6 @@ export function DatasetRunsTable(props: {
<TableLink
path={`/project/${props.projectId}/datasets/${props.datasetId}/runs/${key.id}`}
value={key.name}
- truncateAt={50}
/>
);
},
diff --git a/web/src/features/datasets/components/DatasetsTable.tsx b/web/src/features/datasets/components/DatasetsTable.tsx
index 9838da3cb6..cee713c2c2 100644
--- a/web/src/features/datasets/components/DatasetsTable.tsx
+++ b/web/src/features/datasets/components/DatasetsTable.tsx
@@ -72,7 +72,6 @@ export function DatasetsTable(props: { projectId: string }) {
<TableLink
path={`/project/${props.projectId}/datasets/${key.id}`}
value={key.name}
- truncateAt={50}
/>
);
},
diff --git a/web/src/features/prompts/components/prompts-table.tsx b/web/src/features/prompts/components/prompts-table.tsx
index e5a8dfad78..7a7e62cf41 100644
--- a/web/src/features/prompts/components/prompts-table.tsx
+++ b/web/src/features/prompts/components/prompts-table.tsx
@@ -159,7 +159,6 @@ export function PromptTable() {
<TableLink
path={`/project/${projectId}/prompts/${encodeURIComponent(name)}`}
value={name}
- truncateAt={50}
/>
) : undefined;
},
diff --git a/web/src/pages/project/[projectId]/users.tsx b/web/src/pages/project/[projectId]/users.tsx
index 7c7b90cb65..af1b20b63f 100644
--- a/web/src/pages/project/[projectId]/users.tsx
+++ b/web/src/pages/project/[projectId]/users.tsx
@@ -129,7 +129,6 @@ export default function UsersPage() {
<TableLink
path={`/project/${projectId}/users/${encodeURIComponent(value)}`}
value={value}
- truncateAt={40}
/>
</>
) : undefined;
diff --git a/web/src/pages/project/[projectId]/users/[userId].tsx b/web/src/pages/project/[projectId]/users/[userId].tsx
index 40818536f0..fbe05e1f3e 100644
--- a/web/src/pages/project/[projectId]/users/[userId].tsx
+++ b/web/src/pages/project/[projectId]/users/[userId].tsx
@@ -193,7 +193,6 @@ function DetailsTab({ userId, projectId }: TabProps) {
: `/project/${projectId}/traces/${user.data.lastScore.traceId}`
}
value={user.data.lastScore.traceId}
- truncateAt={40}
/>
<GroupedScoreBadges scores={[user.data.lastScore]} />
</div>