Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Sources/Fluid/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,10 @@ struct ContentView: View {
// Stop the ASR service and wait for transcription to complete
// The processing indicator will stay visible during this phase
let transcribedText = await asr.stop()
DebugLogger.shared.info(
"Stop transcription result | chars=\(transcribedText.count) | empty=\(transcribedText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)",
source: "ContentView"
)

// Reset the transcription text display after transcription completes
NotchOverlayManager.shared.updateTranscriptionText("")
Expand Down Expand Up @@ -1840,6 +1844,10 @@ struct ContentView: View {
return
}

if NotchOverlayManager.shared.isBottomOverlayVisible {
BottomOverlayWindowController.shared.beginReleaseTransition()
}
Comment on lines +1847 to +1849
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate release transition to overlays that will be hidden

Calling beginReleaseTransition() before branching into command handling puts the bottom overlay into its dismissing state for every non-empty transcript, but the command path returns without hiding the overlay in stopAndProcessTranscription. In bottom-overlay command sessions this leaves isBottomOverlayDismissing active (faded/offset UI and suppressed preview) until some later unrelated hide event, so the overlay can look stuck in a near-hidden state during normal command usage. Move this transition to only the flows that immediately hide the overlay, or explicitly clear dismissing state when command processing completes.

Useful? React with 👍 / 👎.


// If this was a rewrite recording, process the rewrite instead of typing
if wasRewriteMode {
DebugLogger.shared.info("Processing rewrite with instruction: \(transcribedText)", source: "ContentView")
Expand Down
7 changes: 6 additions & 1 deletion Sources/Fluid/Persistence/SettingsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,10 @@ final class SettingsStore: ObservableObject {
let value = self.defaults.object(forKey: Keys.enableStreamingPreview)
return value as? Bool ?? true // Default to true (enabled)
}
set { self.defaults.set(newValue, forKey: Keys.enableStreamingPreview) }
set {
objectWillChange.send()
self.defaults.set(newValue, forKey: Keys.enableStreamingPreview)
}
}

var enableAIStreaming: Bool {
Expand Down Expand Up @@ -1324,12 +1327,14 @@ final class SettingsStore: ObservableObject {

/// Size options for the recording overlay
enum OverlaySize: String, CaseIterable, Codable {
case pill
case small
case medium
case large

var displayName: String {
switch self {
case .pill: return "Pill"
case .small: return "Small"
case .medium: return "Medium"
case .large: return "Large"
Expand Down
8 changes: 8 additions & 0 deletions Sources/Fluid/Services/ASRService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,10 @@ final class ASRService: ObservableObject {
"stop(): no audio captured, skipping transcription",
source: "ASRService"
)
DebugLogger.shared.info(
"Final ASR result | provider=\(self.transcriptionProvider.name) | samples=0 | textChars=0 | confidence=nil | reason=no_audio",
source: "ASRService"
)
if shouldResumeMedia {
await MediaPlaybackService.shared.resumeIfWePaused(true)
DebugLogger.shared.info("🎵 Resumed system media after empty audio", source: "ASRService")
Expand Down Expand Up @@ -988,6 +992,10 @@ final class ASRService: ObservableObject {
"Transcription completed: '\(result.text)' (confidence: \(result.confidence))",
source: "ASRService"
)
DebugLogger.shared.info(
"Final ASR result | provider=\(self.transcriptionProvider.name) | samples=\(pcm.count) | textChars=\(result.text.trimmingCharacters(in: .whitespacesAndNewlines).count) | confidence=\(result.confidence)",
source: "ASRService"
)

// Mark first transcription as complete to clear loading state
if !self.hasCompletedFirstTranscription {
Expand Down
Loading
Loading