-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(ai-conversations): drawer redesign #109182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
obostjancic
merged 7 commits into
master
from
ognjenbostjancic/tet-1982-implement-new-design-for-conversations
Feb 25, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
68c98cd
feat(ai-conversations): drawer redesign
obostjancic b6c7771
fixes
obostjancic 56611ee
header fix
obostjancic 4969993
fix pr checks
obostjancic 2416dfd
iterate pr
obostjancic d9e7d37
fix: use inline Flex props and carry forward unnamed tool spans
obostjancic 8dd4454
fix: add comment explaining ConversationId baseline nudge
obostjancic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,14 @@ | ||
| import {useMemo} from 'react'; | ||
| import {css, useTheme} from '@emotion/react'; | ||
| import {css} from '@emotion/react'; | ||
| import styled from '@emotion/styled'; | ||
|
|
||
| import {Flex} from '@sentry/scraps/layout'; | ||
| import {Link} from '@sentry/scraps/link'; | ||
| import {Text} from '@sentry/scraps/text'; | ||
|
|
||
| import {CopyToClipboardButton} from 'sentry/components/copyToClipboardButton'; | ||
| import Count from 'sentry/components/count'; | ||
| import usePageFilters from 'sentry/components/pageFilters/usePageFilters'; | ||
| import Placeholder from 'sentry/components/placeholder'; | ||
| import {IconChat, IconFire, IconFix} from 'sentry/icons'; | ||
| import {t} from 'sentry/locale'; | ||
| import useOrganization from 'sentry/utils/useOrganization'; | ||
| import {getExploreUrl} from 'sentry/views/explore/utils'; | ||
|
|
@@ -78,9 +76,7 @@ export function ConversationSummary({ | |
| }: ConversationSummaryProps) { | ||
| const organization = useOrganization(); | ||
| const {selection} = usePageFilters(); | ||
| const theme = useTheme(); | ||
| const aggregates = useMemo(() => calculateAggregates(nodes), [nodes]); | ||
| const colors = [...theme.chart.getColorPalette(5), theme.colors.red400]; | ||
|
|
||
| const baseQuery = `gen_ai.conversation.id:${conversationId}`; | ||
|
|
||
|
|
@@ -105,40 +101,28 @@ export function ConversationSummary({ | |
| return ( | ||
| <Flex align="center" gap="lg" flex={1}> | ||
| <Flex align="center" gap="sm" flexShrink={0}> | ||
| <Text size="lg" bold> | ||
| <Text size="sm" bold> | ||
| {t('Conversation')} | ||
| </Text> | ||
| <Text variant="muted" monospace> | ||
| <ConversationId size="sm" variant="muted" monospace> | ||
| {conversationId.slice(0, 8)} | ||
| </Text> | ||
| <CopyToClipboardButton | ||
| aria-label={t('Copy conversation ID')} | ||
| priority="transparent" | ||
| size="zero" | ||
| text={conversationId} | ||
| /> | ||
| </ConversationId> | ||
| </Flex> | ||
| <Divider /> | ||
| <Flex align="center" gap="sm" wrap="wrap"> | ||
| <AggregateItem | ||
| icon={<IconChat size="sm" />} | ||
| iconColor={colors[2]} | ||
| label={t('LLM Calls')} | ||
| value={<Count value={aggregates.llmCalls} />} | ||
| to={aggregates.llmCalls > 0 ? llmCallsUrl : undefined} | ||
| isLoading={isLoading} | ||
| /> | ||
| <AggregateItem | ||
| icon={<IconFix size="sm" />} | ||
| iconColor={colors[5]} | ||
| label={t('Tool Calls')} | ||
| value={<Count value={aggregates.toolCalls} />} | ||
| to={aggregates.toolCalls > 0 ? toolCallsUrl : undefined} | ||
| isLoading={isLoading} | ||
| /> | ||
| <AggregateItem | ||
| icon={<IconFire size="sm" />} | ||
| iconColor={theme.tokens.graphics.danger.vibrant} | ||
| label={t('Errors')} | ||
| value={<Count value={aggregates.errorCount} />} | ||
| to={aggregates.errorCount > 0 ? errorsUrl : undefined} | ||
|
|
@@ -160,30 +144,23 @@ export function ConversationSummary({ | |
| } | ||
|
|
||
| function AggregateItem({ | ||
| icon, | ||
| iconColor, | ||
| label, | ||
| value, | ||
| to, | ||
| isLoading, | ||
| }: { | ||
| label: string; | ||
| value: React.ReactNode; | ||
| icon?: React.ReactNode; | ||
| iconColor?: string; | ||
| isLoading?: boolean; | ||
| to?: string; | ||
| }) { | ||
| const isInteractive = !!to && !isLoading; | ||
|
|
||
| const content = ( | ||
| <AggregateItemContainer align="center" gap="xs" isInteractive={isInteractive}> | ||
| {icon && ( | ||
| <Flex as="span" style={{color: iconColor}}> | ||
| {icon} | ||
| </Flex> | ||
| )} | ||
| <Text variant="muted">{label}</Text> | ||
| <Text bold size="sm"> | ||
| {label} | ||
| </Text> | ||
| {isLoading ? ( | ||
| <Placeholder width="20px" height="16px" /> | ||
| ) : ( | ||
|
|
@@ -199,6 +176,12 @@ function AggregateItem({ | |
| return content; | ||
| } | ||
|
|
||
| // Monospace font has different baseline metrics, nudge up to visually align | ||
| const ConversationId = styled(Text)` | ||
| position: relative; | ||
| top: -1px; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you’d like the ID to start exactly where the “Conversations” label begins, the value should be -0.2px. That said, I personally think a centered alignment would work best. I haven’t seen the designs, so just sharing my two cents here. |
||
| `; | ||
obostjancic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| const Divider = styled('div')` | ||
| width: 1px; | ||
| /* eslint-disable-next-line @sentry/scraps/use-semantic-token */ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't it useful?