🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(sessions): replace the full-screen auth spinner with inline loading states (#18578)
Der Gerät513e2e73efd7
diff --git a/web/src/__tests__/detail-page-route-params.clienttest.tsx b/web/src/__tests__/detail-page-route-params.clienttest.tsxindex 7505386c6c..69b6ba9f2c 100644--- a/web/src/__tests__/detail-page-route-params.clienttest.tsx+++ b/web/src/__tests__/detail-page-route-params.clienttest.tsx@@ -141,6 +141,17 @@ describe("detail page deep-link route params", () => {expect(screen.getByTestId("session-page")).toHaveTextContent("s1");});+ test("session detail waits inline, without the full-screen branded overlay", () => {+ mockRouterQuery({});+ const { container } = render(<SessionPageRoute />);+ /** A spinner renders, so the negative assertions below cannot pass vacuously. */+ expect(container.querySelector("svg")).not.toBeNull();+ /** The branded auth screen is the only pending state with a heading, and the+ * only one that paints over the navigation shell. */+ expect(screen.queryByRole("heading")).toBeNull();+ expect(container.querySelector(".fixed.inset-0")).toBeNull();+ });+test("annotation queue item does not mount while router.query is empty", () => {mockRouterQuery({});render(<AnnotationQueueItemRoute />);diff --git a/web/src/features/sessions/SessionDetailPage.tsx b/web/src/features/sessions/SessionDetailPage.tsxindex c9aa3de38e..5449bab089 100644--- a/web/src/features/sessions/SessionDetailPage.tsx+++ b/web/src/features/sessions/SessionDetailPage.tsx@@ -3,19 +3,16 @@ import {SessionPage,} from "@/src/features/sessions/SessionPages";import { useReadPath } from "@/src/features/events";-import { useReadyRouteParams } from "@/src/hooks/useReadyRouteParams";-import { Spinner } from "@/src/components/layouts/spinner";+import {+ RouteParamsPendingFallback,+ useReadyRouteParams,+} from "@/src/hooks/useReadyRouteParams";export default function SessionDetailPage() {const route = useReadyRouteParams(["projectId", "sessionId"]);const { isV4 } = useReadPath();- if (!route.ready)- return (- <div className="bg-background fixed inset-0 z-50 flex">- <Spinner message="Loading" />- </div>- );+ if (!route.ready) return <RouteParamsPendingFallback />;const { projectId, sessionId } = route.params;diff --git a/web/src/features/sessions/SessionPages.tsx b/web/src/features/sessions/SessionPages.tsxindex 78b56e8fe3..69f106bc21 100644--- a/web/src/features/sessions/SessionPages.tsx+++ b/web/src/features/sessions/SessionPages.tsx@@ -4,7 +4,7 @@ import { headerActionClassName } from "@/src/features/traces/components/headerAcimport { cn } from "@/src/utils/tailwind";import { GroupedScoreBadges } from "@/src/components/grouped-score-badge";import { ErrorPage } from "@/src/components/error-page";-import { Spinner } from "@/src/components/layouts/spinner";+import { Spinner } from "@/src/components/design-system/Spinner/Spinner";import { PublishSessionSwitch } from "@/src/components/publish-object-switch";import { IOPreview } from "@/src/features/traces";import { JsonSkeleton } from "@/src/components/ui/CodeJsonViewer";@@ -1061,8 +1061,8 @@ export const SessionEventsPage: React.FC<{if (!session.data) {return (- <div className="bg-background fixed inset-0 z-50 flex">- <Spinner message="Loading" />+ <div className="flex h-full items-center justify-center">+ <Spinner size="xl" variant="muted" /></div>);}