Preserve dictation recordings across WebSocket interruptions (#3159)

* fix(app): preserve dictation audio across transport failures

Keep captured PCM in the existing local segment buffer when a WebSocket send fails. Finish only after server acknowledgements and fail an idle drain so the retry path can resend the complete recording.

* fix(app): dispose dictation stream sender cleanly
This commit is contained in:
Mohamed Boudra
2026-08-11 02:03:28 +08:00
committed by GitHub
parent ca2b633286
commit c5d5441c9c
3 changed files with 302 additions and 26 deletions
+1
View File
@@ -449,6 +449,7 @@ export function useDictation(options: UseDictationOptions): UseDictationResult {
attemptGuard.cancel();
stopDurationTracking();
void audioStop.current().catch(() => undefined);
senderRef.current?.dispose();
};
}, [stopDurationTracking]);