Repository navigation
revert(app): remove the automatic phone-mic fallback on BLE disconnect - #11134
Merged
Merged
Conversation
Reverts 75e4e17 (#11084), which added `onRecordingDeviceDisconnected()` and the `device_provider` hook that starts a phone-mic batch recording whenever the wearable drops mid-session. The same behaviour was proposed in #11066 and rejected by the app maintainer: #7194 asks for on-device offline recording to keep working across a disconnect, not for the phone to start recording in its place. #11066 was closed and #11078 was opened to scope a phone-side fallback on its own merits; #11078 is still open and unapproved. #11084 landed the feature anyway, described as a guard against it. Its guard is also wrong for Omi hardware: it consults `batchModeEnabled`, but ring-buffer capture is keyed on firmware (`isRingBufferFirmware`, 3.0.20+) and is independent of that pref. With batch mode off, an Omi on 3.0.20+ keeps writing to its ring while the phone starts its own mic batch, so the same interval is captured twice and syncs as duplicate conversations. Verification: flutter analyze lib/services/capture/capture_controller.dart \ lib/utils/batch_recording.dart lib/providers/device_provider.dart \ test/unit/batch_recording_phone_test.dart -> 1 pre-existing info (unnecessary_import, already on main), 0 new flutter test test/unit/batch_recording_phone_test.dart \ test/providers/capture_provider_test.dart \ test/providers/sync_provider_fully_synced_conversations_test.dart \ test/unit/synced_conversation_pointer_order_test.dart -> 89 tests, all passed grep for shouldFallbackToPhoneOnDeviceDisconnect / onRecordingDeviceDisconnected / isRecordingDuringDeviceDisconnect / _phoneMicBatchStopCompleter -> no matches Failure-Class: none
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts #11084 (
75e4e1789d), which addedCaptureController.onRecordingDeviceDisconnected()and theDeviceProviderhook that starts a phone-mic batch recording whenever the wearable disconnects mid-session.Why
This behaviour was already reviewed and rejected. #11066 proposed the same phone-side fallback and received
CHANGES_REQUESTEDfrom the app maintainer:#11066 was closed, and #11078 was opened specifically so a phone-side fallback could be scoped on its own merits. #11078 is still open and unapproved.
The PR description did not match its diff. #11084 is titled "preserve on-device offline batch across BLE disconnect" and its body states it "prevents the phone-mic fallback from triggering". Before #11084 there was no such fallback to prevent:
onRecordingDeviceDisconnecteddid not exist and nothing called it, and_startPhoneMicBatchwas reachable only from user-initiated paths. The PR introduced the feature together with a guard for it; the Implementation section listed neither the new method nor thedevice_provider.dartcall site.The guard does not cover Omi hardware. It reads:
It consults
batchModeEnabled, but ring-buffer capture is keyed on firmware (WalSyncs.isRingBufferFirmware, 3.0.20+) and is independent of that pref. With batch mode off, an Omi on 3.0.20+ keeps writing to its on-device ring while the phone starts its own mic batch — the same interval is captured twice and syncs as duplicate conversations, plus an unrequested mic activation and the battery cost.#11084 did address the technical review notes from #11066 (
deviceRecordstate, awaited stop hand-off,deviceSupportsTranscribeLater). The product objection was not addressed.Scope
Revert only. #11064 and #11085 from the same batch are left in place — #11064 is a genuine sort fix, and #11085 needs a real fix rather than a revert (its
filterFullySyncedConversationsnever releases a WAL retired toWalStatus.outsideRecoveryWindowby #10995, so those conversations stay filtered out of the synced list; tracked separately).#7194 remains open on its actual subject: on-device offline recording that works but is flaky across disconnects.
Verification
Clean revert: no later commit touched
capture_controller.dart,batch_recording.dart,device_provider.dart, orbatch_recording_phone_test.dartbetween #11084 and84e4c1828b.Product invariants affected
none
Failure class (fixes)
No
fix:commits; no declaration required.