Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(public traces): Do not render sidebar for public traces when authenticated users miss project access (#10853)

Michael Fröhlichbf5cde49ea72
diff --git a/web/src/components/layouts/app-layout/index.tsx b/web/src/components/layouts/app-layout/index.tsx
index 341447eeab..c2ca50c128 100644
--- a/web/src/components/layouts/app-layout/index.tsx
+++ b/web/src/components/layouts/app-layout/index.tsx
@@ -79,13 +79,15 @@ export function AppLayout(props: PropsWithChildren) {
return <LoadingLayout message={authGuard.message} />;
}
- // Project access denied - only check for authenticated users on non-publishable paths
- // Publishable paths (traces, sessions) should be accessible without authentication
- if (
- session.status === "authenticated" &&
- !isPublishable &&
- !projectAccess.hasAccess
- ) {
+ // Project access denied - handle based on path type
+ if (session.status === "authenticated" && !projectAccess.hasAccess) {
+ // For publishable paths (shared traces/sessions), render minimal layout without sidebar
+ // This allows authenticated users to view shared content without seeing project navigation
+ if (isPublishable) {
+ return <MinimalLayout>{props.children}</MinimalLayout>;
+ }
+
+ // For non-publishable paths, show error page
return (
<ErrorPageWithSentry
title="Project Not Found"