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.

revert(replay-vision): keep the metrics row on the scanners list (#104752)

Kim Svatos Dugan72675afbaf61
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 8afd5188d389..83ff0b7e2390 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -10556,10 +10556,6 @@ snapshots:
hash: v1.k794b7964.aab9212ef24367842f0c4b5c6e0b5568efa7b02455e0b762a0dae56f7a251ded.Vis7Q1vljRgKviTHYsDV5sgLm5fLA8DqNHkJ-26wpBE
scenes-app-replay-vision--usage-tab--light:
hash: v1.k794b7964.2ef3c1068703daaae8c960f5efde14f65aa0a0db64a5125d06beca44abd35433.H06_UO_8eRcWCyB1p55hCLxFFDlj-5Av13ZGRDpbPaQ
- scenes-app-replay-vision--usage-tab-redesigned--dark:
- hash: v1.k794b7964.30975bcc2085658200ab6ea0f24d7981bdcf1fc13fccc9c3dc758c0063372d46.j1VtD47yDmX3mczn_DBkVGbGZgPUsuAPFLN1COo1n0I
- scenes-app-replay-vision--usage-tab-redesigned--light:
- hash: v1.k794b7964.4c8e665d2f6197115d5a0ffb3e914027d2ffa63f2856ca17c7c0e92fb4ea1c84.YIHK8qU8f2M6OTil-h7HvXzENlVMfNUeI3LYVikCjuA
scenes-app-replay-vision-observationthumbnail--frame--dark:
hash: v1.k794b7964.25e0fc3a30206636572afe40dc1dece511909b329125acdd76d5cd6b70e4cebd.vUNWqzn2OcfR4oaaUWZaXz4aKxivNKx8scF34tw7JEE
scenes-app-replay-vision-observationthumbnail--frame--light:
diff --git a/products/replay_vision/frontend/components/ScanningPausedBanner.tsx b/products/replay_vision/frontend/components/ScanningPausedBanner.tsx
deleted file mode 100644
index d17030e7bf3d..000000000000
--- a/products/replay_vision/frontend/components/ScanningPausedBanner.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { useValues } from 'kea'
-
-import { LemonBanner, Link } from '@posthog/lemon-ui'
-
-import { urls } from 'scenes/urls'
-
-import { ProductKey } from '~/queries/schema/schema-general'
-
-import { visionQuotaLogic } from '../logics/visionQuotaLogic'
-
-/** Shown on the scanners list when the org's credits are used up, since the spend card that
- * carried this warning lives on the Usage tab under the home-redesign experiment. */
-export function ScanningPausedBanner(): JSX.Element | null {
- const { displayQuota: quota, onFreePlan } = useValues(visionQuotaLogic)
-
- if (!quota?.exhausted) {
- return null
- }
- return (
- <LemonBanner type="warning" data-attr="vision-scanning-paused-banner">
- {onFreePlan ? (
- <>
- Scanning is paused because your organization's free credits are used up.{' '}
- <Link to={urls.organizationBilling([ProductKey.REPLAY_VISION])}>Add billing</Link> to keep scanning,
- or check the <Link to={`${urls.replayVision()}?tab=usage`}>Usage tab</Link> for details.
- </>
- ) : (
- <>
- Scanning is paused because your organization reached its monthly spend limit.{' '}
- <Link to={urls.organizationBilling([ProductKey.REPLAY_VISION])}>Raise your billing limit</Link> to
- resume scanning, or check the <Link to={`${urls.replayVision()}?tab=usage`}>Usage tab</Link> for
- details.
- </>
- )}
- </LemonBanner>
- )
-}
diff --git a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
index 27c175ad840b..8cd611732f3c 100644
--- a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
+++ b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.stories.tsx
@@ -724,14 +724,6 @@ export const HomeWatchFeedEmpty: StoryObj = {
},
}
-// Test arm of the Usage tab: absorbs the observations chart and enabled-scanners card.
-export const UsageTabRedesigned: StoryObj = {
- parameters: {
- pageUrl: `${urls.replayVision()}?tab=usage`,
- featureFlags: { [FEATURE_FLAGS.REPLAY_VISION_HOME_REDESIGN_EXPERIMENT]: 'test' },
- },
-}
-
export const SummarizerOverview: StoryObj = {
parameters: { pageUrl: urls.replayVision(summarizerScanner.id) },
}
diff --git a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.tsx b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.tsx
index 423bad2072b6..a4d3bfe22f9a 100644
--- a/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.tsx
+++ b/products/replay_vision/frontend/replay_scanners/ReplayScannersScene.tsx
@@ -35,7 +35,6 @@ import { FilterPill } from '../components/FilterPill'
import { IngestionLimitBanner } from '../components/IngestionLimitBanner'
import { ReplayVisionFeedbackButton } from '../components/ReplayVisionFeedbackButton'
import { ScannerTypeBadge } from '../components/ScannerTypeBadge'
-import { ScanningPausedBanner } from '../components/ScanningPausedBanner'
import { replayVisionEmptyState } from '../emptyState/replayVisionEmptyState'
import { visionQuotaLogic } from '../logics/visionQuotaLogic'
import { ObservationSearch } from '../search/ObservationSearch'
@@ -317,9 +316,7 @@ export function ReplayScannersScene(): JSX.Element {
<VisionUsageTab />
) : (
<>
- {isRedesign ? (
- <ScanningPausedBanner />
- ) : (scannerStats?.total ?? 0) > 0 ? (
+ {(scannerStats?.total ?? 0) > 0 ? (
<VisionMetrics />
) : scannerStatsLoading ? (
<div className="flex items-center justify-center h-72 bg-bg-light rounded">
diff --git a/products/replay_vision/frontend/replay_scanners/components/VisionUsageTab.tsx b/products/replay_vision/frontend/replay_scanners/components/VisionUsageTab.tsx
index 02b9c48d5c0a..5ad8dd15c816 100644
--- a/products/replay_vision/frontend/replay_scanners/components/VisionUsageTab.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/VisionUsageTab.tsx
@@ -2,11 +2,9 @@ import { useActions, useValues } from 'kea'
import { LemonButton, LemonCard, LemonSwitch, Link, Spinner, Tooltip } from '@posthog/lemon-ui'
-import { FEATURE_FLAGS } from 'lib/constants'
import { LemonProgress } from 'lib/lemon-ui/LemonProgress'
import { LemonTableColumns } from 'lib/lemon-ui/LemonTable'
import { LemonTable } from 'lib/lemon-ui/LemonTable'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { pluralize } from 'lib/utils/strings'
import { urls } from 'scenes/urls'
@@ -25,11 +23,8 @@ import {
} from '../../utils/credits'
import { verdictColorVar, verdictTextClass } from '../../utils/spendVerdict'
import { STARTUP_CAP_EXPLANATION } from '../../utils/startupCap'
-import { replayScannersLogic } from '../replayScannersLogic'
-import { ReplayScanner, homeRedesignVariant } from '../types'
+import { ReplayScanner } from '../types'
import { visionUsageLogic } from '../visionUsageLogic'
-import { EnabledScannersCard } from './EnabledScannersCard'
-import { ObservationsOverTimeCard } from './ObservationsOverTimeCard'
import { SpendTrajectoryChart } from './SpendTrajectoryChart'
const ORG_WIDE_NOTE = 'Spend and limits are shared by every project in the organization.'
@@ -64,13 +59,6 @@ export function VisionUsageTab(): JSX.Element {
billedLimitCredits,
showStartupCap,
} = useValues(visionQuotaLogic)
- const { chartDateFrom, chartDateTo } = useValues(replayScannersLogic)
- const { setChartDateRange } = useActions(replayScannersLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- // Reading the flags proxy reports exposure; this component only renders once the Usage tab is
- // open, so exposure covers exactly the users who saw either arm of this tab.
- const isRedesign =
- homeRedesignVariant(featureFlags[FEATURE_FLAGS.REPLAY_VISION_HOME_REDESIGN_EXPERIMENT]) === 'test'
const statusText = verdictTextClass(verdict.kind)
const hasCap = verdict.hasCap
@@ -275,18 +263,6 @@ export function VisionUsageTab(): JSX.Element {
</LemonCard>
</div>
- {isRedesign && (
- <div className="grid grid-cols-1 @xl:grid-cols-2 gap-4">
- <ObservationsOverTimeCard
- dateFrom={chartDateFrom}
- dateTo={chartDateTo}
- onDateChange={setChartDateRange}
- className="border min-h-80"
- />
- <EnabledScannersCard />
- </div>
- )}
-
<LemonCard hoverEffect={false} className="p-4 flex flex-col gap-2">
<div className="flex flex-wrap items-baseline justify-between gap-2">
<h3 className="text-base font-semibold m-0">Spend this period</h3>