: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(replay-vision): show each template's output type on the picker card (#73606)
Kim Svatos Dugan3d73d464d56d
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 5e31971962e4..b4650dcb03a5 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -5573,7 +5573,7 @@ snapshots:scenes-app-dashboards--show-across-viewports--narrow--dark:hash: v1.k794b7964.e919c4955d7113170ab00269c5f628c318afe14f26dc8aafb046b172e17f362e.YDXD84rrb2KR1I36pHMxEsGZ0sN0os_cBBdNIf89Pu8scenes-app-dashboards--show-across-viewports--narrow--light:- hash: v1.k794b7964.a46d840722e971910236d6fcd8a8f69e0b1db5ee9d472d62055b02d6569f7a99.kHEdVPNUm5DRKSlMFS12SLKf1TyChQJZKKuZ2PKvtfA+ hash: v1.k794b7964.2a88f06991ca4c13ad27ee62db8eaa037c542301e28c24934eedc1bbb78cb338.3Ne0cm6_2xQiGE1wGcRzmw0QBd3QrEYkELz3PCg9J48scenes-app-dashboards--show-across-viewports--superwide--dark:hash: v1.k794b7964.9948b52cf842206c1584057a6a16b8caed7a32d95f103dbea07089a02df75a53.AuXGqOvw-P-XuzOL2Zl-BkBPb1-Q3R1949f5-IkTjZAscenes-app-dashboards--show-across-viewports--superwide--light:diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerTemplatePicker.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerTemplatePicker.tsxindex 532166a03ad8..fc5247b9df77 100644--- a/products/replay_vision/frontend/replay_scanners/components/ScannerTemplatePicker.tsx+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerTemplatePicker.tsx@@ -8,6 +8,7 @@ import { urls } from 'scenes/urls'import { ScannerTypeBadge } from '../../components/ScannerTypeBadge'import { replayScannerLogic } from '../replayScannerLogic'import { ScannerTemplate, ScannerTemplateIcon, defaultScannerTemplates, newScanner } from '../scannerTemplates'+import { scannerTypeOutputHint } from '../types'const TEMPLATE_ICONS: Record<ScannerTemplateIcon, JSX.Element> = {warning: <IconWarning />,@@ -41,18 +42,28 @@ function TemplateCard({ template }: { template: ScannerTemplate | 'blank' }): JS{isBlank ? <IconPlus /> : TEMPLATE_ICONS[template.icon]}</span></div>- <div className="flex-1 flex flex-col justify-start">- <div className="flex items-center justify-center gap-2 mb-2">- <h3 className="text-base font-semibold text-default mb-0">- {isBlank ? 'Create from scratch' : template.name}- </h3>- {!isBlank && <ScannerTypeBadge scannerType={template.scanner_type} size="small" />}- </div>- <p className="text-sm text-secondary leading-relaxed">+ <div className="flex-1 flex flex-col justify-start w-full">+ <h3 className="text-base font-semibold text-default mb-2">+ {isBlank ? 'Create from scratch' : template.name}+ </h3>+ <p className="text-sm text-secondary leading-relaxed mb-0">{isBlank? 'Build a fully custom scanner with your own prompt and configuration.': template.description}</p>+ {/* Type chip carries its output inline (e.g. "Monitor · yes or no"), pinned to the card's+ bottom edge (mt-auto) so it lines up across the grid regardless of description length. */}+ {!isBlank && (+ <div className="mt-auto pt-4 flex justify-center">+ <ScannerTypeBadge+ scannerType={template.scanner_type}+ size="medium"+ suffix={+ <span className="opacity-75">· {scannerTypeOutputHint(template.scanner_type)}</span>+ }+ />+ </div>+ )}</div></div></button>diff --git a/products/replay_vision/frontend/replay_scanners/types.ts b/products/replay_vision/frontend/replay_scanners/types.tsindex a8a82fc92311..cc2707e2ce8e 100644--- a/products/replay_vision/frontend/replay_scanners/types.ts+++ b/products/replay_vision/frontend/replay_scanners/types.ts@@ -189,6 +189,19 @@ export function scannerTypeLabel(scannerType: ScannerType | null | undefined): sreturn SCANNER_TYPE_OPTIONS.find((opt) => opt.value === scannerType)?.label ?? scannerType}+// A plain-language description of what each scanner type produces per session, for people who don't yet+// know the type names. Kept short so it reads as a chip subtitle / tooltip.+const SCANNER_TYPE_OUTPUT_HINT: Record<ScannerType, string> = {+ monitor: 'yes or no',+ classifier: 'a tag from a set you define',+ scorer: 'a number score',+ summarizer: 'a text summary',+}++export function scannerTypeOutputHint(scannerType: ScannerType): string {+ return SCANNER_TYPE_OUTPUT_HINT[scannerType]+}+export function createdByLabel(user: ScannerCreatedBy | null): string {if (!user) {return ''