diff --git a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.integration.test.tsx b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.integration.test.tsx index cd3adaf900a..29e9dc4d3d8 100644 --- a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.integration.test.tsx +++ b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.integration.test.tsx @@ -391,7 +391,6 @@ 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.getByText("100% of 2")).toBeVisible(); const nextPageCalls = () => proxy.post.mock.calls.filter(([, options]) => (options?.body as { cursor: string }).cursor === "next"); @@ -403,7 +402,6 @@ it("appends the next preview page as the list scrolls near its end, then stops a act(() => finishSecondPage()); expect(await screen.findByText("Run two")).toBeVisible(); expect(screen.getByText("Run one")).toBeVisible(); - expect(screen.queryByText(/Showing/)).not.toBeInTheDocument(); expect(screen.queryByTestId("preview-placeholder")).not.toBeInTheDocument(); act(() => mockAllIsIntersecting(true)); expect(nextPageCalls()).toHaveLength(1); diff --git a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx index a3a0fe725cc..7ce94866b9b 100644 --- a/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx +++ b/ui/litellm-dashboard/src/components/lens/setup/InvestigationSetup.tsx @@ -199,7 +199,7 @@ function SetupEditor({ aria-label="Investigation setup" current={step} onOpen={setStep} - className="lg:-m-1 lg:max-h-full lg:overflow-y-auto lg:p-1" + className="lg:-mx-2 lg:-my-1 lg:max-h-full lg:overflow-y-auto lg:px-2 lg:py-1" > }> diff --git a/ui/litellm-dashboard/src/components/lens/setup/MatchingActivityPreview.tsx b/ui/litellm-dashboard/src/components/lens/setup/MatchingActivityPreview.tsx index b8dbe23f4b0..280b1ec0381 100644 --- a/ui/litellm-dashboard/src/components/lens/setup/MatchingActivityPreview.tsx +++ b/ui/litellm-dashboard/src/components/lens/setup/MatchingActivityPreview.tsx @@ -20,35 +20,18 @@ const noSetup = () => {}; /** The preview can hold hundreds of rows; it re-renders only when its rows or paging change, not on every keystroke. */ const PreviewTable = memo(AgentTracesTable); -type PreviewFooterProps = ComponentProps<"div"> & Pick; - -/** Selection count and a way to undo manual picks; hidden while every match is simply going to be analyzed. */ -function PreviewFooter({ page, selection, className, ...props }: PreviewFooterProps) { - const partial = page.eligible != null && page.executions.length < page.eligible; - const count = selection?.count ?? page.selected; - const picked = selection?.ids.length ?? 0; - const everything = count === page.eligible && !partial && picked === 0; - if (page.eligible == null || everything) return null; +/** Runs saved by hand on an older investigation; picks are no longer made here, only cleared. */ +function PickedRuns({ selection }: { selection: PreviewSelection }) { + const picked = selection.ids.length; + if (picked === 0) return null; return ( -
+

- {count.toLocaleString()} selected for analysis - {partial && ( - <> - {" "} - ยท Showing {page.executions.length.toLocaleString()} of {page.eligible.toLocaleString()} - - )} + {selection.count.toLocaleString()} selected for analysis

- {selection && picked > 0 && ( - - )} +
); } @@ -110,7 +93,7 @@ export function MatchingActivityPreview({ />
)} - {shown && } + {shown && selection && } ); }