🪢 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(traces): Prevent text overflow in trace view (#14489)
Ben Bachem7d5ba6a1ec0f
diff --git a/web/src/components/ui/CodeJsonViewer.tsx b/web/src/components/ui/CodeJsonViewer.tsxindex 93a4ba6cc6..0e57dba61c 100644--- a/web/src/components/ui/CodeJsonViewer.tsx+++ b/web/src/components/ui/CodeJsonViewer.tsx@@ -91,7 +91,7 @@ export function JSONView(props: {<><divclassName={cn(- "io-message-content flex gap-2 text-xs wrap-break-word whitespace-pre-wrap",+ "io-message-content flex max-w-full min-w-0 gap-2 text-xs wrap-break-word whitespace-pre-wrap",props.borderless ? "" : "p-2",props.title === "assistant" || props.title === "Output"? "bg-accent-light-green dark:border-accent-dark-green"@@ -107,7 +107,7 @@ export function JSONView(props: {<Skeleton className="h-3 w-3/4" />) : promptReferenceProjectId && typeof parsedJson === "string" ? (<code- className="wrap-break-word whitespace-pre-wrap"+ className="max-w-full min-w-0 wrap-break-word whitespace-pre-wrap"dir="auto"style={{ unicodeBidi: "plaintext" }}>@@ -115,6 +115,7 @@ export function JSONView(props: {</code>) : (<div+ className="max-w-full min-w-0 flex-1 overflow-hidden"onClick={() => {// If externally collapsed and user clicks to expand, sync the stateif (props.externalJsonCollapsed && props.onToggleCollapse) {@@ -140,7 +141,7 @@ export function JSONView(props: {displaySize={isCollapsed ? "collapsed" : "expanded"}matchesURL={true}customizeCopy={(node) => stringifyJsonNode(node)}- className="w-full"+ className="w-full max-w-full min-w-0"/></div>)}@@ -167,7 +168,7 @@ export function JSONView(props: {return (<divclassName={cn(- "flex max-h-full min-h-0 flex-col",+ "flex max-h-full min-h-0 max-w-full min-w-0 flex-col",props.className,props.scrollable ? "overflow-hidden" : "",)}@@ -199,8 +200,8 @@ export function JSONView(props: {/>) : null}{props.scrollable ? (- <div className="flex h-full min-h-0 overflow-hidden rounded-sm border">- <div className="max-h-full min-h-0 w-full overflow-y-auto">+ <div className="flex h-full min-h-0 max-w-full overflow-hidden rounded-sm border">+ <div className="max-h-full min-h-0 w-full max-w-full min-w-0 overflow-y-auto">{body}</div></div>@@ -268,7 +269,7 @@ export function CodeView(props: {return (<divclassName={cn(- "flex max-w-full flex-col",+ "flex max-w-full min-w-0 flex-col",props.className,props.scrollable && "max-h-full min-h-0",)}@@ -290,7 +291,7 @@ export function CodeView(props: {</><divclassName={cn(- "relative flex flex-col gap-2 rounded-md border",+ "relative flex max-w-full min-w-0 flex-col gap-2 overflow-hidden rounded-md border",props.scrollable ? "max-h-full min-h-0 overflow-hidden" : "",)}>@@ -306,7 +307,7 @@ export function CodeView(props: {)}<codeclassName={cn(- "relative flex-1 px-4 py-3 font-mono text-xs wrap-break-word whitespace-pre-wrap",+ "relative max-w-full min-w-0 flex-1 px-4 py-3 font-mono text-xs wrap-break-word whitespace-pre-wrap",isCollapsed ? `line-clamp-6` : "block",props.scrollable ? "overflow-y-auto" : "",)}