Skip to content

Commit dd72927

Browse files
authored
ref(feedback): Update Seer consent flow for user feedback AI titles, summaries & categories, and spam detection (#102912)
relates to REPLAY-783 Add an AI privacy principles tooltip to the user feedback AI titles, as well as summaries and categories. Remove the reference to Seer consent in the existing tooltip for spam detection if `gen-ai-consent-flow-removal` feature flag enabled. ### AI titles: <img width="403" height="144" alt="Screenshot 2025-11-07 at 1 29 01 PM" src="https://github.com/user-attachments/assets/9c4b6106-35b6-4520-8e4a-3c4d898d34dc" /> ### AI summaries & categories: <img width="608" height="168" alt="Screenshot 2025-11-07 at 1 27 43 PM" src="https://github.com/user-attachments/assets/cc0dd9e2-bbf7-4425-ab7b-5b7ff2074109" /> ### Spam detection: | `hide-ai-features` | Seer acknowledgement | `gen-ai-consent-flow-removal` | Tooltip | |-------------------|------------------------|-------------------------------|---------| | true/false | false | false | <img width="310" height="152" alt="Screenshot 2025-11-06 at 2 59 58 PM" src="https://github.com/user-attachments/assets/2051423e-6e9d-4e49-836b-0a49e90f5ecd" /> | | true | true | false | <img width="310" height="152" alt="Screenshot 2025-11-06 at 3 11 46 PM" src="https://github.com/user-attachments/assets/0ba6563f-3d2f-4a17-adf3-192d6f054f3a" /> | | false | true | false | no tooltip | | true | true/false | true | <img width="310" height="152" alt="Screenshot 2025-11-06 at 3 12 53 PM" src="https://github.com/user-attachments/assets/c405427c-c664-401d-a487-24e3a466a0cc" /> | | false | true/false | true | no tooltip | Before: <img width="768" height="83" alt="Screenshot 2025-11-07 at 10 22 48 AM" src="https://github.com/user-attachments/assets/c241b042-1158-4fc5-90ef-fda7154401f0" /> After: <img width="778" height="112" alt="Screenshot 2025-11-07 at 10 22 25 AM" src="https://github.com/user-attachments/assets/f121f68d-ce31-4b5a-a3bc-b2a2c9340753" />
1 parent e2f36e2 commit dd72927

File tree

5 files changed

+88
-23
lines changed

5 files changed

+88
-23
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type {ReactNode} from 'react';
2+
3+
import {ExternalLink} from '@sentry/scraps/link/link';
4+
5+
import {Tooltip, type TooltipProps} from 'sentry/components/core/tooltip';
6+
import {tct} from 'sentry/locale';
7+
8+
interface AiPrivacyTooltipProps extends Omit<TooltipProps, 'title' | 'children'> {
9+
children: ReactNode;
10+
}
11+
12+
/**
13+
* A tooltip wrapper that links to AI privacy and security documentation.
14+
*/
15+
export function AiPrivacyTooltip({children, ...tooltipProps}: AiPrivacyTooltipProps) {
16+
return (
17+
<Tooltip
18+
isHoverable
19+
title={tct(`[link:Learn more]`, {
20+
link: (
21+
<ExternalLink href="https://docs.sentry.io/product/ai-in-sentry/ai-privacy-and-security/" />
22+
),
23+
})}
24+
{...tooltipProps}
25+
>
26+
{children}
27+
</Tooltip>
28+
);
29+
}

static/app/components/feedback/feedbackItem/feedbackItemUsername.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {Fragment, useCallback, useId, type CSSProperties} from 'react';
22
import styled from '@emotion/styled';
33

4+
import {AiPrivacyTooltip} from 'sentry/components/aiPrivacyTooltip';
45
import {LinkButton} from 'sentry/components/core/button/linkButton';
56
import {Flex} from 'sentry/components/core/layout';
67
import {Tooltip} from 'sentry/components/core/tooltip';
@@ -69,7 +70,9 @@ export default function FeedbackItemUsername({className, feedbackIssue, style}:
6970
<Flex align="center" wrap="wrap" gap="xs">
7071
{isAiSummaryEnabled && summary && (
7172
<Fragment>
72-
<strong>{summary}</strong>
73+
<AiPrivacyTooltip>
74+
<strong>{summary}</strong>
75+
</AiPrivacyTooltip>
7376
<Purple></Purple>
7477
</Fragment>
7578
)}

static/app/components/feedback/list/mailboxPicker.tsx

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,56 @@ export default function MailboxPicker({onChange, value}: Props) {
2626

2727
const {areAiFeaturesAllowed, setupAcknowledgement} = useOrganizationSeerSetup();
2828
const hasSpamFeature = organization.features.includes('user-feedback-spam-ingest');
29-
const hasAiFeatures = areAiFeaturesAllowed && setupAcknowledgement.orgHasAcknowledged;
29+
const skipConsentFlow = organization.features.includes('gen-ai-consent-flow-removal');
30+
31+
const getSpamTooltip = () => {
32+
if (!hasSpamFeature || isSelfHosted) {
33+
return undefined;
34+
}
35+
36+
if (!skipConsentFlow && !setupAcknowledgement.orgHasAcknowledged) {
37+
return tct(
38+
'Generative AI Features and Seer access are required for auto spam detection. Check that [linkGenAI:Generative AI Features] are toggled on, then view the [linkSeer:Seer settings page] for more information.',
39+
{
40+
linkSeer: <Link to={`/settings/${organization.slug}/seer/`} />,
41+
linkGenAI: (
42+
<Link
43+
to={{
44+
pathname: `/settings/${organization.slug}/`,
45+
hash: 'hideAiFeatures',
46+
}}
47+
/>
48+
),
49+
}
50+
);
51+
}
52+
53+
if (!areAiFeaturesAllowed) {
54+
return tct(
55+
'Generative AI Features are required for auto spam detection. Check that [linkGenAI:Generative AI Features] are toggled on.',
56+
{
57+
linkGenAI: (
58+
<Link
59+
to={{
60+
pathname: `/settings/${organization.slug}/`,
61+
hash: 'hideAiFeatures',
62+
}}
63+
/>
64+
),
65+
}
66+
);
67+
}
68+
69+
return undefined;
70+
};
3071

3172
const MAILBOXES = [
3273
{key: 'unresolved', label: t('Inbox')},
3374
{key: 'resolved', label: t('Resolved')},
3475
{
3576
key: 'ignored',
3677
label: t('Spam'),
37-
// only show an AI info tooltip if the org has auto spam detection available,
38-
// but not the correct AI flags or seer acknowledgement.
39-
tooltip:
40-
hasSpamFeature && !hasAiFeatures && !isSelfHosted
41-
? tct(
42-
'Generative AI Features and Seer access are required for auto spam detection. Check that [linkGenAI:Generative AI Features] are toggled on, then view the [linkSeer:Seer settings page] for more information.',
43-
{
44-
linkSeer: <Link to={`/settings/${organization.slug}/seer/`} />,
45-
linkGenAI: (
46-
<Link
47-
to={{
48-
pathname: `/settings/${organization.slug}/`,
49-
hash: 'hideAiFeatures',
50-
}}
51-
/>
52-
),
53-
}
54-
)
55-
: undefined,
78+
tooltip: getSpamTooltip(),
5679
},
5780
];
5881

static/app/components/feedback/summaryCategories/feedbackSummaryCategories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import styled from '@emotion/styled';
22

3+
import {AiPrivacyTooltip} from 'sentry/components/aiPrivacyTooltip';
34
import {FeatureBadge} from 'sentry/components/core/badge/featureBadge';
45
import {Button} from 'sentry/components/core/button';
56
import {Disclosure} from 'sentry/components/core/disclosure';
@@ -75,7 +76,8 @@ export default function FeedbackSummaryCategories() {
7576
}
7677
>
7778
<Flex gap="xs" align="center">
78-
{t('Summary')} <FeatureBadge type="new" />
79+
<AiPrivacyTooltip>{t('Summary')}</AiPrivacyTooltip>
80+
<FeatureBadge type="new" />
7981
</Flex>
8082
</Disclosure.Title>
8183
<Disclosure.Content>

static/app/data/forms/userFeedback.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ const formGroups: JsonFormObject[] = [
4343
name: 'sentry:feedback_ai_spam_detection',
4444
type: 'boolean',
4545
label: t('Enable Spam Detection'),
46-
help: t('Toggles whether or not to enable auto spam detection in User Feedback.'),
46+
help: () =>
47+
tct(
48+
'Toggles whether or not to enable auto spam detection in User Feedback. Powered by generative AI. Learn more about our [link:AI privacy principles].',
49+
{
50+
link: (
51+
<a href="https://docs.sentry.io/product/ai-in-sentry/ai-privacy-and-security/" />
52+
),
53+
}
54+
),
4755
getData: data => ({options: data}),
4856
visible: ({features, hasAiEnabled}) =>
4957
features.has('user-feedback-spam-ingest') && hasAiEnabled,

0 commit comments

Comments
 (0)