feat(insights): Integrate conversation details into trace AI tab#112907
feat(insights): Integrate conversation details into trace AI tab#112907obostjancic wants to merge 2 commits intomasterfrom
Conversation
Sentry Snapshot Testing
|
static/app/views/insights/pages/conversations/components/conversationLayout.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Integrates AI conversation details into the trace details “AI” tab when gen_ai.conversation.id is present and the gen-ai-conversations feature flag is enabled, while refactoring the conversation UI into reusable, resizable split-layout building blocks shared across conversation detail pages and the trace view.
Changes:
- Renames the trace tab label from “AI Spans” to “AI” and swaps the AI tab implementation to a new
TraceAiTabthat conditionally renders conversations vs spans. - Adds a conversations-aware trace AI view with Chat/Spans subtabs (including multi-conversation tabbing and a shared split-panel layout).
- Extracts shared conversation UI primitives (
ConversationSplitLayout, panels, skeleton) and selection logic (useConversationSelection) for reuse.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| static/app/views/performance/newTraceDetails/useTraceLayoutTabs.tsx | Renames the tab label to “AI”. |
| static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiTab.tsx | New conditional AI tab entrypoint selecting conversations vs spans. |
| static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiSpans.tsx | Refactors spans view and adds a split-layout variant for embedding. |
| static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiConversations.tsx | New trace AI conversations view with Chat/Spans subtabs and header. |
| static/app/views/performance/newTraceDetails/index.tsx | Wires trace AI tab to TraceAiTab. |
| static/app/views/insights/pages/conversations/hooks/useConversationSelection.tsx | New shared hook for selection/default selection logic across conversation views. |
| static/app/views/insights/pages/conversations/components/conversationView.tsx | Refactors to shared layout + selection hook and uses split-panel UI. |
| static/app/views/insights/pages/conversations/components/conversationSummary.tsx | Extracts aggregates bar for reuse in the trace AI conversations header. |
| static/app/views/insights/pages/conversations/components/conversationLayout.tsx | New shared resizable split layout, panels, and skeleton for conversation UIs. |
| static/app/views/insights/pages/agents/hooks/useAITrace.tsx | Adds gen_ai.conversation.id to fetched span attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
static/app/views/insights/pages/conversations/components/conversationLayout.tsx
Show resolved
Hide resolved
static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiSpans.tsx
Show resolved
Hide resolved
static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiConversations.tsx
Show resolved
Hide resolved
static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiConversations.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ad17043. Configure here.
static/app/views/performance/newTraceDetails/traceDrawer/tabs/traceAiSpans.tsx
Show resolved
Hide resolved
Decompose ConversationView into composable building blocks (ConversationSplitLayout, ConversationLeftPanel, ConversationDetailPanel, useConversationSelection) so both the conversation detail page and trace view can share the same presentation layer. The trace AI tab now detects conversations via gen_ai.conversation.id on spans. When conversations exist (gated behind gen-ai-conversations flag), it shows Chat/Spans sub-tabs with the full message view filtered to the current trace. Multiple conversations render as labeled tabs. A resizable split panel (matching the trace drawer divider style) replaces the fixed two-column layout everywhere. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ad17043 to
c8b3707
Compare
- Use distinct localStorage keys per context for split panel size - Reset selectedSpanId when switching conversation tabs - URL-encode selectedSpanId in conversation link query string Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Integrate conversation details into the trace details AI tab. When AI spans have
gen_ai.conversation.id, the tab shows Chat/Spans sub-tabs with the full message view filtered to the current trace. Multiple conversations render as labeled tabs. Gated behindgen-ai-conversationsfeature flag; without it, falls back to the existing spans-only view.Decomposes
ConversationViewinto composable building blocks (ConversationSplitLayout,ConversationLeftPanel,ConversationDetailPanel,useConversationSelection) shared by both the conversation detail page and trace view. Replaces the fixed two-column layout with a resizable split panel everywhere.