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.

fix(replay): allow creating a scanner from replay filters without filters (#124468)

Kim Svatos Dugana3afbe1db899
diff --git a/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFiltersEmbed.tsx b/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFiltersEmbed.tsx
index 5acd3286894c..3334c49b4b80 100644
--- a/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFiltersEmbed.tsx
+++ b/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFiltersEmbed.tsx
@@ -881,11 +881,10 @@ export const ReplayFiltersTab = ({
size="small"
icon={<IconSparkles className="text-ai" />}
data-attr="replay-save-filters-as-scanner"
- tooltip="Create a Replay vision scanner that keeps watching sessions matching these filters. The date range does not carry over, so the scanner watches sessions from now on."
- disabledReason={
+ tooltip={
scannerHandoff.narrowsSessions
- ? undefined
- : 'Add an event or property filter. A date range and pinned sessions do not carry over to a scanner.'
+ ? 'Create a Replay vision scanner. It watches new session recordings that match these filters for you. The date range does not carry over, so it starts from now.'
+ : 'Create a Replay vision scanner. It watches every new session recording for you. Add a filter to watch only some of them. A date range and pinned sessions do not carry over.'
}
onClick={() => {
void addProductIntentForCrossSell({
diff --git a/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.test.ts b/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.test.ts
index 22e7bdf81aa2..810fb5ca8d11 100644
--- a/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.test.ts
+++ b/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.test.ts
@@ -74,8 +74,7 @@ describe('scannerHandoffFromFilters', () => {
})
describe('narrowsSessions', () => {
- // Guards the one-click path to a scanner pointed at every session: the replay list counts
- // these as filters, but a scanner keeps none of them.
+ // The replay list counts these as filters, but a scanner keeps none of them, so it watches every session.
it.each([
['an untouched filter set', filters()],
['only a date range', filters({ date_from: '-7d' })],
diff --git a/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.ts b/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.ts
index 87ab7588d1f2..5fbdddc07c04 100644
--- a/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.ts
+++ b/products/replay_vision/frontend/replay_scanners/scannerHandoffFromFilters.ts
@@ -16,8 +16,8 @@ export interface ScannerHandoffFromFilters {
* Whether the resulting scanner would watch a subset of sessions rather than all of them.
*
* Deliberately not the replay list's filter count, which also counts the date range and pinned
- * session IDs. A scanner keeps neither, so counting them offers a one-click path to a scanner
- * aimed at every session.
+ * session IDs. A scanner keeps neither, so counting them would tell the person their scanner is
+ * narrowed when it actually watches every session.
*/
narrowsSessions: boolean
}