diff --git a/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.integration.test.tsx b/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.integration.test.tsx index d6012f0c3e2..db43b3610b9 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.integration.test.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.integration.test.tsx @@ -631,6 +631,10 @@ describe("AgentTracesPage", () => { const live = screen.getByRole("button", { name: "Live" }); expect(live).toHaveAttribute("aria-pressed", "true"); expect(trigger).toHaveTextContent("Last 24 hours"); + expect(screen.getByRole("combobox", { name: "Filter traces by agent" })).toBeVisible(); + expect(screen.getByRole("combobox", { name: "Filter traces by status" })).toBeVisible(); + await waitFor(() => expect(screen.getByRole("button", { name: "Refresh traces" })).toBeEnabled()); + expect(screen.getByRole("button", { name: "Set up tracing" })).toBeEnabled(); fireEvent.click(trigger); fireEvent.click(await screen.findByRole("menuitemradio", { name: "Last 7 days" })); @@ -646,6 +650,13 @@ describe("AgentTracesPage", () => { expect(trigger).not.toHaveTextContent("Last 7 days"); await waitFor(() => expect(vi.mocked(agentTraceListCall).mock.calls.at(-1)?.[0].endMs).toBe(pausedAt)); + expect(screen.getByRole("button", { name: "Set up tracing" })).toBeEnabled(); + await waitFor(() => expect(screen.getByRole("button", { name: "Refresh traces" })).toBeEnabled()); + + fireEvent.click(live); + await waitFor(() => expect(live).toHaveAttribute("aria-pressed", "true")); + expect(trigger).toHaveTextContent("Last 7 days"); + expect(screen.getByRole("button", { name: "Set up tracing" })).toBeEnabled(); }); it("keeps the time controls on an empty range the user picked, instead of showing onboarding", async () => { diff --git a/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.tsx b/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.tsx index 3786d61bfeb..aff1cb2747a 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/list/AgentTracesSection.tsx @@ -185,8 +185,9 @@ export function AgentTracesSection({ > 0} live={live} onSetup={() => setShowSetup(true)} /> {timeControls && ( -
- changeRange(hours, timeControls.setHours)} - showLive={live} - onLiveChange={timeControls.setLive} - /> -
+ changeRange(hours, timeControls.setHours)} + showLive={live} + onLiveChange={timeControls.setLive} + /> )} @@ -259,7 +258,13 @@ function TraceFooter({ runs, hasMore }: { runs: readonly TraceSummary[]; hasMore function TracingSetupAction({ available, live, onSetup }: { available: boolean; live: boolean; onSetup: () => void }) { if (!available) return null; return ( - ); diff --git a/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunSearch.tsx b/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunSearch.tsx index fa72b258999..2831a8ffbf2 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunSearch.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunSearch.tsx @@ -32,10 +32,10 @@ export function RunSearch({ value, onChange, runs, range, busy = false }: RunSea value={value} onValueChange={onChange} label="Search runs" - className="min-w-40 basis-full sm:basis-72 sm:max-w-96" + className="h-10 min-w-0 basis-full sm:w-auto sm:basis-0" > diff --git a/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunsToolbar.tsx b/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunsToolbar.tsx index 3bd47a85eb1..4fc05b8fa16 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunsToolbar.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/list/runSearch/RunsToolbar.tsx @@ -37,43 +37,47 @@ export function RunsToolbar({ query, onQueryChange, runs, range, busy, children { value: "error", label: "With errors" }, ]; return ( -
- - setAgent(name ?? "")} autoHighlight> - - - No matching agents - - {(name: string) => ( - - {name} - - )} - - - - - {children &&
{children}
} +
+
+ + {children &&
{children}
} +
+
+ setAgent(name ?? "")} autoHighlight> + + + No matching agents + + {(name: string) => ( + + {name} + + )} + + + + +
); }