: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
feat(support): add support topics and a searchable topic field (#61870)
Christiaan Hendriksen3134cd5601e9
diff --git a/frontend/src/lib/components/Support/SupportForm.tsx b/frontend/src/lib/components/Support/SupportForm.tsxindex 27a7109c8c51..1f495f33383e 100644--- a/frontend/src/lib/components/Support/SupportForm.tsx+++ b/frontend/src/lib/components/Support/SupportForm.tsx@@ -17,6 +17,7 @@ import { useUploadFiles } from 'lib/hooks/useUploadFiles'import { IconFeedback } from 'lib/lemon-ui/icons'import { LemonField } from 'lib/lemon-ui/LemonField'import { LemonFileInput } from 'lib/lemon-ui/LemonFileInput/LemonFileInput'+import { LemonInputSelect } from 'lib/lemon-ui/LemonInputSelect/LemonInputSelect'import { LemonSelect } from 'lib/lemon-ui/LemonSelect/LemonSelect'import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea/LemonTextArea'import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'@@ -26,7 +27,7 @@ import {SEVERITY_LEVEL_TO_NAME,SUPPORT_TICKET_TEMPLATES,SupportTicketKind,- TARGET_AREA_TO_NAME,+ TARGET_AREA_OPTIONS,supportLogic,} from './supportLogic'@@ -140,15 +141,28 @@ export function SupportForm(): JSX.Element | null {</Link></div><LemonField name="target_area">- <LemonSelect- disabledReason={- !user- ? 'Please login to your account before opening a ticket unrelated to authentication issues.'- : null- }- fullWidth- options={TARGET_AREA_TO_NAME}- />+ {({ value, onChange }) => (+ <Tooltip+ title={+ !user+ ? 'Please login to your account before opening a ticket unrelated to authentication issues.'+ : undefined+ }+ >+ <span className="block">+ <LemonInputSelect+ mode="single"+ fullWidth+ disabled={!user}+ placeholder="Search for a topic"+ data-attr="support-form-target-area"+ options={TARGET_AREA_OPTIONS}+ value={value ? [value] : []}+ onChange={([newValue]) => onChange(newValue ?? null)}+ />+ </span>+ </Tooltip>+ )}</LemonField></div>{sendSupportRequest.target_area === 'error_tracking' && (diff --git a/frontend/src/lib/components/Support/supportLogic.ts b/frontend/src/lib/components/Support/supportLogic.tsindex 8365d5fcdad2..a6c18e6ccafc 100644--- a/frontend/src/lib/components/Support/supportLogic.ts+++ b/frontend/src/lib/components/Support/supportLogic.ts@@ -257,14 +257,14 @@ const TARGET_AREA_TO_NAME_PRODUCTS = [label: 'Logs',},{- value: 'max-ai',- 'data-attr': `support-form-target-area-max-ai`,+ value: 'posthog-ai',+ 'data-attr': `support-form-target-area-posthog-ai`,label: 'PostHog AI',},{value: 'posthog-mcp','data-attr': `support-form-target-area-posthog-mcp`,- label: 'MCP Server',+ label: 'PostHog MCP',},{value: 'analytics',@@ -281,6 +281,16 @@ const TARGET_AREA_TO_NAME_PRODUCTS = ['data-attr': `support-form-target-area-session_replay`,label: 'Session replay (incl. recordings)',},+ {+ value: 'signals',+ 'data-attr': `support-form-target-area-signals`,+ label: 'Signals',+ },+ {+ value: 'slack',+ 'data-attr': `support-form-target-area-slack`,+ label: 'Slack app',+ },{value: 'surveys','data-attr': `support-form-target-area-surveys`,@@ -308,6 +318,11 @@ export const TARGET_AREA_TO_NAME = [{ title: 'Individual product', options: TARGET_AREA_TO_NAME_PRODUCTS },]+// `key` is the label (not the value) so the searchable input shows readable text on edit, not the raw target_area+export const TARGET_AREA_OPTIONS: { key: string; label: string; value: string }[] = TARGET_AREA_TO_NAME.flatMap(+ (group) => group.options.map((option) => ({ key: option.label, label: option.label, value: option.value }))+)+export const SEVERITY_LEVEL_TO_NAME = {critical: 'Outage, data loss, or data breach',high: 'Feature is not working at all',diff --git a/frontend/src/scenes/max/FeedbackPrompt.tsx b/frontend/src/scenes/max/FeedbackPrompt.tsxindex 3a454c6241c5..38787a36c566 100644--- a/frontend/src/scenes/max/FeedbackPrompt.tsx+++ b/frontend/src/scenes/max/FeedbackPrompt.tsx@@ -96,7 +96,7 @@ export function FeedbackPrompt({ conversationId, traceId }: FeedbackPromptProps)name: '',email: '',kind: 'feedback',- target_area: 'max-ai',+ target_area: 'posthog-ai',severity_level: 'low',message: feedbackText,})diff --git a/frontend/src/scenes/max/TicketPrompt.tsx b/frontend/src/scenes/max/TicketPrompt.tsxindex cfdb836c6609..0817478662cc 100644--- a/frontend/src/scenes/max/TicketPrompt.tsx+++ b/frontend/src/scenes/max/TicketPrompt.tsx@@ -81,7 +81,7 @@ export function TicketPrompt({ conversationId, traceId, summary, initialText }:name: '',email: '',kind: 'bug',- target_area: 'max-ai',+ target_area: 'posthog-ai',severity_level: 'low',message: messageContent,tags: ['raised_from_posthog_ai_chat'],