Skip to content

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

fix(ui): trace preview empty state popup layout and visibility (#11192)

Lotte Verheyden710173926d7b
diff --git a/web/src/components/trace2/components/IOPreview/IOPreview.tsx b/web/src/components/trace2/components/IOPreview/IOPreview.tsx
index fd2e0bac19..e0f41f9b6b 100644
--- a/web/src/components/trace2/components/IOPreview/IOPreview.tsx
+++ b/web/src/components/trace2/components/IOPreview/IOPreview.tsx
@@ -134,9 +134,14 @@ export function IOPreview({
onOutputExpansionChange,
};
+ // Only show empty state popup for traces (not observations) when there's no input/output
+ // Check both parsed and raw props since not all callers provide parsedInput/parsedOutput
+ const hasInput = input !== null && input !== undefined;
+ const hasOutput = output !== null && output !== undefined;
const showEmptyState =
- (parsedInput === null || parsedInput === undefined) &&
- (parsedOutput === null || parsedOutput === undefined) &&
+ !hasInput &&
+ !hasOutput &&
+ !observationName && // Only show for traces, not observations
!isLoading &&
!hideIfNull &&
!dismissedTraceViewNotifications.includes(EMPTY_IO_ALERT_ID);
diff --git a/web/src/components/trace2/components/IOPreview/IOPreviewPretty.tsx b/web/src/components/trace2/components/IOPreview/IOPreviewPretty.tsx
index c91f369d19..5c477154b0 100644
--- a/web/src/components/trace2/components/IOPreview/IOPreviewPretty.tsx
+++ b/web/src/components/trace2/components/IOPreview/IOPreviewPretty.tsx
@@ -46,7 +46,7 @@ function JsonInputOutputView({
const showOutput = !hideOutput && !(hideIfNull && !parsedOutput);
return (
- <div className="min-h-0 flex-1 [&_.io-message-content]:px-2 [&_.io-message-header]:px-2">
+ <div className="[&_.io-message-content]:px-2 [&_.io-message-header]:px-2">
{showInput && (
<PrettyJsonView
title="Input"
@@ -220,7 +220,7 @@ export function IOPreviewPretty({
const shouldShowMetadata = showMetadata && parsedMetadata !== undefined;
return (
- <div className="min-h-0 flex-1">
+ <div>
<SectionToolDefinitions
tools={allTools}
toolCallCounts={toolCallCounts}