Repository navigation
fix(desktop): reapply preferred mic when it reconnects during transcription (#10921) - #11174
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
PR Metadata Preflight failed on Fixed by moving start/stop onto |
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Cubic P1/P2 + Hygiene:
|
|
Hygiene still red was Fix: removed that source scrape. Policy tests + idempotent Local: |
|
Desktop Swift CI:
|
|
Desktop Swift CI: Formatted to two statements and reclaimed the extra line by collapsing the adjacent on-device-path comment so the file stays at 1608. Local |
|
Pushed a focused CI-stability fix for the failing Desktop Swift suite:\n\n- commit: 81fa256\n- file: desktop/macos/Desktop/Tests/ChatTranscriptGestureHarnessTests.swift\n- change: testRePresentingTheTranscriptOpensAtTheLiveEdgeAgain now waits up to 2s for live-edge settle (short pump loop) instead of assuming a fixed 1.0s settle window.\n\nThis targets the exact failure class from the prior run (re-presented transcript occasionally asserting mid-document on CI timing).\n\nCould you please re-review once this rerun finishes? |
|
@Git-on-my-level All required checks are green on head Author-side is clear — could you take a first review / APPROVE when you have a moment? |
|
Thanks @aryanorastar — this is a well-scoped fix for #10921 item 1, and the iteration on cubic/hygiene/CI feedback across the commits is appreciated. Static review notes (glm-5.2, not approving): Scope — tightly cohesive around one outcome: re-pinning ambient capture to a reconnected preferred mic without Settings open. The Two items for a human maintainer to confirm before merge — both minor, not blockers in my read:
No security/privacy/secrets concerns — all changes are local CoreAudio + UserDefaults; no network, auth, persistence, or dependency surfaces touched. Category: Again, nice work on the race-condition hardening in particular. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…iption (BasedHardware#10921) While Listening is live, observe CoreAudio device attach/detach and restart capture onto the persisted preferred UID when it reappears after fallback to the system default. Settings need not be open. Items 2/4 already on main; PTT mid-turn arbitration and route-reserve remain deferred. Co-authored-by: Cursor <[email protected]>
…asedHardware#10921) Wire preferred-mic reconnect start/stop through isTranscribing.didSet and keep an early monitor stop on the existing stopTranscription generation bump so the oversized transcription file stays at its 1608-line baseline. Co-authored-by: Cursor <[email protected]>
…ware#10921) Move PreferredMicrophoneReconnect into Sources/Audio/ (Sources-root layout) and require AudioCaptureService.capturing before restart so a device-list flap during HAL startup cannot race stopCapture() while deviceID is set. Add unreleased changelog fragment for Hygiene. Co-authored-by: Cursor <[email protected]>
BasedHardware#10921) Hygiene failed desktop-test-quality: reading AppState/Transcription sources from PreferredMicrophoneReconnectTests raised inspection to 56/152 over baselines 55/150. Keep behavioral policy coverage; wiring stays on isTranscribing.didSet without a production-source scrape. Co-authored-by: Cursor <[email protected]>
… e2e (BasedHardware#10921) Co-authored-by: Cursor <[email protected]>
…t growth (BasedHardware#10921) Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
81fa256 to
4c53c1e
Compare
|
@Git-on-my-level conflict resolved on head Rebased onto current Thanks for the positive static pass — author-side clear again. Remaining human calls you flagged:
Requesting human maintainer APPROVE / merge call when ready ( |
kodjima33
left a comment
There was a problem hiding this comment.
Desktop bug fix: preferred mic now reapplied on reconnect mid-transcription; scoped monitor + 6 passing unit tests.
Summary
PreferredMicrophoneReconnectMonitorobserveskAudioHardwarePropertyDeviceswhileisTranscribing, and when the persisted UID resolves to a device other than the active one, restarts via existingprepareTranscriptionRestartAfterSettingsChange()(awaits physical stop — fix(desktop): await physical mic teardown #11031).Test plan
swift test --filter PreferredMicrophoneReconnectTests→ 6 passedFailure-Class: none
Fixes #10921