Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions static/app/views/replays/detail/ai/ai.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default function Ai() {
const segmentCount = replayRecord?.count_segments ?? 0;
const project = useProjectFromId({project_id: replayRecord?.project_id});
const analyticsArea = useAnalyticsArea();
const skipConsentFlow = organization.features.includes('gen-ai-consent-flow-removal');

const replayTooLongMessage = t(
'While in beta phase, we only summarize a small portion of the replay.'
Expand Down Expand Up @@ -77,7 +78,8 @@ export default function Ai() {
}

// check for org seer setup first before attempting to fetch summary
if (isOrgSeerSetupPending) {
// only do this if consent flow is not skipped
if (!skipConsentFlow && isOrgSeerSetupPending) {
return (
<Wrapper data-test-id="replay-details-ai-summary-tab">
<LoadingContainer>
Expand All @@ -91,7 +93,8 @@ export default function Ai() {

// If our `replay-ai-summaries` ff is enabled and the org has gen AI ff enabled,
// but the org hasn't acknowledged the gen AI features, then show CTA.
if (!setupAcknowledgement.orgHasAcknowledged) {
// only do this if consent flow is not skipped
if (!skipConsentFlow && !setupAcknowledgement.orgHasAcknowledged) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this isn't necessary since the flag will make orgHasAcknowledged be true

return (
<Wrapper data-test-id="replay-details-ai-summary-tab">
<EndStateContainer>
Expand Down
18 changes: 16 additions & 2 deletions static/app/views/replays/detail/layout/focusTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import {css} from '@emotion/react';
import styled from '@emotion/styled';

import {FeatureBadge} from '@sentry/scraps/badge';
import {ExternalLink} from '@sentry/scraps/link/link';
import {Tooltip} from '@sentry/scraps/tooltip/tooltip';

import {Flex} from 'sentry/components/core/layout';
import {TabList, Tabs} from 'sentry/components/core/tabs';
import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup';
import {t} from 'sentry/locale';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Organization} from 'sentry/types/organization';
import {trackAnalytics} from 'sentry/utils/analytics';
Expand Down Expand Up @@ -36,7 +38,19 @@ function getReplayTabs({
[TabKey.AI]:
hasAiSummary && (!isVideoReplay || hasMobileSummary) ? (
<Flex align="center" gap="sm">
{t('AI Summary')}
<Tooltip
isHoverable
title={tct(
`Powered by generative AI. Learn more about our [link:AI privacy principles].`,
{
link: (
<ExternalLink href="https://docs.sentry.io/product/ai-in-sentry/ai-privacy-and-security/" />
),
}
)}
>
{t('AI Summary')}
</Tooltip>
<FeatureBadge type="beta" />
</Flex>
) : null,
Expand Down
Loading