Skip to content

Commit 6821d0f

Browse files
author
GanJiaKouN16
committed
fix: show correct breadcrumb label for SDK evaluations
The breadcrumb always showed 'Auto Evals' for SDK evaluations because: 1. test.tsx normalized type='custom' to 'auto' before passing to EvalRunPreviewPage, losing the SDK type information 2. Page.tsx typeMap had no 'custom' entry 3. buildBreadcrumbs.ts hardcoded 'auto evaluation' as fallback label Fix: - Remove the custom→auto normalization in test.tsx - Add 'custom' → 'SDK Evals' entry to Page.tsx typeMap (matches the tab label in EvaluationsView.tsx) - Change buildBreadcrumbs.ts fallback from 'auto evaluation' to 'Evaluations' Closes #4549
1 parent 7b29544 commit 6821d0f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

web/oss/src/components/EvalRunDetails/components/Page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const EvalRunPreviewPage = ({runId, evaluationType, projectId = null}: EvalRunPr
4848
const evaluationTypeBreadcrumb = useMemo(() => {
4949
const typeMap: Record<string, {label: string; kind: string}> = {
5050
auto: {label: "Auto Evals", kind: "auto"},
51+
custom: {label: "SDK Evals", kind: "custom"},
5152
human: {label: "Human Evals", kind: "human"},
5253
online: {label: "Live Evals", kind: "online"},
5354
}

web/oss/src/components/EvalRunDetails/test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import EvalResultsOnboarding from "./EvalResultsOnboarding"
88
type EvalRunKind = "auto" | "human" | "online" | "custom"
99

1010
const EvalRunTestPage = ({type = "auto"}: {type?: EvalRunKind}) => {
11-
// Normalize "custom" to "auto", but keep "online" as-is
12-
const evaluationType = type === "custom" ? "auto" : type
11+
const evaluationType = type
1312
const router = useRouter()
1413
const evaluationIdParam = router.query?.evaluation_id
1514
const projectIdParam = router.query?.project_id

web/oss/src/lib/helpers/buildBreadcrumbs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const buildBreadcrumbSegments = ({
8181
if (seg === "evaluations") {
8282
const hasResults = next === "results"
8383
const evaluationsHref = `${baseAppsPath}/${appId}/evaluations`
84-
items["appPage"] = {label: "auto evaluation", href: evaluationsHref}
84+
items["appPage"] = {label: "Evaluations", href: evaluationsHref}
8585

8686
if (hasResults) {
8787
i++

0 commit comments

Comments
 (0)