From 8a648a2e5f7db0a40d542e03a0f392dea5a88592 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Mon, 19 Jan 2026 14:01:02 +0100 Subject: [PATCH] fix: update session replay settings to map legacy consent_required to anonymous_skeleton and remove related UI elements --- app/sites/[id]/settings/page.tsx | 93 +------------------------------- lib/api/sites.ts | 2 +- public/script.js | 8 +-- 3 files changed, 5 insertions(+), 98 deletions(-) diff --git a/app/sites/[id]/settings/page.tsx b/app/sites/[id]/settings/page.tsx index 228a061..607b612 100644 --- a/app/sites/[id]/settings/page.tsx +++ b/app/sites/[id]/settings/page.tsx @@ -94,8 +94,8 @@ export default function SiteSettingsPage() { collect_device_info: data.collect_device_info ?? true, collect_geo_data: data.collect_geo_data || 'full', collect_screen_resolution: data.collect_screen_resolution ?? true, - // Session replay settings - replay_mode: data.replay_mode || 'disabled', + // Session replay settings (legacy consent_required from API mapped to anonymous_skeleton) + replay_mode: ((data as { replay_mode?: string }).replay_mode === 'consent_required' ? 'anonymous_skeleton' : data.replay_mode) || 'disabled', replay_sampling_rate: data.replay_sampling_rate ?? 100, replay_retention_days: data.replay_retention_days ?? 30, replay_mask_all_text: data.replay_mask_all_text ?? false, @@ -772,33 +772,6 @@ export default function SiteSettingsPage() { - {/* Consent Required */} - - {/* Anonymous Skeleton */}