@@ -2043,38 +2043,21 @@ struct ContentView: View {
20432043 let activeDictationSlot = self . currentDictationShortcutSlot ( for: modeAtStop)
20442044 let promptOverride = self . promptModeOverrideText
20452045 let promptTest = DictationPromptTestCoordinator . shared
2046- let shouldUseAIOnStop = activeDictationSlot. map {
2047- DictationAIPostProcessingGate . isConfigured ( for: $0, appBundleID: self . recordingAppInfo? . bundleId)
2048- } ?? DictationAIPostProcessingGate . isConfigured ( for: . primary, appBundleID: self . recordingAppInfo? . bundleId)
2049- let shouldHideOverlayOnStop = route == . normal &&
2050- !wasRewriteMode &&
2051- !wasCommandMode &&
2052- !promptTest. isActive &&
2053- !shouldUseAIOnStop
2054- var didRequestOverlayHideOnStop = false
20552046 DebugLogger . shared. info (
20562047 " Routing decision snapshot | activeMode= \( modeAtStop. rawValue) | rewrite= \( wasRewriteMode) | command= \( wasCommandMode) | overlay= \( NotchContentState . shared. mode. rawValue) " ,
20572048 source: " ContentView "
20582049 )
20592050
20602051 self . clearActiveRecordingMode ( )
20612052
2062- if shouldHideOverlayOnStop {
2063- didRequestOverlayHideOnStop = true
2064- DebugLogger . shared. debug ( " Hiding dictation overlay at stop path " , source: " ContentView " )
2065- self . hideOverlayAsync ( reason: " stop_path " )
2066- } else {
2067- // Show "Transcribing" state before calling stop() when the overlay needs
2068- // to remain available for prompt, command, rewrite, or AI feedback.
2069- DebugLogger . shared. debug ( " Showing transcription processing state " , source: " ContentView " )
2070- self . appBench ( " processing_ui_request status=Transcribing " )
2071- self . menuBarManager. setProcessing ( true )
2072- NotchOverlayManager . shared. updateTranscriptionText ( " Transcribing " )
2073- self . appBench ( " processing_ui_requested status=Transcribing " )
2074-
2075- // Give SwiftUI a chance to render the processing state before heavier work.
2076- await Task . yield ( )
2077- }
2053+ DebugLogger . shared. debug ( " Showing transcription processing state " , source: " ContentView " )
2054+ self . appBench ( " processing_ui_request status=Transcribing " )
2055+ self . menuBarManager. setProcessing ( true )
2056+ NotchOverlayManager . shared. updateTranscriptionText ( " Transcribing " )
2057+ self . appBench ( " processing_ui_requested status=Transcribing " )
2058+
2059+ // Give SwiftUI a chance to render the processing state before heavier work.
2060+ await Task . yield ( )
20782061
20792062 // Stop the ASR service and wait for transcription to complete
20802063 // The processing indicator will stay visible during this phase
@@ -2099,9 +2082,7 @@ struct ContentView: View {
20992082 guard transcribedText. trimmingCharacters ( in: . whitespacesAndNewlines) . isEmpty == false else {
21002083 DebugLogger . shared. debug ( " Transcription returned empty text " , source: " ContentView " )
21012084 // Finish the same short exit transition even when no text is emitted.
2102- if !didRequestOverlayHideOnStop {
2103- await self . menuBarManager. finishProcessingAndHideOverlay ( )
2104- }
2085+ await self . menuBarManager. finishProcessingAndHideOverlay ( )
21052086 return
21062087 }
21072088
@@ -2384,12 +2365,12 @@ struct ContentView: View {
23842365 tracksDictionaryCorrections: true
23852366 )
23862367 didTypeExternally = true
2387- if !shouldShowAIProcessingFailure, !didRequestOverlayHideOnStop {
2368+ if !shouldShowAIProcessingFailure {
23882369 self . hideOverlayAfterOutput ( )
23892370 }
23902371 }
23912372
2392- if !didTypeExternally, !shouldShowAIProcessingFailure, !didRequestOverlayHideOnStop {
2373+ if !didTypeExternally, !shouldShowAIProcessingFailure {
23932374 self . hideOverlayAfterOutput ( )
23942375 }
23952376 }
0 commit comments