Skip to content

: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.

feat(signals): show scout name on scout-authored inbox reports (#67471)

Andrew Maguire9782eda19915
diff --git a/frontend/src/lib/signals/signalCardSourceLine.ts b/frontend/src/lib/signals/signalCardSourceLine.ts
index fe7091d4884c..24959c269a65 100644
--- a/frontend/src/lib/signals/signalCardSourceLine.ts
+++ b/frontend/src/lib/signals/signalCardSourceLine.ts
@@ -1,7 +1,30 @@
import { errorTrackingSignalHeaderLine } from './errorTracking'
+/**
+ * Prettifies a scout skill slug for display: strips the `signals-scout-` prefix, turns separators
+ * into spaces, and Sentence-cases the result (e.g. `signals-scout-error-tracking` → "Error tracking").
+ * Returns null for a bare `signals-scout` / empty slug so callers can fall back.
+ */
+export function scoutDisplayName(skillName: string | null | undefined): string | null {
+ if (!skillName) {
+ return null
+ }
+ const rest = skillName
+ .replace(/^signals-scout-?/, '')
+ .replace(/[-_]/g, ' ')
+ .trim()
+ if (!rest) {
+ return null
+ }
+ return rest.charAt(0).toUpperCase() + rest.slice(1)
+}
+
/** Human-readable "Product · Signal type" line for inbox / debug signal cards. */
-export function signalCardSourceLine(signal: { source_product: string; source_type: string }): string {
+export function signalCardSourceLine(signal: {
+ source_product: string
+ source_type: string
+ extra?: Record<string, unknown>
+}): string {
const { source_product, source_type } = signal
if (source_product === 'error_tracking') {
@@ -41,7 +64,9 @@ export function signalCardSourceLine(signal: { source_product: string; source_ty
return 'Health checks · Instrumentation issue'
}
if (source_product === 'signals_scout') {
- return 'Scout · Cross-source finding'
+ const skillName = typeof signal.extra?.skill_name === 'string' ? signal.extra.skill_name : undefined
+ const name = scoutDisplayName(skillName)
+ return name ? `Scout · ${name}` : 'Scout · Cross-source finding'
}
const productLabel = source_product.replace(/_/g, ' ')
diff --git a/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx b/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx
index 4f651cd0d0a1..b5964c36e693 100644
--- a/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx
+++ b/frontend/src/scenes/inbox/components/detail/ReportDetail.tsx
@@ -16,6 +16,7 @@ import { TZLabel } from 'lib/components/TZLabel'
import { IconLink } from 'lib/lemon-ui/icons'
import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'
import { LemonMenu, LemonMenuItem } from 'lib/lemon-ui/LemonMenu'
+import { scoutDisplayName } from 'lib/signals/signalCardSourceLine'
import { copyToClipboard } from 'lib/utils/copyToClipboard'
import { addProjectIdIfMissing } from 'lib/utils/kea-router'
import { SignalNode } from 'scenes/debug/signals/types'
@@ -23,7 +24,7 @@ import { urls } from 'scenes/urls'
import { inboxReportDetailLogic } from '../../logics/inboxReportDetailLogic'
import { SignalCard } from '../../SignalCard'
-import { InboxTabKey, INBOX_TAB_LABEL, SignalReport, SignalReportStatus } from '../../types'
+import { InboxTabKey, INBOX_TAB_LABEL, SignalReport, SignalReportStatus, SignalSourceProduct } from '../../types'
import {
displayConventionalCommitTitle,
ParsedPrUrlParts,
@@ -78,10 +79,13 @@ function ReportDetailMeta({
report,
evidenceCount,
actionabilityExplanation,
+ scoutName,
}: {
report: SignalReport
evidenceCount: number
actionabilityExplanation?: string | null
+ /** Authoring scout's display name, when the report was scout-authored — appended to the "Scout" chip. */
+ scoutName?: string | null
}): JSX.Element {
const hasSource = hasKnownSourceProduct(report.source_products)
// "Ready" is the default terminal state; surface the status chip only until actionability is known.
@@ -109,7 +113,7 @@ function ReportDetailMeta({
</span>
)
if (hasSource) {
- stats.push(<MetaSourceStack sourceProducts={report.source_products} />)
+ stats.push(<MetaSourceStack sourceProducts={report.source_products} scoutName={scoutName} />)
}
return (
@@ -132,11 +136,22 @@ function ReportDetailMeta({
}
/** Source-product icon stack reused inside the detail meta row. */
-function MetaSourceStack({ sourceProducts }: { sourceProducts?: string[] | null }): JSX.Element | null {
+function MetaSourceStack({
+ sourceProducts,
+ scoutName,
+}: {
+ sourceProducts?: string[] | null
+ scoutName?: string | null
+}): JSX.Element | null {
const [primary, ...overflow] = knownSourceProductEntries(sourceProducts)
if (!primary) {
return null
}
+ // Name the authoring scout on a scout-authored report so it's clear at a glance who wrote it.
+ const primaryLabel =
+ primary.key === SignalSourceProduct.SIGNALS_SCOUT && scoutName
+ ? `${primary.meta.label} · ${scoutName}`
+ : primary.meta.label
return (
<span className="inline-flex items-center gap-1.5 min-w-0">
<SourceProductIconRow
@@ -144,7 +159,7 @@ function MetaSourceStack({ sourceProducts }: { sourceProducts?: string[] | null
className="inline-flex items-center gap-1 shrink-0"
/>
<span>
- {primary.meta.label}
+ {primaryLabel}
{overflow.length > 0 ? ` + ${overflow.length}` : null}
</span>
</span>
@@ -247,6 +262,13 @@ export function InboxDetailFrame({
const evidenceCount = reportSignals !== null ? signals.length : report.signal_count
const hasEvidence = evidenceCount > 0
+ // Which scout authored this report — read off the backing signals (every scout-authored signal
+ // carries its `skill_name`). Null for pipeline reports; upgrades the header "Scout" chip once loaded.
+ const scoutSignal = signals.find(
+ (s) => s.source_product === 'signals_scout' && typeof s.extra?.skill_name === 'string'
+ )
+ const scoutName = scoutSignal ? scoutDisplayName(scoutSignal.extra.skill_name as string) : null
+
const summaryPending =
report.status === SignalReportStatus.IN_PROGRESS || report.status === SignalReportStatus.CANDIDATE
@@ -312,6 +334,7 @@ export function InboxDetailFrame({
report={report}
evidenceCount={evidenceCount}
actionabilityExplanation={actionabilityExplanation}
+ scoutName={scoutName}
/>
</div>
</div>
diff --git a/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx b/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx
index a811a633be28..e4c96895fd56 100644
--- a/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx
+++ b/frontend/src/scenes/inbox/components/signalCards/SignalsScoutSignalCard.tsx
@@ -31,23 +31,6 @@ export function isSignalsScoutExtra(
return Array.isArray(extra.evidence) && typeof extra.skill_name === 'string' && typeof extra.confidence === 'number'
}
-/**
- * Humanizes a scout skill slug into a label: strips the `signals-scout-` prefix, turns dashes into
- * spaces, Sentence-cases the result, and appends " scout" (e.g. `signals-scout-error-tracking` →
- * "Error tracking scout"). A bare `signals-scout` becomes "Scout".
- */
-export function humanizeScoutSkillName(skillName: string): string {
- const rest = skillName
- .replace(/^signals-scout-?/, '')
- .replace(/-/g, ' ')
- .trim()
- if (!rest) {
- return 'Scout'
- }
- const sentenceCased = rest.charAt(0).toUpperCase() + rest.slice(1)
- return `${sentenceCased} scout`
-}
-
/**
* Builds a deep link into the product an evidence entry came from, or null when no link applies.
* Entity-keyed products need an `entityId`; `logs` is entity-less; unknown products get no link.
@@ -115,7 +98,6 @@ export function SignalsScoutSignalCard({ signal }: SignalCardProps): JSX.Element
const extra = signal.extra as Record<string, unknown> & SignalsScoutSignalExtra
- const skillLabel = humanizeScoutSkillName(extra.skill_name)
const confidencePercent = Math.round(extra.confidence * 100)
const hypothesis = extra.hypothesis?.trim() || signal.content
@@ -134,13 +116,12 @@ export function SignalsScoutSignalCard({ signal }: SignalCardProps): JSX.Element
return (
<SignalCardShell
signal={signal}
+ // The scout's name now lives in the shared source line ("Scout · <name>"); keep just a
+ // linked version here so the header doesn't repeat the name.
label={
- <span>
- <Link to={urls.inboxScout(extra.skill_name)} className="font-medium">
- {skillLabel}
- </Link>
- <span className="text-tertiary font-normal"> · v{extra.skill_version}</span>
- </span>
+ <Link to={urls.inboxScout(extra.skill_name)} className="text-tertiary font-normal">
+ v{extra.skill_version}
+ </Link>
}
rightSlot={<SignalReportPriorityBadge priority={extra.severity} />}
>
diff --git a/products/signals/backend/scout_report/persistence.py b/products/signals/backend/scout_report/persistence.py
index 3266fe5ecd9b..70abbb9baf37 100644
--- a/products/signals/backend/scout_report/persistence.py
+++ b/products/signals/backend/scout_report/persistence.py
@@ -205,8 +205,14 @@ def create_scout_report(
# Sequential (not on_commit) so the call is observable and so a Kafka failure surfaces to the
# caller rather than being swallowed by a commit hook.
if emit_signals:
+ # Stamp the authoring scout onto every backing signal so the inbox can render "Scout · <name>"
+ # on the evidence card + header, matching the emit_signal path. `run` is the single place the
+ # skill_name is available (bound signals otherwise ship empty extra, see `_build_signals`).
+ skill_name = run.skill_name if run is not None else None
for signal, document_id in zip(signals, document_ids):
- _emit_bound_signal(team_id=team_id, report_id=report_id, signal=signal, document_id=document_id)
+ _emit_bound_signal(
+ team_id=team_id, report_id=report_id, signal=signal, document_id=document_id, skill_name=skill_name
+ )
if run is not None:
_record_report_emit(team_id=team_id, run_id=run.id, report_id=report_id)
@@ -398,12 +404,15 @@ def _emit_bound_signal(
report_id: str,
signal: ScoutReportSignal,
document_id: str,
+ skill_name: str | None = None,
) -> None:
"""Write one backing signal row to `document_embeddings`, mirroring `assign_and_emit_signal_activity`
- minus the matcher. `report_id` in metadata is what binds it to the report on the read side."""
- metadata = _signal_metadata(
- report_id=report_id, source_id=signal.source_id, weight=signal.weight, extra=signal.extra
- )
+ minus the matcher. `report_id` in metadata is what binds it to the report on the read side.
+
+ `skill_name`, when set, is merged into the signal's `extra` so the read side knows which scout
+ authored the finding (the inbox renders it as "Scout · <name>")."""
+ extra = {**signal.extra, "skill_name": skill_name} if skill_name else signal.extra
+ metadata = _signal_metadata(report_id=report_id, source_id=signal.source_id, weight=signal.weight, extra=extra)
emit_embedding_request(
content=signal.description,
team_id=team_id,