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): show the dollar estimate next to the filters credit cap (#126711)

Kim Svatos Dugan3f44e918c74f
diff --git a/products/replay_vision/frontend/replay_scanners/components/ReplayFiltersScannerPopover.tsx b/products/replay_vision/frontend/replay_scanners/components/ReplayFiltersScannerPopover.tsx
index 23b7f8eff95b..b773d1087937 100644
--- a/products/replay_vision/frontend/replay_scanners/components/ReplayFiltersScannerPopover.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/ReplayFiltersScannerPopover.tsx
@@ -10,7 +10,7 @@ import { urls } from 'scenes/urls'
import { aiConsentLogic } from '~/layout/ai/aiConsentLogic'
import { getReplayVisionEditDisabledReason } from '../../utils/accessControl'
-import { formatCreditCount } from '../../utils/credits'
+import { creditsToUsd, formatCreditCount } from '../../utils/credits'
import { type ReplayFiltersCreditCap, replayFiltersScannerLogic } from '../replayFiltersScannerLogic'
import type { ScannerHandoffFromFilters } from '../scannerHandoffFromFilters'
import type { ReplayScanner } from '../types'
@@ -138,17 +138,24 @@ export function ReplayFiltersScannerPopover({ handoff }: { handoff: ScannerHando
It pauses when they run out, so it never adds to your bill.
</div>
) : (
- <LemonInput
- aria-label="Monthly credit cap"
- type="number"
- min={1}
- value={budget ?? undefined}
- onChange={(value) => setBudget(value ?? null)}
- suffix={<span className="text-secondary">credits a month</span>}
- size="small"
- className="w-56"
- data-attr="replay-filters-scanner-budget"
- />
+ <div className="flex flex-wrap items-center gap-2">
+ <LemonInput
+ aria-label="Monthly credit cap"
+ type="number"
+ min={1}
+ value={budget ?? undefined}
+ onChange={(value) => setBudget(value ?? null)}
+ suffix={<span className="text-secondary">credits a month</span>}
+ size="small"
+ className="w-56"
+ data-attr="replay-filters-scanner-budget"
+ />
+ {budget != null && budget > 0 ? (
+ <span className="text-xs text-secondary">
+ ≈ <span translate="no">{creditsToUsd(budget)}</span> a month
+ </span>
+ ) : null}
+ </div>
)}
</div>
diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerGoalFlow.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerGoalFlow.tsx
index 0c2379c1e217..11c90f3f1c15 100644
--- a/products/replay_vision/frontend/replay_scanners/components/ScannerGoalFlow.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerGoalFlow.tsx
@@ -237,7 +237,7 @@ export function ScannerGoalFlow(): JSX.Element {
/>
{budgetValid && goalBudgetInput != null ? (
<span className="text-xs text-muted">
- ≈ {creditsToUsd(goalBudgetInput)} a month
+ ≈ <span translate="no">{creditsToUsd(goalBudgetInput)}</span> a month
</span>
) : null}
</div>