diff --git a/leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift b/leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift index d21286b6..112afaf7 100644 --- a/leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift +++ b/leanring-buddy/AssemblyAIStreamingTranscriptionProvider.swift @@ -41,7 +41,9 @@ final class AssemblyAIStreamingTranscriptionProvider: BuddyTranscriptionProvider ) async throws -> any BuddyStreamingTranscriptionSession { // Fetch a fresh temporary token from the proxy before each session let temporaryToken = try await fetchTemporaryToken() - print("🎙️ AssemblyAI: fetched temporary token (\(temporaryToken.prefix(20))...)") + // Log success only — never log any part of the token value. + // Even a 20-char prefix narrows brute-force space and confirms a valid token was issued. + print("🎙️ AssemblyAI: fetched temporary token (OK)") let session = AssemblyAIStreamingTranscriptionSession( apiKey: nil, diff --git a/leanring-buddy/CompanionManager.swift b/leanring-buddy/CompanionManager.swift index 0234cf19..61c9088e 100644 --- a/leanring-buddy/CompanionManager.swift +++ b/leanring-buddy/CompanionManager.swift @@ -519,7 +519,8 @@ final class CompanionManager: ObservableObject { }, submitDraftText: { [weak self] finalTranscript in self?.lastTranscript = finalTranscript - print("🗣️ Companion received transcript: \(finalTranscript)") + // Do not log the transcript verbatim — it contains user speech (PII). + print("🗣️ Companion received transcript (\(finalTranscript.count) chars)") ClickyAnalytics.trackUserMessageSent(transcript: finalTranscript) self?.sendTranscriptToClaudeWithScreenshot(transcript: finalTranscript) } @@ -676,9 +677,10 @@ final class CompanionManager: ObservableObject { detectedElementScreenLocation = globalLocation detectedElementDisplayFrame = displayFrame ClickyAnalytics.trackElementPointed(elementLabel: parseResult.elementLabel) - print("🎯 Element pointing: (\(Int(pointCoordinate.x)), \(Int(pointCoordinate.y))) → \"\(parseResult.elementLabel ?? "element")\"") + // Do not log coordinates or element labels — they reveal what is on the user's screen. + print("🎯 Element pointing: coordinate resolved") } else { - print("🎯 Element pointing: \(parseResult.elementLabel ?? "no element")") + print("🎯 Element pointing: no coordinate, skipping navigation") } // Save this exchange to conversation history (with the point tag @@ -1017,7 +1019,8 @@ final class CompanionManager: ObservableObject { detectedElementBubbleText = parseResult.spokenText detectedElementScreenLocation = globalLocation detectedElementDisplayFrame = displayFrame - print("🎯 Onboarding demo: pointing at \"\(parseResult.elementLabel ?? "element")\" — \"\(parseResult.spokenText)\"") + // Do not log element labels or spoken text — they reveal screen content. + print("🎯 Onboarding demo: pointing at element") } catch { print("⚠️ Onboarding demo error: \(error)") } diff --git a/leanring-buddy/ElementLocationDetector.swift b/leanring-buddy/ElementLocationDetector.swift index 47072b11..272fedec 100644 --- a/leanring-buddy/ElementLocationDetector.swift +++ b/leanring-buddy/ElementLocationDetector.swift @@ -110,10 +110,7 @@ class ElementLocationDetector { // Convert from top-left origin (Computer Use / CoreGraphics) to bottom-left origin (AppKit) let scaledYBottomLeftOrigin = CGFloat(displayHeightInPoints) - scaledYTopLeftOrigin - print("🎯 ElementLocationDetector: mapped (\(Int(clampedX)), \(Int(clampedY))) in " + - "\(computerUseResolution.width)x\(computerUseResolution.height) → " + - "(\(Int(scaledX)), \(Int(scaledYBottomLeftOrigin))) in " + - "\(displayWidthInPoints)x\(displayHeightInPoints) display-local AppKit coords") + // Do not log coordinates — they reveal the pixel location of elements on the user's screen. return CGPoint(x: scaledX, y: scaledYBottomLeftOrigin) } @@ -254,7 +251,7 @@ class ElementLocationDetector { let x = CGFloat(coordinate[0].doubleValue) let y = CGFloat(coordinate[1].doubleValue) - print("🎯 ElementLocationDetector: raw coordinate (\(Int(x)), \(Int(y)))") + // Do not log coordinate values — they reveal element positions on the user's screen. return CGPoint(x: x, y: y) }