Repository navigation
fix(app): don't flip a live pendant into Transcribe Later after closing the Device Tutorial - #20913
Merged
kodjima33 merged 1 commit intoOct 8, 2026
Conversation
…ng the Device Tutorial
The onboarding wrapper's dispose() always dispatches OnboardingBatchChanged(suspended: false)
to restore batch mode, even when Transcribe Later was never suspended because it was off to
begin with. The reducer unconditionally flipped the phase to batch on that restore event,
leaving the capture coordinator out of sync with batchModeEnabled: the phone mic button then
refuses to record ("Stop Transcribe Later on your pendant first") and live pendant reconnect
stops working, until the app restarts.
Have _reduceOnboardingBatch read batchModeSuspendedForOnboarding from the environment and
leave the phase untouched on a restore that has nothing to restore.
fixes #20776
kodjima33
deleted the
issues-improver/20776-onboarding-batch-restore-guard
branch
October 8, 2026 14:48
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.
What
InteractiveDeviceOnboardingWrapper.dispose()always dispatchesOnboardingBatchChanged(suspended: false)to restore batch mode when the pendant Device Tutorial closes, even when Transcribe Later was never suspended because it was off to begin with. The reducer (_reduceOnboardingBatchinapp/lib/services/capture/capture_coordinator.dart) flipped the phase frompendantLivetopendantBatchLiveon every such restore, regardless of whether anything had actually been suspended.Fix: have the reducer read
batchModeSuspendedForOnboardingfrom the environment (sampled fresh from_preferenceson each dispatch) and leave the phase untouched when a restore event has nothing to restore.Why (from the issue)
The controller's own
_restoreBatchAfterOnboardingBody()already no-ops correctly when nothing was suspended, but that didn't undo the reducer's unconditional phase flip — this PR closes that gap at the source.What I tested
capture_coordinator_test.dartsuite: pendant connects live (Transcribe Later off) -> tutorial opens (suspended: true) -> tutorial closes (suspended: false) -> asserts phase stayspendantLiveinstead of flipping topendantBatchLive.pendantBatchLive) and passes after the fix.capture_coordinator_test.dartsuite: all 77 tests pass.flutter analyzeon the touched files shows only pre-existing, unrelated warnings (5unawaited_return_in_try_blockwarnings ~250 lines away from this change).fixes #20776
UI-Evidence: none -- pure state-machine/reducer logic fix (no screen, widget, or copy change)
Auto-generated from issue feedback by the mini issues-improver — tested and merged.
Line-Count-Exception: app/lib/services/capture/capture_coordinator.dart | 2932 -> 2943 | correctness fix requires reading env in the reducer plus a guard branch; no extraction attempted for an 11-line net change
Product invariants affected
Failure-Class: none