:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(llma): Small ux improvements on sessions page (#60657)
Marcel Poelkera357ec2e9e9d
diff --git a/products/ai_observability/frontend/AIObservabilitySessionScene.tsx b/products/ai_observability/frontend/AIObservabilitySessionScene.tsxindex 305d8a74c61c..cb09b54990a6 100644--- a/products/ai_observability/frontend/AIObservabilitySessionScene.tsx+++ b/products/ai_observability/frontend/AIObservabilitySessionScene.tsx@@ -267,7 +267,10 @@ function SessionTurnView({const traceUrl = combineUrl(urls.aiObservabilityTrace(trace.id), baseTraceParams).urlconst summaryUrl = combineUrl(urls.aiObservabilityTrace(trace.id), { ...baseTraceParams, tab: 'summary' }).url- const canShowSteps = turn.isLoaded && turn.userVisibleTurn+ const hasTranscript = turn.isLoaded && !!turn.userVisibleTurn+ // Auto-show the Steps panel for span-only turns — they have no transcript to fall+ // back to, so the span tree IS the conversation.+ const showStepsPanel = (hasTranscript && stepsShown) || (turn.isLoaded && !turn.userVisibleTurn)return (<div className="flex flex-col">@@ -321,7 +324,7 @@ function SessionTurnView({</div>)}- {canShowSteps && stepsShown && (+ {showStepsPanel && (<StepsPaneltraceId={trace.id}fullTrace={fullTrace}@@ -334,7 +337,7 @@ function SessionTurnView({<div className="w-40 shrink-0 flex flex-col gap-1 text-xs text-muted">{showSentiment && <SessionTraceSentimentBar traceId={trace.id} createdAt={trace.createdAt} />}<div className="flex flex-col gap-1 items-start">- {canShowSteps && (+ {hasTranscript && (<LemonButton size="xsmall" type="tertiary" onClick={() => toggleSteps(trace.id)}>{stepsShown ? 'Hide steps' : 'Show steps'}</LemonButton>@@ -380,7 +383,7 @@ function TurnBody({turn: SessionTurnisLoading: booleanonLoad: () => void-}): JSX.Element {+}): JSX.Element | null {if (isLoading) {return (<div className="flex items-center gap-2 text-muted text-sm py-2">@@ -399,7 +402,8 @@ function TurnBody({)}if (!turn.userVisibleTurn) {- return <div className="text-muted text-sm py-2">No conversational turn to render in this trace.</div>+ // No chat to render — the parent renders `StepsPanel` inline below as the substitute.+ return null}// `turn.newInputs` / `outputs` come pre-deduped from `extractSessionTurns`.return <TranscriptBubbleStream inputs={turn.newInputs} outputs={turn.outputs} />diff --git a/products/ai_observability/frontend/ConversationDisplay/TranscriptBubbleStream.tsx b/products/ai_observability/frontend/ConversationDisplay/TranscriptBubbleStream.tsxindex 18b83586e89a..0be5b5dd12c4 100644--- a/products/ai_observability/frontend/ConversationDisplay/TranscriptBubbleStream.tsx+++ b/products/ai_observability/frontend/ConversationDisplay/TranscriptBubbleStream.tsx@@ -226,19 +226,19 @@ function ScaffoldGroupPill({const count = messages.lengthconst label = count === 1 ? '1 hidden context block' : `${count} hidden context blocks`// Mirror the bubble-alignment convention: user-role on the right, everything else on the left.- const alignSelf = role === 'user' ? 'self-end' : 'self-start'+ const isUser = role === 'user'+ const alignSelf = isUser ? 'self-end' : 'self-start'+ const buttonAlignSelf = isUser ? 'self-end' : 'self-start'return (<div className={`flex flex-col gap-1 text-xs text-muted max-w-[75%] ${alignSelf}`}><buttontype="button"- className="flex items-center gap-1 hover:text-default text-left cursor-pointer"+ className={`flex items-center gap-1 hover:text-default text-left cursor-pointer ${buttonAlignSelf}`}onClick={() => setExpanded((v) => !v)}><IconChevronRight className={`transition-transform ${expanded ? 'rotate-90' : ''}`} /><span>{expanded ? `Hide ${label}` : `Show ${label}`}</span>- {!expanded && distinctTags.length > 0 && (- <span className="font-mono opacity-60">— {distinctTags.join(', ')}</span>- )}+ {distinctTags.length > 0 && <span className="font-mono opacity-60">— {distinctTags.join(', ')}</span>}</button>{expanded && (<div className="flex flex-col gap-1.5 opacity-70">