Compare commits

...

2 Commits

Author SHA1 Message Date
AndyMik90 577ca29f4a 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 <noreply@anthropic.com>
2026-02-22 12:20:14 +01:00
AndyMik90 7cdb741c48 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 <noreply@anthropic.com>
2026-02-21 21:41:22 +01:00
@@ -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(() => {
@@ -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);