diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.integration.test.tsx b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.integration.test.tsx index 55f41c629c2..06f02d124ec 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.integration.test.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/detail/conversation/TraceConversation.integration.test.tsx @@ -217,6 +217,7 @@ describe("TraceConversation", () => { it("keeps refresh busy until content finishes when live updates pause", async () => { const user = userEvent.setup(); const pending = Promise.withResolvers(); + vi.mocked(agentTraceCall).mockResolvedValue({ ...trace, next_cursor: "next-page" }); renderWithProviders( , ); @@ -229,11 +230,14 @@ describe("TraceConversation", () => { await user.click(refresh); await waitFor(() => expect(testQueryClient.isFetching({ queryKey: ["agentTrace"] })).toBe(0)); expect(refresh).toBeDisabled(); + const more = screen.getByRole("button", { name: "Load next 20 entries" }); + expect(more).toBeDisabled(); await user.click(refresh); await user.click(screen.getByRole("button", { name: "Live updates" })); await act(async () => pending.resolve({ ...rootDetail, output: "Updated final answer" })); expect(await screen.findByText("Updated final answer")).toBeVisible(); await waitFor(() => expect(refresh).toBeEnabled()); + expect(more).toBeEnabled(); expect(agentTraceCall).toHaveBeenCalledTimes(2); }); diff --git a/ui/litellm-dashboard/src/components/lens/traces/detail/run/RunView.tsx b/ui/litellm-dashboard/src/components/lens/traces/detail/run/RunView.tsx index 62c9844fd90..3186e5bd7ce 100644 --- a/ui/litellm-dashboard/src/components/lens/traces/detail/run/RunView.tsx +++ b/ui/litellm-dashboard/src/components/lens/traces/detail/run/RunView.tsx @@ -216,7 +216,7 @@ function LoadedRun({ embedded={embedded} stale={switching} conversationPaging={{ - loading: traceQuery.isFetching, + loading: manualRead || traceQuery.isFetching, failed: isFetchNextPageError, loadMore: fetchNextPage, }}