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.

chore(replay-vision): drop the signals row from the observation card (#102669)

Tue Haulund04a086e555f1
diff --git a/products/replay_vision/frontend/observations/ObservationSignalReports.tsx b/products/replay_vision/frontend/observations/ObservationSignalReports.tsx
deleted file mode 100644
index 422e5f543e99..000000000000
--- a/products/replay_vision/frontend/observations/ObservationSignalReports.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { useValues } from 'kea'
-
-import { Link } from '@posthog/lemon-ui'
-
-import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'
-import { urls } from 'scenes/urls'
-
-import { displayConventionalCommitTitle } from 'products/signals/frontend/inbox/utils/reportPresentation'
-
-import { LabeledRow } from '../components/LabeledRow'
-import { observationSignalReportsLogic } from './observationSignalReportsLogic'
-
-// Mounted only when the observation emitted something, so a no-signal observation never queries.
-function ReportLinks({ observationId }: { observationId: string }): JSX.Element {
- const { signalReports, signalReportsLoading, signalReportsUnavailable } = useValues(
- observationSignalReportsLogic({ observationId })
- )
-
- if (signalReportsLoading) {
- return <LemonSkeleton className="h-4 w-40" />
- }
- if (signalReportsUnavailable) {
- return <span className="text-muted">Could not load linked reports</span>
- }
- if (!signalReports?.length) {
- // The lookup window is bounded, so an old observation can have a report this does not find.
- return <span className="text-muted">No linked report found</span>
- }
- return (
- <>
- {signalReports.map((report) => (
- <Link
- key={report.id}
- to={urls.inboxReport('reports', report.id)}
- data-attr="vision-observation-open-signal-report"
- >
- {displayConventionalCommitTitle(report.title, 'Untitled report')}
- </Link>
- ))}
- </>
- )
-}
-
-/** The signals this observation emitted, and the inbox reports they were grouped into. */
-export function ObservationSignalReports({
- observationId,
- signalsCount,
-}: {
- observationId: string
- signalsCount: number
-}): JSX.Element {
- return (
- <LabeledRow label="Signals">
- <div className="flex flex-col items-start gap-1">
- <span>Emitted ({signalsCount})</span>
- {signalsCount > 0 && <ReportLinks observationId={observationId} />}
- </div>
- </LabeledRow>
- )
-}
diff --git a/products/replay_vision/frontend/observations/ReplayObservation.tsx b/products/replay_vision/frontend/observations/ReplayObservation.tsx
index 01b865cebb11..1dba206ee8e8 100644
--- a/products/replay_vision/frontend/observations/ReplayObservation.tsx
+++ b/products/replay_vision/frontend/observations/ReplayObservation.tsx
@@ -70,7 +70,6 @@ import { ObservationLabelControl } from './ObservationLabelControl'
import { observationLabelLogic } from './observationLabelLogic'
import { ObservationPinnedProperties } from './ObservationPinnedProperties'
import { ObservationShareButton } from './ObservationShareButton'
-import { ObservationSignalReports } from './ObservationSignalReports'
import {
neighborFilterParams,
observationDetailUrl,
@@ -637,12 +636,6 @@ export function ReplayObservationSceneComponent(): JSX.Element {
<span>{scorerLabel}</span>
</LabeledRow>
)}
- {snapshot?.emits_signals && (
- <ObservationSignalReports
- observationId={observation.id}
- signalsCount={observation.scanner_result?.signals_count ?? 0}
- />
- )}
</div>
</LemonCard>
</div>
diff --git a/products/replay_vision/frontend/observations/observationSignalReportsLogic.ts b/products/replay_vision/frontend/observations/observationSignalReportsLogic.ts
deleted file mode 100644
index 4ec125446761..000000000000
--- a/products/replay_vision/frontend/observations/observationSignalReportsLogic.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { MakeLogicType, actions, afterMount, kea, key, path, props, reducers } from 'kea'
-import { loaders } from 'kea-loaders'
-import posthog from 'posthog-js'
-
-import { teamLogic } from 'scenes/teamLogic'
-
-import { visionObservationsSignalReportsList } from '../generated/api'
-import { ObservationSignalReportApi } from '../generated/api.schemas'
-
-export interface ObservationSignalReportsLogicProps {
- observationId: string
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface observationSignalReportsLogicValues {
- signalReports: ObservationSignalReportApi[] | null
- signalReportsLoading: boolean
- signalReportsUnavailable: boolean
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface observationSignalReportsLogicActions {
- loadSignalReports: () => any
- loadSignalReportsFailure: (
- error: string,
- errorObject?: any
- ) => {
- error: string
- errorObject?: any
- }
- loadSignalReportsSuccess: (
- signalReports: ObservationSignalReportApi[] | null,
- payload?: any
- ) => {
- signalReports: ObservationSignalReportApi[] | null
- payload?: any
- }
- setSignalReportsUnavailable: () => {
- value: true
- }
-}
-
-// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
-export interface observationSignalReportsLogicMeta {
- key: string
-}
-
-export type observationSignalReportsLogicType = MakeLogicType<
- observationSignalReportsLogicValues,
- observationSignalReportsLogicActions,
- ObservationSignalReportsLogicProps,
- observationSignalReportsLogicMeta
->
-
-/** Grouping runs after the scan finishes, so an empty list means "not grouped yet" as much as "never grouped". */
-export const observationSignalReportsLogic = kea<observationSignalReportsLogicType>([
- path(['products', 'replay_vision', 'frontend', 'observations', 'observationSignalReportsLogic']),
- props({} as ObservationSignalReportsLogicProps),
- key((props) => props.observationId),
-
- actions({
- setSignalReportsUnavailable: true,
- }),
-
- reducers({
- // A failed read must not read as "no reports": the caller may simply lack inbox access.
- signalReportsUnavailable: [
- false,
- {
- setSignalReportsUnavailable: () => true,
- loadSignalReports: () => false,
- },
- ],
- }),
-
- loaders(({ props, actions }) => ({
- signalReports: [
- null as ObservationSignalReportApi[] | null,
- {
- loadSignalReports: async () => {
- const teamId = teamLogic.values.currentTeamId
- if (!teamId) {
- return null
- }
- try {
- return await visionObservationsSignalReportsList(String(teamId), props.observationId)
- } catch (e) {
- // Supplementary context on an already-rendered page: fail quiet, don't toast over it.
- posthog.captureException(e)
- actions.setSignalReportsUnavailable()
- return null
- }
- },
- },
- ],
- })),
-
- afterMount(({ actions }) => {
- actions.loadSignalReports()
- }),
-])