Repository navigation
fix(app): restore pendant unmute after capture goes idle - #24740
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
|
Verdict: this fix looks correct and well-tested — no blocking findings. Credit for the diagnosis in #24664; the ble_log evidence made reviewing this straightforward. Findings by file:
Security: no new data flows, permissions, or network surface — pure state-machine/recovery logic. USER IMPACT: pendant users who muted can unmute with a double-tap after the app went idle or reconnected, instead of capture staying dead until an app reinstall. What I'd still want before merge: CI has produced zero check-runs on this head, so the local suite runs in the PR body are unconfirmed by the repo — the app test lane needs to run (a trivial push re-triggers if it stays silent), and iOS on-device verification (the reported platform) is outstanding. Leaving merge sign-off to human maintainers for exactly those two reasons. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks for the review. CI: the workflows did trigger on both heads ( On-device: I can't produce a signed iOS build that works against production. Per
I'm the reporter in #24664 and will run the 6-step repro on my iPhone (CV1, fw 3.0.21) as soon as this is in an internal or TestFlight build. Happy to do it earlier if you can share one. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aunch Co-Authored-By: Claude Opus 5.5 <[email protected]>
…turns Foreground recovery restarted a connected pendant that capture left idle, but only when unmuted. A muted pendant whose start failed or was skipped stayed idle: no Paused card, no button listener, so the double-tap unmute could not reach the app (BasedHardware#24762). A muted device start now lands paused, so foreground recovery admits it too. A pendant the user stopped stays stopped. Also updates the idle device-resume test for the new PersistDeviceMuteStage. Co-Authored-By: Claude Opus 5.5 <[email protected]>
0fb5c24 to
2b2e95a
Compare
|
Rebased on main after #24393 (CV1 3.0.23 device mute) to clear the conflict. Device resume still delegates to New commit On this head: |
|
@Git-on-my-level, a quick heads-up since this now builds on your #24393. After the rebase:
CI is still waiting for approval to run. |
|
Since my last review: addressed (rebase onto #24393 verified - device resume now delegates to _reduceResume, which carries PersistDeviceMuteStage(false) on the pendant arms, so a double-tap unmute also clears the device-side mute; the new foreground-recovery commit closes the relaunch path from #24762) - still open (all CI workflows on this head were waiting on first-time-contributor approval - I have approved them, so the lanes should start; on-device iOS spot-check of the #24664 repro) - newly introduced (none). Verdict: the new head holds up - no blocking findings; this closes one more path into the same stuck state, and the guard rails stayed where they should be. New code, checked on this head:
Security: no new surfaces - state machine and recovery logic only. USER IMPACT: a muted pendant comes back as a Paused card with a working double-tap unmute after a relaunch or a failed start, instead of capture staying dead until an app reinstall. I approved the pending workflow runs for this fork, so Mobile App Checks should start shortly - the suite run described in the PR still needs to be confirmed by that lane. Beyond that, an on-device iOS check of the original repro is the one thing automated tests cannot cover. Leaving merge sign-off to the human maintainers for those two items. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…ed settle The recovery start does real WAL and device I/O outside settle()'s tracking, so a loaded CI runner asserted before it finished (3/8 local runs under CPU load failed the same way). Poll for the paused state with a 10 s bound; the test still fails without the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Since my last review: addressed (the only failing lane on the previous head, Mobile App Checks, failed only in "foreground restores a muted pendant left idle as paused with a working double-tap" - it asserted liveCaptureSource before the unawaited recovery start finished; I confirmed this in the CI log, and the new head replaces that test's fixed settle with a bounded poll) - still open (this push re-triggered the fork workflow gate, so all lanes were back at action_required - I have approved them, so CI can now confirm the flake fix on this head; the on-device iOS repro of #24664 is still outstanding until a build is available) - newly introduced (none; the delta is test-only). Verdict: no blocking findings - the fix remains correct and well-scoped, and the new commit only hardens the wait in the test that flaked under a loaded runner. Checked on this head:
USER IMPACT: a muted pendant reconnects into a visible paused state with a working double-tap unmute, instead of silently dead capture until an app reinstall. Still wanted: green Mobile App Checks on this head once the lanes run, and the on-device repro of the #24664 flow when an internal or TestFlight build is available. Merge sign-off stays with a human maintainer; no escalation urgency - the technical surface is verified. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Since my last review: addressed (the one outstanding automated item — green CI on this head — is now confirmed: Dart Analyze & Tests, Formatting, Hygiene, and Mobile Release Eligibility all pass; the skipped lanes are path filtering, not failures, and the lone neutral result is an advisory reviewer bot) · still open (the on-device run of the #24664 repro on iOS/CV1, which needs an internal or TestFlight build) · newly introduced (none — the head is unchanged since the last review). Verdict: from the automation side this is merge-ready. The fix was verified file-by-file in my earlier reviews, and re-checking the delegation on this head holds up: _reduceDeviceResume no-ops only while a live phone owns the channel, and _reduceResume's first line preserves the silence-paused routing, the pendant resume arms carry PersistDeviceMuteStage(false), and the muted-idle arm emits exactly PersistDeviceMuteStage(false) + PolicyWrite(false) with no capture stage — which is the double-tap-unmute-from-idle fix, asserted by the new tests. USER IMPACT: a muted pendant comes back as a Paused card with a working double-tap unmute after a relaunch, reconnect, or failed start, instead of capture staying dead until an app reinstall. Remaining before merge: the on-device check of the original repro (the author has offered to run it as soon as a build is shareable) and human merge sign-off — no escalation urgency; the technical surface is verified. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks David. I can't produce a signed iOS build myself, since the beta bundle has to be registered with Omi's Firebase project and Apple team. Any of these works for me:
|
Keep main's device-resume routing and committed muted-start handling. Retain the contributor's foreground recovery and cover muted sync-fence recovery. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changed and why
Fixes #24664. Refs #24762.
capture_unavailable._recoverCaptureOnResumerestarted a connected pendant that capture left idle, but only when unmuted. A muted pendant whose start failed or was skipped stayed dead: no Paused card, no button listener, so the double-tap could not reach the app (the iOS pendant Pause/Resume controls disappear after app relaunch #24762 relaunch symptom). It is now restarted too and lands paused. A pendant the user stopped, batch mode, calls and phone-owned capture stay excluded, and orphan-audio recovery keeps its mute check.Rebased on main after #24393 (CV1 3.0.23 device mute). Device resume still delegates to
_reduceResume, so it carriesPersistDeviceMuteStagelike every other resume. On 3.0.21, which has no mute characteristic,setCaptureMutedis a no-op. A muted reconnect now resolves the device mute first and then lands paused.The reporter reproduced this on iOS app 1.0.586 / CV1 firmware 3.0.21. App-icon quick action Mute → Unmute followed by reopening the app restored capture.
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4916 -> 4926 | Keep muted-connect pause handling at the existing BLE admission boundary; splitting this controller is outside this regression fix.
Product invariants affected
INV-CAP-1: explicit user mute permits suspended audio, and unmute restores live delivery. The paused state stays visible while audio admission is denied, including after a relaunch or a failed start.
How it was verified
On the rebased head:
bash app/test.sh: 8,728 passed, 5 skipped. This Linux host used a localg++shim for the script's unavailableclang++.flutter test test/services/capture/: 441 passed.bash scripts/analyze_ratchet.sh: passed.make preflight,make mobile-verifyj5 (3/3), and the offline iPhone/BLE harness all passed.Tests
New coordinator tests cover:
The idle-resume, relaunch and foreground tests failed before their fixes.
UI evidence
UI-Evidence: none -- no widget or layout changes.
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code