Skip to content

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

fix(web): combobox badges match the breadcrumb plan badge (#18902)

Trang Nguyenaa8555ef28ae
diff --git a/web/src/components/ui/combobox.tsx b/web/src/components/ui/combobox.tsx
index 191cefefe0..9228ac5690 100644
--- a/web/src/components/ui/combobox.tsx
+++ b/web/src/components/ui/combobox.tsx
@@ -20,7 +20,7 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/src/components/ui/popover";
-import { Badge } from "@/src/components/ui/badge";
+import { Badge } from "@/src/components/design-system/Badge/Badge";
interface ComboboxOption<T extends string | number | boolean | { id: string }> {
value: T;
@@ -152,9 +152,14 @@ export function Combobox<T extends string | number | boolean | { id: string }>({
{buttonText}
</span>
{selectedOption?.badge && (
- <Badge variant="secondary" className="ml-1.5 shrink-0">
- {selectedOption.badge}
- </Badge>
+ <span className="ml-1.5 flex shrink-0">
+ <Badge
+ color="filled"
+ font="mono"
+ size="sm"
+ text={selectedOption.badge}
+ />
+ </span>
)}
<span className="ml-2 flex">
<DropdownIndicator direction="up-down" />
@@ -220,9 +225,14 @@ export function Combobox<T extends string | number | boolean | { id: string }>({
)}
{option.label ?? String(option.value)}
{option.badge && (
- <Badge variant="secondary" className="ml-auto">
- {option.badge}
- </Badge>
+ <span className="ml-auto flex shrink-0">
+ <Badge
+ color="filled"
+ font="mono"
+ size="sm"
+ text={option.badge}
+ />
+ </span>
)}
</CommandItem>
))}
@@ -271,9 +281,14 @@ export function Combobox<T extends string | number | boolean | { id: string }>({
)}
{option.label ?? String(option.value)}
{option.badge && (
- <Badge variant="secondary" className="ml-auto">
- {option.badge}
- </Badge>
+ <span className="ml-auto flex shrink-0">
+ <Badge
+ color="filled"
+ font="mono"
+ size="sm"
+ text={option.badge}
+ />
+ </span>
)}
</CommandItem>
))}
diff --git a/web/src/features/dashboard/components/HomeDashboardSelect.tsx b/web/src/features/dashboard/components/HomeDashboardSelect.tsx
index 0076a8a341..50405ad4b9 100644
--- a/web/src/features/dashboard/components/HomeDashboardSelect.tsx
+++ b/web/src/features/dashboard/components/HomeDashboardSelect.tsx
@@ -48,7 +48,7 @@ export function HomeDashboardSelect({
value: d.id,
label: d.name,
...(d.owner === "LANGFUSE" ? { icon: <LangfuseIcon size={14} /> } : {}),
- ...(d.id === defaultDashboardId ? { badge: "Default" } : {}),
+ ...(d.id === defaultDashboardId ? { badge: "default" } : {}),
});
const curated = items.filter((d) => d.owner === "LANGFUSE");
const project = items.filter((d) => d.owner === "PROJECT");
@@ -93,7 +93,7 @@ export function HomeDashboardSelect({
placeholder={currentDashboardName}
searchPlaceholder="Search dashboards..."
emptyText="No dashboards found"
- className="my-0 w-auto max-w-56"
+ className="my-0 w-auto max-w-60"
name="home-dashboard"
/>
);