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(replay-vision): list a highlight's similar sessions under its card (#123676)

Tue Haulundba821a604fec
diff --git a/frontend/src/initKea.ts b/frontend/src/initKea.ts
index 4c164ce10ef1..f46e86f5a4e2 100644
--- a/frontend/src/initKea.ts
+++ b/frontend/src/initKea.ts
@@ -115,6 +115,7 @@ const ERROR_FILTER_ALLOW_LIST_BY_LOGIC_PATH: Record<string, string> = {
loadFullReport: 'scenes.project-homepage.today.todayReportLogic',
loadPage: 'scenes.project-homepage.today.todayReportLogic',
loadReportDiff: 'scenes.inbox.logics.inboxReportDetailLogic',
+ loadMembers: 'products.replay_vision.frontend.replay_scanners.watchFeedGroupLogic', // The feed card shows its own retry
loadTraceSpans: 'products.tracing.frontend.components.TraceDialog.traceDialogLogic', // The dialog shows its own retry
loadPreview: 'products.metrics.frontend.components.metricVariableEditorLogic', // The variable editor shows the error under the preview
loadSiteProfiles: 'products.webAnalytics.contentAutopilot.contentAutopilotLogic',
diff --git a/products/replay_vision/backend/api/observations.py b/products/replay_vision/backend/api/observations.py
index 6c1d8084ffdb..f25424563ea5 100644
--- a/products/replay_vision/backend/api/observations.py
+++ b/products/replay_vision/backend/api/observations.py
@@ -8,9 +8,9 @@ from zoneinfo import ZoneInfo
from django.conf import settings
from django.db import transaction
-from django.db.models import Case, IntegerField, Q, QuerySet, Value, When
+from django.db.models import Case, CharField, IntegerField, Q, QuerySet, Subquery, Value, When
from django.db.models.fields.json import KeyTextTransform, KeyTransform
-from django.db.models.functions import Cast
+from django.db.models.functions import Cast, Coalesce
from django.http.response import HttpResponseBase
from django.utils.timezone import now
@@ -105,6 +105,7 @@ from products.replay_vision.backend.search_suggestions import (
from products.replay_vision.backend.temporal.constants import VISION_SIGNALS_SOURCE_PRODUCT, VISION_SIGNALS_SOURCE_TYPE
from products.replay_vision.backend.temporal.scanners.monitor import MonitorVerdict
from products.replay_vision.backend.temporal.types import ScannerResult, ScannerSnapshot
+from products.replay_vision.backend.watch_rank import ANCHOR_VERSION, ISSUE_CATEGORIES
from products.signals.backend.facade.api import get_reports_for_signal_source_slice
from products.tasks.backend.facade import api as tasks_facade
@@ -777,6 +778,13 @@ class ReplayObservationFilter(django_filters.FilterSet):
lookup_expr="icontains",
help_text="Filter to observations whose person email contains this value (case-insensitive).",
)
+ watch_group = django_filters.UUIDFilter(
+ method="_filter_watch_group",
+ help_text=(
+ "Only observations the watch feed groups with this observation as near duplicates, including itself. "
+ "Pair it with the feed's `date_from` to list the sessions a feed card counts."
+ ),
+ )
date_from = django_filters.CharFilter(
method="_filter_date_from",
help_text=(
@@ -892,6 +900,30 @@ class ReplayObservationFilter(django_filters.FilterSet):
q |= Q(scanner_result__model_output__tags_freeform__contains=[tag])
return queryset.filter(q)
+ def _filter_watch_group(
+ self, queryset: QuerySet[ReplayObservation], _name: str, value: uuid.UUID
+ ) -> QuerySet[ReplayObservation]:
+ if self._team is None:
+ return queryset.none()
+ root = Coalesce(
+ KeyTextTransform("duplicate_of", "watch_rank"), Cast("id", CharField()), output_field=CharField()
+ )
+ current = Q(
+ status=ObservationStatus.SUCCEEDED, watch_rank__isnull=False, watch_rank__anchor_version=ANCHOR_VERSION
+ )
+ # The asked row's root comes from a subquery, so the filter adds no statement of its own.
+ asked_root = Subquery(
+ ReplayObservation.objects.filter(current, id=value, team_id=self._team.id)
+ .annotate(_root=root)
+ .values("_root")[:1]
+ )
+ # Matches the rows the feed counts for a card, which leaves out routine rows.
+ return (
+ queryset.alias(_watch_group_root=root, _watch_category=KeyTextTransform("category", "watch_rank"))
+ .filter(current, _watch_category__in=ISSUE_CATEGORIES)
+ .filter(_watch_group_root=asked_root)
+ )
+
def _filter_variant(
self, queryset: QuerySet[ReplayObservation], _name: str, value: str
) -> QuerySet[ReplayObservation]:
diff --git a/products/replay_vision/backend/tests/test_api.py b/products/replay_vision/backend/tests/test_api.py
index c8c9a3a429a1..939a5c8a6d6e 100644
--- a/products/replay_vision/backend/tests/test_api.py
+++ b/products/replay_vision/backend/tests/test_api.py
@@ -2239,6 +2239,58 @@ class TestReplayObservationViewSet(_VisionAPITestCase):
self.assertEqual(resp.status_code, 200)
self.assertEqual({r["session_id"] for r in resp.json()["results"]}, expected)
+ @parameterized.expand(
+ [
+ ("asked_by_the_root", "root"),
+ ("asked_by_a_copy", "copy"),
+ ("unknown_id", None),
+ ("another_teams_row", "other_team"),
+ ]
+ )
+ def test_filter_by_watch_group(self, _name: str, asked: str | None) -> None:
+ rows = {
+ name: self._create_observation(
+ session_id=name, status=ObservationStatus.SUCCEEDED, completed_at=timezone.now()
+ )
+ for name in ("root", "copy", "routine", "stale", "other")
+ }
+ root_id = str(rows["root"].id)
+
+ def rank(
+ duplicate_of: str | None, category: str = "failure", anchor_version: int = ANCHOR_VERSION
+ ) -> dict[str, Any]:
+ return {
+ "category": category,
+ "contrast": 0.3,
+ "duplicate_of": duplicate_of,
+ "anchor_version": anchor_version,
+ }
+
+ for name, watch_rank in {
+ "root": rank(None),
+ "copy": rank(root_id),
+ "routine": rank(root_id, category="routine"),
+ "stale": rank(root_id, anchor_version=ANCHOR_VERSION - 1),
+ "other": rank(None),
+ }.items():
+ ReplayObservation.objects.filter(id=rows[name].id).update(watch_rank=watch_rank)
+
+ other_team = Team.objects.create(organization=self.organization, name="other")
+ other_row = ReplayObservation.objects.create(
+ team=other_team,
+ scanner=self._create_scanner(team=other_team),
+ session_id="other-team",
+ status=ObservationStatus.SUCCEEDED,
+ completed_at=timezone.now(),
+ watch_rank=rank(root_id),
+ )
+ member = {"other_team": str(other_row.id), None: str(uuid.uuid4())}.get(asked) or str(rows[str(asked)].id)
+ resp = self.client.get(f"{self.observations_url(str(self.scanner.id))}?watch_group={member}")
+
+ self.assertEqual(resp.status_code, 200)
+ expected = {"root", "copy"} if asked in ("root", "copy") else set()
+ self.assertEqual({r["session_id"] for r in resp.json()["results"]}, expected)
+
def test_order_by_created_at_descending(self) -> None:
first = self._create_observation(session_id="first")
second = self._create_observation(session_id="second")
diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.ts
index 5ac6324c7280..0f48c280b042 100644
--- a/products/replay_vision/frontend/generated/api.schemas.ts
+++ b/products/replay_vision/frontend/generated/api.schemas.ts
@@ -3277,6 +3277,10 @@ export type VisionObservationsRetrieveParams = {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string
}
export type VisionObservationsThumbnailRetrieveParams = {
@@ -3520,6 +3524,10 @@ export type VisionScannersObservationsListParams = {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string
}
export type VisionScannersObservationsRetrieveParams = {
@@ -3579,6 +3587,10 @@ export type VisionScannersObservationsRetrieveParams = {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string
}
export type VisionScannersObservationsSignalReportsListParams = {
@@ -3638,6 +3650,10 @@ export type VisionScannersObservationsSignalReportsListParams = {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string
}
export type VisionScannersObservationsThumbnailRetrieveParams = {
@@ -3721,6 +3737,10 @@ export type VisionScannersObservationsStatsRetrieveParams = {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string
}
export type VisionScannersWatchFeedRetrieveParams = {
diff --git a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
index 696f820856e0..3abde05469ab 100644
--- a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
+++ b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
@@ -5,6 +5,7 @@ import { waitFor, within } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { FEATURE_FLAGS } from 'lib/constants'
+import { dayjs } from 'lib/dayjs'
import { App } from 'scenes/App'
import recordingEventsJson from 'scenes/session-recordings/__mocks__/recording_events_query'
import { recordingMetaJson } from 'scenes/session-recordings/__mocks__/recording_meta'
@@ -1230,11 +1231,70 @@ export const HomeWatchFeedJevArm: StoryObj = {
],
}
-// The embedding ranker arm: each pick names its category, and the first stands for three similar sessions.
+// The other sessions in the first embedding card's duplicate group, as the scanner's observation list returns them.
+const checkoutGroupMembers = [
+ {
+ email: '[email protected]',
+ reasoning: 'The card form rejected a valid card twice, then the user switched cards.',
+ hoursAgo: 2,
+ keyMomentMs: 98000,
+ },
+ {
+ email: '[email protected]',
+ reasoning: 'A valid card failed with a generic error before the user gave up.',
+ hoursAgo: 5,
+ keyMomentMs: 212000,
+ },
+ {
+ email: '[email protected]',
+ reasoning: 'The card form cleared itself after a failed charge and the user retyped it.',
+ hoursAgo: 9,
+ keyMomentMs: 41000,
+ },
+ {
+ email: '[email protected]',
+ reasoning: 'The payment step rejected the card and the user left checkout.',
+ hoursAgo: 26,
+ keyMomentMs: 305000,
+ },
+ {
+ email: '[email protected]',
+ reasoning: 'The user retried a declined card three times in a row.',
+ hoursAgo: 50,
+ keyMomentMs: null,
+ },
+].map(({ email, reasoning, hoursAgo, keyMomentMs }, index) =>
+ observation({
+ id: `00000000-0000-0000-0000-0000000000c${index}`,
+ scanner_id: scanners.results[0].id,
+ recording_subject_email: email,
+ created_at: dayjs('2026-05-11T09:00:00Z').subtract(hoursAgo, 'hour').toISOString(),
+ scanner_snapshot: { ...observation().scanner_snapshot!, name: 'Confused checkout', scanner_type: 'monitor' },
+ scanner_result: {
+ model_output: {
+ scanner_type: 'monitor',
+ verdict: 'yes',
+ confidence: 0.9,
+ reasoning,
+ ...(keyMomentMs !== null ? { key_moment_ms: keyMomentMs } : {}),
+ },
+ signals_count: 0,
+ },
+ })
+)
+
+// The embedding ranker arm: each pick names its category, and the first stands for seven similar sessions.
export const HomeWatchFeedEmbeddingArm: StoryObj = {
decorators: [
mswDecorator({
get: {
+ '/api/projects/:team_id/vision/scanners/:id/observations/': {
+ // The group holds seven other sessions, so the preview of five ends with a link to the rest.
+ count: 7,
+ next: null,
+ previous: null,
+ results: checkoutGroupMembers,
+ },
'/api/projects/:team_id/vision/scanners/watch_feed/': {
ranker: 'embedding',
has_more: false,
@@ -1269,8 +1329,8 @@ export const HomeWatchFeedEmbeddingArm: StoryObj = {
reason: {
kind: 'embedding_pick',
watch_category: 'failure',
- similar_count: 3,
- affected_people: 3,
+ similar_count: 7,
+ affected_people: 6,
},
},
{
diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerObservationsTable.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerObservationsTable.tsx
index b3c42e19e618..14094a401c4b 100644
--- a/products/replay_vision/frontend/replay_scanners/components/ScannerObservationsTable.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerObservationsTable.tsx
@@ -118,6 +118,7 @@ export function ScannerObservationsTable({ scannerId }: { scannerId: string }):
observationDateTo,
observationBackfillFilter,
observationVariantFilter,
+ observationWatchGroupFilter,
experimentContext,
hasActiveObservationFilters,
observationDetailLinkParams,
@@ -143,6 +144,7 @@ export function ScannerObservationsTable({ scannerId }: { scannerId: string }):
setObservationDateRange,
setObservationBackfillFilter,
setObservationVariantFilter,
+ setObservationWatchGroupFilter,
clearObservationFilters,
copyAllObservations,
} = useActions(logic)
@@ -426,6 +428,21 @@ export function ScannerObservationsTable({ scannerId }: { scannerId: string }):
Backfill {shortBackfillId(observationBackfillFilter)}
</LemonButton>
)}
+ {observationWatchGroupFilter && (
+ <LemonButton
+ type="secondary"
+ size="small"
+ tooltip="Sessions the Highlights feed groups as near duplicates"
+ sideAction={{
+ icon: <IconX />,
+ onClick: () => setObservationWatchGroupFilter(null),
+ tooltip: 'Clear similar sessions filter',
+ }}
+ data-attr="vision-observations-watch-group-chip"
+ >
+ Similar sessions
+ </LemonButton>
+ )}
{scannerType === 'experiment' ? (
<LemonSelect
size="small"
diff --git a/products/replay_vision/frontend/replay_scanners/components/WatchFeedCard.tsx b/products/replay_vision/frontend/replay_scanners/components/WatchFeedCard.tsx
index 9c00923af0ec..0f0bee1f53d8 100644
--- a/products/replay_vision/frontend/replay_scanners/components/WatchFeedCard.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/WatchFeedCard.tsx
@@ -28,6 +28,7 @@ import { SCANNER_TYPE_TAG_TYPE, ScannerType } from '../types'
import { watchFeedLogic } from '../watchFeedLogic'
import { CARD_SEEN_DWELL_MS, cardProperties } from '../watchFeedTelemetry'
import { WatchFeedDismissButton } from './WatchFeedDismissButton'
+import { WatchFeedGroupList, WatchFeedGroupToggle } from './WatchFeedGroup'
/** Reason kinds that say nothing about the session. The backend returns these only to pad a near-empty
* feed, so a feed made up entirely of them means the window turned up no findings at all. */
@@ -179,6 +180,14 @@ export function watchStartSeconds(keyMomentMs: number | null): number {
return keyMomentMs === null ? 0 : Math.max(0, Math.floor(keyMomentMs / 1000) - KEY_MOMENT_LEAD_IN_S)
}
+/** The observation page. `t` is always set, so the player opens expanded, and `from` makes the back button return to the feed. */
+export function watchFeedObservationUrl(observation: ReplayObservationApi): string {
+ return combineUrl(urls.replayVisionObservation(observation.id), {
+ t: watchStartSeconds(observationKeyMomentMs(observation)),
+ [OBSERVATION_ORIGIN_PARAM]: WATCH_FEED_ORIGIN,
+ }).url
+}
+
/**
* The card's bold headline, plus the prose that follows it. A summarizer authored a title, so its
* summary rides along whole (with citation chips). Otherwise the first sentence of the prose the
@@ -376,7 +385,7 @@ export function watchFeedRowTitle(observation: ReplayObservationApi, reason: Wat
*/
export function WatchFeedRow({ item, position }: WatchFeedRowProps): JSX.Element {
const { observation, reason } = item
- const { feedLoad } = useValues(watchFeedLogic)
+ const { feedLoad, dateFrom } = useValues(watchFeedLogic)
const { cardSeen, dismissItem } = useActions(watchFeedLogic)
const rowRef = useAutoMarkRead(true, () => cardSeen(item, position), CARD_SEEN_DWELL_MS)
const result = readResult(observation)
@@ -387,14 +396,17 @@ export function WatchFeedRow({ item, position }: WatchFeedRowProps): JSX.Element
const scannerName = scannerLabel(observation)
const person = observation.recording_subject_email || observation.distinct_id
const keyMomentMs = observationKeyMomentMs(observation)
- // `t` is always set, so the observation page opens with the player expanded. `from` marks the feed as
- // the origin, so the observation's back button returns here rather than the scanner.
- const observationUrl = combineUrl(urls.replayVisionObservation(observation.id), {
- t: watchStartSeconds(keyMomentMs),
- [OBSERVATION_ORIGIN_PARAM]: WATCH_FEED_ORIGIN,
- }).url
+ const observationUrl = watchFeedObservationUrl(observation)
const title = watchFeedRowTitle(observation, reason)
const filler = FILLER_REASON_KINDS.has(reason.kind)
+ const similarCount = reason.kind === 'embedding_pick' ? (reason.similar_count ?? 0) : 0
+ const groupProps = {
+ observationId: observation.id,
+ scannerId: observation.scanner_id,
+ dateFrom,
+ similarCount,
+ cardContext: cardProperties(feedLoad, item, position, 'feed_tab'),
+ }
const captureOpened = (): void => {
posthog.capture('replay_vision_watch_clip_clicked', {
...cardProperties(feedLoad, item, position, 'feed_tab'),
@@ -469,7 +481,9 @@ export function WatchFeedRow({ item, position }: WatchFeedRowProps): JSX.Element
? `Watch from ${colonDelimitedDuration(Math.floor(keyMomentMs / 1000), null)}`
: 'Watch session'}
</LemonButton>
+ {similarCount > 0 && <WatchFeedGroupToggle {...groupProps} />}
</footer>
+ {similarCount > 0 && <WatchFeedGroupList {...groupProps} />}
</article>
)
}
diff --git a/products/replay_vision/frontend/replay_scanners/components/WatchFeedGroup.tsx b/products/replay_vision/frontend/replay_scanners/components/WatchFeedGroup.tsx
new file mode 100644
index 000000000000..bba80f95f440
--- /dev/null
+++ b/products/replay_vision/frontend/replay_scanners/components/WatchFeedGroup.tsx
@@ -0,0 +1,172 @@
+import { useActions, useValues } from 'kea'
+import { combineUrl } from 'kea-router'
+
+import { IconChevronDown, IconPlayFilled } from '@posthog/icons'
+import { LemonButton, LemonSkeleton, Link } from '@posthog/lemon-ui'
+
+import { TZLabel } from 'lib/components/TZLabel'
+import posthog from 'lib/posthog-typed'
+import { colonDelimitedDuration } from 'lib/utils/durations'
+import { urls } from 'scenes/urls'
+
+import { ObservationThumbnail } from '../../components/ObservationThumbnail'
+import { type ReplayObservationApi, VisionObservationsThumbnailRetrieveSize } from '../../generated/api.schemas'
+import { scannerLabel } from '../../utils/observation'
+import { ReplayScannerTab } from '../replayScannerSceneLogic'
+import { type WatchFeedGroupLogicProps, watchFeedGroupLogic } from '../watchFeedGroupLogic'
+import { observationKeyMomentMs, watchCardHeadline, watchFeedObservationUrl } from './WatchFeedCard'
+
+/** The card's telemetry properties, so group events join the card they came from. */
+type CardContext = Record<string, unknown>
+
+type WatchFeedGroupProps = WatchFeedGroupLogicProps & { similarCount: number; cardContext: CardContext }
+
+function WatchFeedGroupMember({
+ observation,
+ cardContext,
+}: {
+ observation: ReplayObservationApi
+ cardContext: CardContext
+}): JSX.Element {
+ const keyMomentMs = observationKeyMomentMs(observation)
+ const url = watchFeedObservationUrl(observation)
+ const captureOpened = (target: string) => (): void => {
+ posthog.capture('replay_vision_watch_group_member_opened', {
+ ...cardContext,
+ target,
+ member_observation_id: observation.id,
+ })
+ }
+ const person = observation.recording_subject_email || observation.distinct_id
+ const title = watchCardHeadline(observation)?.title ?? scannerLabel(observation)
+ return (
+ <li className="flex min-w-0 items-center gap-3" data-attr="vision-watch-feed-group-member">
+ <Link
+ to={url}
+ className="w-24 shrink-0 overflow-hidden rounded border border-primary"
+ onClick={captureOpened('thumbnail')}
+ >
+ <ObservationThumbnail
+ observation={observation}
+ size={VisionObservationsThumbnailRetrieveSize.Small}
+ className="rounded-none border-0"
+ />
+ </Link>
+ <div className="flex min-w-0 flex-1 flex-col gap-0.5">
+ <Link
+ to={url}
+ className="truncate text-sm font-medium text-default"
+ title={title}
+ onClick={captureOpened('title')}
+ >
+ {title}
+ </Link>
+ <div className="flex min-w-0 items-center gap-1 text-xs text-muted">
+ {person && <span className="truncate">{person}</span>}
+ {person && <span aria-hidden>·</span>}
+ <TZLabel time={observation.created_at} className="shrink-0" />
+ </div>
+ </div>
+ <LemonButton
+ size="xsmall"
+ type="secondary"
+ icon={<IconPlayFilled />}
+ to={url}
+ tooltip="Watch session"
+ onClick={captureOpened('watch')}
+ >
+ {keyMomentMs !== null ? colonDelimitedDuration(Math.floor(keyMomentMs / 1000), null) : null}
+ </LemonButton>
+ </li>
+ )
+}
+
+/** Opens the other sessions in a card's duplicate group under the card, so a reader can see who else hit it. */
+export function WatchFeedGroupToggle({ similarCount, cardContext, ...logicProps }: WatchFeedGroupProps): JSX.Element {
+ const { expanded } = useValues(watchFeedGroupLogic(logicProps))
+ const { toggleExpanded } = useActions(watchFeedGroupLogic(logicProps))
+ return (
+ <LemonButton
+ size="small"
+ type="tertiary"
+ sideIcon={
+ <IconChevronDown className={expanded ? 'rotate-180 transition-transform' : 'transition-transform'} />
+ }
+ onClick={() => {
+ if (!expanded) {
+ posthog.capture('replay_vision_watch_group_expanded', {
+ ...cardContext,
+ similar_count: similarCount,
+ })
+ }
+ toggleExpanded()
+ }}
+ aria-expanded={expanded}
+ className="relative z-10 ml-auto"
+ data-attr="vision-watch-feed-group-toggle"
+ >
+ {similarCount === 1 ? '1 similar session' : `${similarCount} similar sessions`}
+ </LemonButton>
+ )
+}
+
+export function WatchFeedGroupList({
+ similarCount,
+ cardContext,
+ ...logicProps
+}: WatchFeedGroupProps): JSX.Element | null {
+ const { expanded, members, membersLoading } = useValues(watchFeedGroupLogic(logicProps))
+ const { loadMembers } = useActions(watchFeedGroupLogic(logicProps))
+ if (!expanded) {
+ return null
+ }
+ return (
+ // Sits above the card's full-size link, so a click here never opens the card's own session.
+ <div className="relative z-10 flex flex-col gap-3 border-t pt-3" data-attr="vision-watch-feed-group">
+ {membersLoading ? (
+ <div className="flex flex-col gap-3" aria-busy>
+ {Array.from({ length: Math.min(similarCount, 3) }, (_, i) => (
+ <LemonSkeleton key={i} className="h-14 rounded" />
+ ))}
+ </div>
+ ) : members === null ? (
+ <div className="flex items-center gap-2 text-sm text-secondary">
+ <span>Couldn't load the similar sessions.</span>
+ <LemonButton size="xsmall" type="secondary" onClick={() => loadMembers()}>
+ Try again
+ </LemonButton>
+ </div>
+ ) : members.shown.length === 0 ? (
+ <p className="m-0 text-sm text-secondary">No similar sessions to show right now.</p>
+ ) : (
+ <ul className="m-0 flex list-none flex-col gap-3 p-0">
+ {members.shown.map((member) => (
+ <WatchFeedGroupMember key={member.id} observation={member} cardContext={cardContext} />
+ ))}
+ </ul>
+ )}
+ {/* The list's own total decides, since dismissed or re-ranked sessions can make it differ from the card's count. */}
+ {members && members.total > members.shown.length && (
+ <Link
+ to={
+ combineUrl(urls.replayVision(logicProps.scannerId), {
+ tab: ReplayScannerTab.Observations,
+ watch_group: logicProps.observationId,
+ date_from: logicProps.dateFrom,
+ }).url
+ }
+ className="self-start text-sm"
+ data-attr="vision-watch-feed-group-see-all"
+ onClick={() =>
+ posthog.capture('replay_vision_watch_group_see_all_clicked', {
+ ...cardContext,
+ similar_count: similarCount,
+ })
+ }
+ >
+ See all similar sessions
+ </Link>
+ )}
+ </div>
+ )
+}
diff --git a/products/replay_vision/frontend/replay_scanners/replayScannerLogic.test.ts b/products/replay_vision/frontend/replay_scanners/replayScannerLogic.test.ts
index 21a170e10b46..48cdcc4f27e0 100644
--- a/products/replay_vision/frontend/replay_scanners/replayScannerLogic.test.ts
+++ b/products/replay_vision/frontend/replay_scanners/replayScannerLogic.test.ts
@@ -1332,6 +1332,7 @@ describe('replayScannerLogic', () => {
observationDateTo: null as string | null,
observationBackfillFilter: null as string | null,
observationVariantFilter: null as string | null,
+ observationWatchGroupFilter: null as string | null,
observationsSort: null,
scanner: null,
}
diff --git a/products/replay_vision/frontend/replay_scanners/replayScannerLogic.ts b/products/replay_vision/frontend/replay_scanners/replayScannerLogic.ts
index a313ce18918b..791fa160f4af 100644
--- a/products/replay_vision/frontend/replay_scanners/replayScannerLogic.ts
+++ b/products/replay_vision/frontend/replay_scanners/replayScannerLogic.ts
@@ -272,6 +272,7 @@ interface ObservationListParams {
triggered_by?: string
backfill_id?: string
variant?: string
+ watch_group?: string
verdict?: string
tags?: string
min_score?: number
@@ -315,6 +316,7 @@ interface ObservationFilterValues {
observationDateTo: string | null
observationBackfillFilter: string | null
observationVariantFilter: string | null
+ observationWatchGroupFilter: string | null
}
type ObservationFilterParamKeys =
@@ -329,6 +331,7 @@ type ObservationFilterParamKeys =
| 'date_to'
| 'backfill_id'
| 'variant'
+ | 'watch_group'
/** The filter (non-pagination, non-sort) params shared by the list/stats endpoints and the URL query string. */
function observationFilterParams(
@@ -368,6 +371,9 @@ function observationFilterParams(
if (values.observationVariantFilter) {
params.variant = values.observationVariantFilter
}
+ if (values.observationWatchGroupFilter) {
+ params.watch_group = values.observationWatchGroupFilter
+ }
return params
}
@@ -546,6 +552,7 @@ export interface replayScannerLogicValues {
observationTriggeredByFilter: ObservationTriggeredByValue[]
observationVariantFilter: string | null
observationVerdictFilter: ObservationVerdictValue[]
+ observationWatchGroupFilter: string | null
observations: ReplayObservationApi[]
observationsActive: boolean
observationsLoading: boolean
@@ -690,6 +697,7 @@ export interface replayScannerLogicActions {
triggeredBy: ObservationTriggeredByValue[]
variant: string | null
verdict: ObservationVerdictValue[]
+ watchGroup: string | null
}) => {
backfillId: string | null
dateFrom: string | null
@@ -704,6 +712,7 @@ export interface replayScannerLogicActions {
triggeredBy: ObservationTriggerEnumApi[]
variant: string | null
verdict: ObservationVerdictValue[]
+ watchGroup: string | null
}
retryObservation: (observationId: string) => {
observationId: string
@@ -814,6 +823,9 @@ export interface replayScannerLogicActions {
setObservationVerdictFilter: (values: ObservationVerdictValue[]) => {
values: ObservationVerdictValue[]
}
+ setObservationWatchGroupFilter: (value: string | null) => {
+ value: string | null
+ }
setObservationsActive: (active: boolean) => {
active: boolean
}
@@ -945,7 +957,8 @@ export interface replayScannerLogicMeta {
observationDateFrom: string | null,
observationDateTo: string | null,
observationBackfillFilter: string | null,
- observationVariantFilter: string | null
+ observationVariantFilter: string | null,
+ observationWatchGroupFilter: string | null
) => boolean
observationDetailLinkParams: (
observationsPage: number,
@@ -960,6 +973,7 @@ export interface replayScannerLogicMeta {
observationDateTo: string | null,
observationBackfillFilter: string | null,
observationVariantFilter: string | null,
+ observationWatchGroupFilter: string | null,
observationsSort: ObservationsSorting | null,
scanner: ScannerFormValues
) => Record<string, number | string>
@@ -1046,6 +1060,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
setObservationDateRange: (dateFrom: string | null, dateTo: string | null) => ({ dateFrom, dateTo }),
setObservationBackfillFilter: (value: string | null) => ({ value }),
setObservationVariantFilter: (value: string | null) => ({ value }),
+ setObservationWatchGroupFilter: (value: string | null) => ({ value }),
clearObservationFilters: true,
restoreObservationsTableState: (state: {
page: number
@@ -1061,6 +1076,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
dateTo: string | null
backfillId: string | null
variant: string | null
+ watchGroup: string | null
}) => state,
setChartDateRange: (dateFrom: string | null, dateTo: string | null) => ({ dateFrom, dateTo }),
requestScannerEstimate: true,
@@ -1624,6 +1640,14 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
restoreObservationsTableState: (_, { variant }) => variant,
},
],
+ observationWatchGroupFilter: [
+ null as string | null,
+ {
+ setObservationWatchGroupFilter: (_, { value }) => value,
+ clearObservationFilters: () => null,
+ restoreObservationsTableState: (_, { watchGroup }) => watchGroup,
+ },
+ ],
chartDateFrom: ['-14d' as string | null, { setChartDateRange: (_, { dateFrom }) => dateFrom }],
chartDateTo: [null as string | null, { setChartDateRange: (_, { dateTo }) => dateTo }],
}),
@@ -1694,6 +1718,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
s.observationDateTo,
s.observationBackfillFilter,
s.observationVariantFilter,
+ s.observationWatchGroupFilter,
],
(
statusFilter: ObservationStatusValue[],
@@ -1706,7 +1731,8 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
dateFrom: string | null,
dateTo: string | null,
backfillFilter: string | null,
- variantFilter: string | null
+ variantFilter: string | null,
+ watchGroupFilter: string | null
): boolean =>
statusFilter.length > 0 ||
triggeredByFilter.length > 0 ||
@@ -1718,7 +1744,8 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
dateFrom !== null ||
dateTo !== null ||
backfillFilter !== null ||
- variantFilter !== null,
+ variantFilter !== null ||
+ watchGroupFilter !== null,
],
// Carried into observation detail links so server-computed prev/next neighbors honor the table's
// filters + sort, and so the observation page can send the reader back to this exact view.
@@ -1736,6 +1763,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
s.observationDateTo,
s.observationBackfillFilter,
s.observationVariantFilter,
+ s.observationWatchGroupFilter,
s.observationsSort,
s.scanner,
],
@@ -1752,6 +1780,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
observationDateTo: string | null,
observationBackfillFilter: string | null,
observationVariantFilter: string | null,
+ observationWatchGroupFilter: string | null,
observationsSort: ObservationsSorting | null,
scanner: ReplayScanner | null
): Record<string, string | number> => {
@@ -1767,6 +1796,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
observationDateTo,
observationBackfillFilter,
observationVariantFilter,
+ observationWatchGroupFilter,
observationsSort,
observationsPage,
scanner,
@@ -2645,6 +2675,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
},
setObservationBackfillFilter: () => reloadObservationsAndStats(),
setObservationVariantFilter: () => reloadObservationsAndStats(),
+ setObservationWatchGroupFilter: () => reloadObservationsAndStats(),
setObservationDateRange: () => reloadObservationsAndStats(),
setObservationSubjectFilter: async (_, breakpoint) => {
// Free-text search — debounce so typing doesn't fire a request per keystroke.
@@ -2725,6 +2756,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
setObservationDateRange: writeUrl,
setObservationBackfillFilter: writeUrl,
setObservationVariantFilter: writeUrl,
+ setObservationWatchGroupFilter: writeUrl,
setObservationSubjectFilter: writeUrlReplace,
clearObservationFilters: writeUrl,
}
@@ -2761,6 +2793,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
const variantRaw = searchParams.variant
const variant =
typeof variantRaw === 'string' || typeof variantRaw === 'number' ? String(variantRaw) || null : null
+ const watchGroup = typeof searchParams.watch_group === 'string' ? searchParams.watch_group : null
const sameAsCurrent =
page === values.observationsPage &&
sort.columnKey === values.observationsSort?.columnKey &&
@@ -2775,7 +2808,8 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
dateFrom === values.observationDateFrom &&
dateTo === values.observationDateTo &&
backfillId === values.observationBackfillFilter &&
- variant === values.observationVariantFilter
+ variant === values.observationVariantFilter &&
+ watchGroup === values.observationWatchGroupFilter
if (!sameAsCurrent) {
actions.restoreObservationsTableState({
page,
@@ -2791,6 +2825,7 @@ export const replayScannerLogic = kea<replayScannerLogicType>([
dateTo,
backfillId,
variant,
+ watchGroup,
})
}
},
diff --git a/products/replay_vision/frontend/replay_scanners/types.ts b/products/replay_vision/frontend/replay_scanners/types.ts
index ed0d04882740..7ee0b80b918e 100644
--- a/products/replay_vision/frontend/replay_scanners/types.ts
+++ b/products/replay_vision/frontend/replay_scanners/types.ts
@@ -45,6 +45,7 @@ export const OBSERVATION_LIST_FILTER_KEYS: readonly (keyof VisionObservationsRet
'session_id',
'recording_subject',
'labeled',
+ 'watch_group',
'order_by',
]
@@ -67,6 +68,7 @@ export const OBSERVATION_LIST_URL_PARAM_KEYS = [
'date_to',
'backfill_id',
'variant',
+ 'watch_group',
] as const
export type ObservationsUrlParams = Partial<Record<(typeof OBSERVATION_LIST_URL_PARAM_KEYS)[number], string>>
diff --git a/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.test.ts b/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.test.ts
new file mode 100644
index 000000000000..5aa5d4ff3966
--- /dev/null
+++ b/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.test.ts
@@ -0,0 +1,33 @@
+import { expectLogic } from 'kea-test-utils'
+
+import { useMocks } from '~/mocks/jest'
+import { initKeaTests } from '~/test/init'
+
+import { watchFeedGroupLogic } from './watchFeedGroupLogic'
+
+describe('watchFeedGroupLogic', () => {
+ let listSpy: jest.Mock
+
+ beforeEach(() => {
+ listSpy = jest.fn(() => [200, { count: 9, results: [{ id: 'card' }, { id: 'copy-1' }, { id: 'copy-2' }] }])
+ useMocks({ get: { '/api/projects/:team/vision/scanners/:scanner/observations/': listSpy } })
+ initKeaTests()
+ })
+
+ it('loads the group once on first expand, without the card it hangs under', async () => {
+ const logic = watchFeedGroupLogic({ observationId: 'card', scannerId: 'scanner-a', dateFrom: '-30d' })
+ logic.mount()
+ expect(listSpy).not.toHaveBeenCalled()
+
+ await expectLogic(logic, () => logic.actions.toggleExpanded()).toFinishAllListeners()
+ const params = new URL(listSpy.mock.calls[0][0].request.url).searchParams
+ expect([params.get('watch_group'), params.get('date_from')]).toEqual(['card', '-30d'])
+ expect(logic.values.members?.shown.map((member) => member.id)).toEqual(['copy-1', 'copy-2'])
+ expect(logic.values.members?.total).toBe(8)
+
+ logic.actions.toggleExpanded()
+ await expectLogic(logic, () => logic.actions.toggleExpanded()).toFinishAllListeners()
+ expect(listSpy).toHaveBeenCalledTimes(1)
+ logic.unmount()
+ })
+})
diff --git a/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.ts b/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.ts
new file mode 100644
index 000000000000..690f6aaec352
--- /dev/null
+++ b/products/replay_vision/frontend/replay_scanners/watchFeedGroupLogic.ts
@@ -0,0 +1,105 @@
+import { MakeLogicType, actions, connect, kea, key, listeners, path, props, reducers } from 'kea'
+import { loaders } from 'kea-loaders'
+
+import { teamLogic } from 'scenes/teamLogic'
+
+import { visionScannersObservationsList } from '../generated/api'
+import type { ReplayObservationApi } from '../generated/api.schemas'
+
+export interface WatchFeedGroupLogicProps {
+ /** The card's observation. The backend resolves its duplicate group from it. */
+ observationId: string
+ scannerId: string
+ dateFrom: string
+}
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface watchFeedGroupLogicValues {
+ currentTeamId: number | null // teamLogic
+ expanded: boolean
+ members: WatchGroupMembers | null
+ membersLoading: boolean
+}
+
+// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
+export interface watchFeedGroupLogicActions {
+ toggleExpanded: () => { value: true }
+ loadMembers: (_: void) => void
+ loadMembersFailure: (
+ error: string,
+ errorObject?: any
+ ) => {
+ error: string
+ errorObject?: any
+ }
+ loadMembersSuccess: (
+ members: WatchGroupMembers | null,
+ payload?: any
+ ) => {
+ members: WatchGroupMembers | null
+ payload?: any
+ }
+}
+
+export interface WatchGroupMembers {
+ /** The first few of the group's other sessions. */
+ shown: ReplayObservationApi[]
+ /** How many other sessions the list endpoint matched, which can exceed what the card counted. */
+ total: number
+}
+
+export type watchFeedGroupLogicType = MakeLogicType<
+ watchFeedGroupLogicValues,
+ watchFeedGroupLogicActions,
+ WatchFeedGroupLogicProps
+>
+
+/** How many of the group's other sessions the card lists before it links to the full list. */
+export const WATCH_GROUP_PREVIEW_SIZE = 5
+
+/** The other sessions in a feed card's duplicate group, loaded the first time the card expands. */
+export const watchFeedGroupLogic = kea<watchFeedGroupLogicType>([
+ path((key) => ['products', 'replay_vision', 'frontend', 'replay_scanners', 'watchFeedGroupLogic', key]),
+ props({} as WatchFeedGroupLogicProps),
+ // The window is part of the key, so a range change lists that range's sessions rather than the cached ones.
+ key((props) => `${props.observationId}:${props.dateFrom}`),
+ connect(() => ({
+ values: [teamLogic, ['currentTeamId']],
+ })),
+ actions({
+ toggleExpanded: true,
+ }),
+ reducers({
+ expanded: [false, { toggleExpanded: (expanded) => !expanded }],
+ }),
+ loaders(({ props, values }) => ({
+ members: [
+ null as WatchGroupMembers | null,
+ {
+ loadMembers: async (): Promise<WatchGroupMembers | null> => {
+ if (!values.currentTeamId) {
+ return null
+ }
+ const page = await visionScannersObservationsList(String(values.currentTeamId), props.scannerId, {
+ watch_group: props.observationId,
+ date_from: props.dateFrom,
+ limit: WATCH_GROUP_PREVIEW_SIZE + 1,
+ })
+ // The card's own session already sits above the list.
+ const others = page.results.filter((member) => member.id !== props.observationId)
+ return {
+ shown: others.slice(0, WATCH_GROUP_PREVIEW_SIZE),
+ total: page.count - (page.results.length - others.length),
+ }
+ },
+ },
+ ],
+ })),
+ listeners(({ actions, values }) => ({
+ toggleExpanded: () => {
+ if (values.expanded && values.members === null && !values.membersLoading) {
+ actions.loadMembers()
+ }
+ },
+ })),
+])
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 84b24649db3d..cbc47609afd5 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -140194,6 +140194,10 @@ export namespace Schemas {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string;
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string;
};
export type VisionObservationsThumbnailRetrieveParams = {
@@ -140436,6 +140440,10 @@ export namespace Schemas {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string;
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string;
};
export type VisionScannersObservationsRetrieveParams = {
@@ -140495,6 +140503,10 @@ export namespace Schemas {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string;
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string;
};
export type VisionScannersObservationsSignalReportsListParams = {
@@ -140554,6 +140566,10 @@ export namespace Schemas {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string;
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string;
};
export type VisionScannersObservationsThumbnailRetrieveParams = {
@@ -140637,6 +140653,10 @@ export namespace Schemas {
* Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).
*/
verdict?: string;
+ /**
+ * Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.
+ */
+ watch_group?: string;
};
export type VisionScannersWatchFeedRetrieveParams = {
diff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.ts
index ac4b73545c52..bddfb7b97f44 100644
--- a/services/mcp/src/generated/replay_vision/api.ts
+++ b/services/mcp/src/generated/replay_vision/api.ts
@@ -513,6 +513,12 @@ export const VisionObservationsRetrieveQueryParams = () => zod.object({
.string()
.optional()
.describe('Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).'),
+ watch_group: zod
+ .string()
+ .optional()
+ .describe(
+ "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts."
+ ),
})
/**
@@ -1583,6 +1589,12 @@ export const VisionScannersObservationsListQueryParams = () => zod.object({
.string()
.optional()
.describe('Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).'),
+ watch_group: zod
+ .string()
+ .optional()
+ .describe(
+ "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts."
+ ),
})
/**
@@ -1667,6 +1679,12 @@ export const VisionScannersObservationsRetrieveQueryParams = () => zod.object({
.string()
.optional()
.describe('Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).'),
+ watch_group: zod
+ .string()
+ .optional()
+ .describe(
+ "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts."
+ ),
})
/**
@@ -1750,6 +1768,12 @@ export const VisionScannersObservationsStatsRetrieveQueryParams = () => zod.obje
.string()
.optional()
.describe('Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).'),
+ watch_group: zod
+ .string()
+ .optional()
+ .describe(
+ "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts."
+ ),
})
/**
diff --git a/services/mcp/src/tools/generated/replay_vision.ts b/services/mcp/src/tools/generated/replay_vision.ts
index b0ced1109672..89fe33bc3575 100644
--- a/services/mcp/src/tools/generated/replay_vision.ts
+++ b/services/mcp/src/tools/generated/replay_vision.ts
@@ -391,6 +391,7 @@ const visionObservationsGet = (): ToolBase<
triggered_by: params.triggered_by,
variant: params.variant,
verdict: params.verdict,
+ watch_group: params.watch_group,
},
})
return withAgentNote(
@@ -1267,6 +1268,7 @@ const visionScannersObservationsGet = (): ToolBase<
triggered_by: params.triggered_by,
variant: params.variant,
verdict: params.verdict,
+ watch_group: params.watch_group,
},
})
return withAgentNote(
@@ -1313,6 +1315,7 @@ const visionScannersObservationsList = (): ToolBase<
triggered_by: params.triggered_by,
variant: params.variant,
verdict: params.verdict,
+ watch_group: params.watch_group,
},
})
return withTextProjection(
@@ -1371,6 +1374,7 @@ const visionScannersObservationsStats = (): ToolBase<
triggered_by: params.triggered_by,
variant: params.variant,
verdict: params.verdict,
+ watch_group: params.watch_group,
},
})
return withAgentNote(
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-observations-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-observations-get.json
index 00154a9ce77d..9e293735195f 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-observations-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-observations-get.json
@@ -60,6 +60,10 @@
"verdict": {
"description": "Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).",
"type": "string"
+ },
+ "watch_group": {
+ "description": "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.",
+ "type": "string"
}
},
"required": ["id"],
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-get.json
index 024d0b256fad..3049b2ac13c7 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-get.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-get.json
@@ -63,6 +63,10 @@
"verdict": {
"description": "Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).",
"type": "string"
+ },
+ "watch_group": {
+ "description": "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.",
+ "type": "string"
}
},
"required": ["id", "scanner_id"],
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-list.json
index 000516af4168..fff4db7510f1 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-list.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-list.json
@@ -67,6 +67,10 @@
"verdict": {
"description": "Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).",
"type": "string"
+ },
+ "watch_group": {
+ "description": "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.",
+ "type": "string"
}
},
"required": ["scanner_id"],
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-stats.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-stats.json
index a792ea14d3ab..81fcc3167a2b 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-stats.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-observations-stats.json
@@ -59,6 +59,10 @@
"verdict": {
"description": "Filter monitor observations by verdict. Accepts a comma-separated list (e.g. `yes,inconclusive`).",
"type": "string"
+ },
+ "watch_group": {
+ "description": "Only observations the watch feed groups with this observation as near duplicates, including itself. Pair it with the feed's `date_from` to list the sessions a feed card counts.",
+ "type": "string"
}
},
"required": ["scanner_id"],