diff --git a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx index 56845958ab1..4dc720786fd 100644 --- a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx +++ b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx @@ -189,7 +189,7 @@ export function InvestigationsView({ readOnly = false }: InvestigationsViewProps return (
{ await user.type(screen.getByRole("textbox", { name: "Check 1" }), "Find incomplete reports"); await user.click(screen.getByRole("button", { name: "Continue" })); await waitFor(() => expect(screen.getByRole("button", { name: "Run and monitor" })).toBeEnabled()); - expect(screen.getByText("1 matching run")).toBeInTheDocument(); expect(screen.getByText("Research report")).toBeInTheDocument(); await user.click(screen.getByRole("button", { name: "Run and monitor" })); expect(save).toHaveBeenCalledWith( @@ -340,9 +339,9 @@ it.each(["new", "duplicate"] as const)("blocks a %s investigation until its mode : Promise.resolve(gatewayResponse(path, {})), ); renderWithProviders(); + expect(await screen.findByText("100% of 1")).toBeInTheDocument(); await user.click(screen.getByRole("button", { name: "Continue" })); await user.click(screen.getByRole("button", { name: "Continue" })); - expect(await screen.findByText("1 matching run")).toBeInTheDocument(); expect(screen.getByRole("button", { name: mode === "new" ? "Run and monitor" : "Run investigation" })).toBeDisabled(); expect(save).not.toHaveBeenCalled(); }); @@ -393,14 +392,14 @@ it("appends the next preview page as the list scrolls near its end, then stops a renderWithProviders(); expect(await screen.findByText("Run one")).toBeVisible(); expect(screen.getByText(/Showing 1 of 2/)).toBeVisible(); - expect(screen.getByRole("status")).toHaveTextContent("2 matching runs"); + expect(screen.getByText("100% of 2")).toBeVisible(); const nextPageCalls = () => proxy.post.mock.calls.filter(([, options]) => (options?.body as { cursor: string }).cursor === "next"); expect(nextPageCalls()).toHaveLength(0); act(() => mockAllIsIntersecting(true)); await waitFor(() => expect(nextPageCalls()).toHaveLength(1)); expect(screen.getByText("Run one")).toBeVisible(); - expect(screen.getByRole("status")).toHaveTextContent("2 matching runs"); + expect(screen.getByText("100% of 2")).toBeVisible(); act(() => finishSecondPage()); expect(await screen.findByText("Run two")).toBeVisible(); expect(screen.getByText("Run one")).toBeVisible(); @@ -423,7 +422,7 @@ it("fetches one preview for two keystrokes inside the debounce window", async () await vi.advanceTimersByTimeAsync(1000); await waitFor(() => expect(previewsFor("ab")).toHaveLength(1)); expect(previewsFor("a")).toHaveLength(0); - expect(await screen.findByText("1 matching run")).toBeVisible(); + expect(await screen.findByText(/% of 1$/)).toBeVisible(); } finally { vi.useRealTimers(); } diff --git a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx index 0c9bb89ddcf..a3a0fe725cc 100644 --- a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx +++ b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx @@ -163,7 +163,7 @@ function SetupEditor({ const saveLabel = saveLabelFor(mode, repeat); const offline = !ready && mode !== "edit"; return ( -
+
-
{status.ready && status.error && (

{status.error.message}{" "} @@ -113,8 +95,8 @@ export function MatchingActivityPreview({

)} - {(status.loading || (shown && !status.error && runs.length > 0)) && ( -
+ {showTable && ( +