From 1f5729236325ec4e5786ccd8d5fd2c965b982bea Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Mon, 13 Apr 2026 10:55:09 -0700 Subject: [PATCH] fix(ui/team): add GlobalOutlined icon to global guardrail markers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses a11y feedback — global vs. non-global guardrails were distinguished only by color (green vs. blue). Adds GlobalOutlined next to global guardrails in (1) the selected-chip tagRender, (2) the dropdown OptGroup label, and (3) the team info read view badge. --- .../src/components/team/TeamInfo.tsx | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx index 5b6c716713..f0f26b5544 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx @@ -17,7 +17,7 @@ import { useGuardrails } from "@/app/(dashboard)/hooks/guardrails/useGuardrails" import { formatNumberWithCommas } from "@/utils/dataUtils"; import { mapEmptyStringToNull } from "@/utils/keyUpdateUtils"; import { isProxyAdminRole } from "@/utils/roles"; -import { EditOutlined, InfoCircleOutlined, MinusCircleOutlined, PlusOutlined, SaveOutlined } from "@ant-design/icons"; +import { EditOutlined, GlobalOutlined, InfoCircleOutlined, MinusCircleOutlined, PlusOutlined, SaveOutlined } from "@ant-design/icons"; import { ArrowLeftIcon } from "@heroicons/react/outline"; import { Badge, Card, Grid, Text, TextInput, Title } from "@tremor/react"; import { Button, Form, Input, InputNumber, Select, Space, Switch, Tabs, Tag, Tooltip } from "antd"; @@ -625,17 +625,21 @@ const TeamInfoView: React.FC = ({ e.stopPropagation(); }; - const renderGuardrailTag = ({ label, value, closable, onClose }: any) => ( - - {label} - - ); + const renderGuardrailTag = ({ label, value, closable, onClose }: any) => { + const isGlobal = globalGuardrailNames.has(value); + return ( + + {isGlobal && } + {label} + + ); + }; const copyToClipboard = async (text: string, key: string) => { const success = await utilCopyToClipboard(text); @@ -770,8 +774,13 @@ const TeamInfoView: React.FC = ({
{effectiveGuardrails.map((name) => ( + {globalGuardrailNames.has(name) && ( + + )} {name} - {globalGuardrailNames.has(name) ? " · Global" : ""} ))}
@@ -1151,7 +1160,14 @@ const TeamInfoView: React.FC = ({ optionLabelProp="label" tagRender={renderGuardrailTag} > - + + + Global + + } + > {(guardrailsData?.guardrails ?? []) .filter((g) => g.litellm_params?.default_on) .map((g) => (