From 7cdb741c486d8295c9eba1c6167fcdf49c57f78e Mon Sep 17 00:00:00 2001 From: AndyMik90 Date: Sat, 21 Feb 2026 21:41:22 +0100 Subject: [PATCH 1/2] fix: resolve setup wizard flashing on auth screen (fixes #1882) The OAuthStep component had an infinite re-render loop caused by loadClaudeProfiles being defined as a plain async function without useCallback. On every render, a new function reference was created, which triggered the useEffect (which listed it as a dependency), which called setIsLoadingProfiles(true) causing another re-render, creating an endless cycle that manifested as screen flashing. Fix: wrap loadClaudeProfiles in useCallback with an empty dependency array so the function reference is stable across renders. Co-Authored-By: Claude Opus 4.6 --- .../frontend/src/renderer/components/onboarding/OAuthStep.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx b/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx index f23b93a90d..414699111c 100644 --- a/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx +++ b/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx @@ -79,7 +79,7 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) { ); // Reusable function to load Claude profiles - const loadClaudeProfiles = async () => { + const loadClaudeProfiles = useCallback(async () => { setIsLoadingProfiles(true); setError(null); try { @@ -95,7 +95,7 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) { } finally { setIsLoadingProfiles(false); } - }; + }, []); // Load Claude profiles on mount useEffect(() => { From 577ca29f4abf1550a4230425b8e9933f0981ddd9 Mon Sep 17 00:00:00 2001 From: AndyMik90 Date: Sun, 22 Feb 2026 12:20:14 +0100 Subject: [PATCH 2/2] fix: remove PII email from auth success log Remove raw email address from console.warn output to prevent PII from being written to persistent Electron log files, addressing GDPR/CCPA risk. Co-Authored-By: Claude Sonnet 4.6 --- apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx b/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx index 414699111c..df3970d7c9 100644 --- a/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx +++ b/apps/frontend/src/renderer/components/onboarding/OAuthStep.tsx @@ -231,7 +231,7 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) { // Handle auth terminal success const handleAuthTerminalSuccess = useCallback(async (email?: string) => { - console.warn('[OAuthStep] Auth success:', email); + console.warn('[OAuthStep] Auth success'); // Close terminal immediately setAuthTerminal(null);