From eb3c3b2738002a6e389d6c4982f968d77f66b942 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Wed, 25 Mar 2026 20:33:46 +0100 Subject: [PATCH] debug: add console.logs to privacy tab dirty tracking --- components/settings/unified/tabs/SitePrivacyTab.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/settings/unified/tabs/SitePrivacyTab.tsx b/components/settings/unified/tabs/SitePrivacyTab.tsx index ffc77de..d7309e2 100644 --- a/components/settings/unified/tabs/SitePrivacyTab.tsx +++ b/components/settings/unified/tabs/SitePrivacyTab.tsx @@ -73,9 +73,13 @@ export default function SitePrivacyTab({ siteId, onDirtyChange }: { siteId: stri // Track dirty state useEffect(() => { - if (!initialRef.current) return + if (!initialRef.current) { + console.log('[Privacy] dirty check skipped — no initialRef') + return + } const current = JSON.stringify({ collectPagePaths, collectReferrers, collectDeviceInfo, collectScreenRes, collectGeoData, hideUnknownLocations, dataRetention, excludedPaths }) const dirty = current !== initialRef.current + console.log('[Privacy] dirty check:', { dirty, collectPagePaths, initial: initialRef.current.substring(0, 50) }) setIsDirty(dirty) onDirtyChange?.(dirty) }, [collectPagePaths, collectReferrers, collectDeviceInfo, collectScreenRes, collectGeoData, hideUnknownLocations, dataRetention, excludedPaths, onDirtyChange]) @@ -115,7 +119,7 @@ export default function SitePrivacyTab({ siteId, onDirtyChange }: { siteId: stri
- setCollectPagePaths(v => !v)} /> + { console.log('[Privacy] toggling page paths from', collectPagePaths, 'to', !collectPagePaths); setCollectPagePaths(v => !v) }} /> setCollectReferrers(v => !v)} /> setCollectDeviceInfo(v => !v)} /> setCollectScreenRes(v => !v)} />