diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.test.tsx index b616982d69b..2aff2083870 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.test.tsx @@ -152,6 +152,15 @@ describe("GuardrailsOverview", () => { await waitFor(() => expect(document.querySelector('[aria-busy="true"]')).toBeInTheDocument()); }); + it("wraps the metric cards on a flexible track instead of a fixed column count", async () => { + renderOverview(); + + const grid = (await screen.findByText("Total Evaluations")).closest("div.grid"); + + expect(grid).not.toBeNull(); + expect(grid!.className).toMatch(/grid-cols-\[repeat\(auto-fit,minmax\([^)]+,1fr\)\)\]/); + }); + it("shows a failure message when the usage request rejects", async () => { mockGetGuardrailsUsageOverview.mockRejectedValue(new Error("network down")); renderOverview(); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.tsx index 3d91fc1b9b6..e1048c5322f 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/_components/GuardrailsOverview.tsx @@ -211,7 +211,7 @@ export function GuardrailsOverview({ -
+