Repository navigation
fix(capture): finish with nothing heard stays on Home without processing row (#19235) - #21324
Conversation
…and stays on Home
…b in swipe back test
|
Thanks @Dragonire9 — this cleanly fixes #19235 and matches the issue's expected behavior. Reviewed against the capture coordinator and controller at this head. app/lib/pages/conversation_capturing/page.dart — the content path is unchanged (finishCapture + switchHomeToConversationsTab), and the new empty path is sound: stopStreamRecording() dispatches PhoneStopRequested, which for a live phone session runs the full teardown in _stopPhoneLiveBody (WAL flush, session roll, mic stop, socket stop) and is a safe no-op when nothing is live; pauseCapture() maps to _reducePause, which is well-defined for every capture phase. The canPause && !isPaused guard also correctly makes this idempotent when the pendant is already paused, and photo devices (OpenGlass / Ray-Ban Meta) are excluded from pausing by the shared canPause rule, consistent with the live card. Skipping processing when segments and photos are both empty mirrors the existing hadContent check in _suspendPendantBody, so the pattern has precedent. app/test/widgets/capturing_finish_swipe_back_test.dart — good regression coverage: the new test asserts the page closes and the current tab is preserved, and backfilling a segment via the heard toggle keeps the existing swipe-back tests exercising the content path. app/test/widgets/process_now_conversations_tab_test.dart — the forceProcessingCalls == 0 assertion is exactly the right check for "no empty Processing row", and the heard toggle on _pumpCapturingPage is a tidy harness change. Two non-blocking questions for a maintainer:
Nice work on the tests especially — they're hermetic and assert the right things. [Feedback is AI-generated on the maintainer's behalf.] by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@Git-on-my-level Thank you for the thorough review and validating the capture coordinator and hermetic tests! On the two product questions:
Ready for merge whenever convenient! |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile bug fix for #19235: verified main still unconditionally calls finishCapture()+switchHomeToConversationsTab on an empty capture; fix is scoped (57 lines) with new regression tests covering heard vs. silent finish. Confidence 5/5.
|
Thanks for reviewing and merging! 🙏 Bounty Payout Details: |
Summary & Product Impact
Resolves #19235.
When finishing a capture session where nothing was heard (both
segmentsandphotosare empty):_stopConversationunconditionally invokedswitchHomeToConversationsTab(context), bouncing the user to the Conversations tab even if they had captured nothing.finishCapture()triggered the processing stage, adding an optimistic "Processing" placeholder skeleton row that would flash on screen and vanish once the backend returned that there was nothing to process.Changes
app/lib/pages/conversation_capturing/page.dart:_stopConversation, checkprovider.segments.isNotEmpty || provider.photos.isNotEmpty.await provider.finishCapture(),switchHomeToConversationsTab(context)).finishCaptureand tab switching: cleanly stop/pause active live recording (stopStreamRecording()for phone mic, orpauseCapture()if supported on device) and pop the route back to Home without bouncing tabs.app/test/widgets/process_now_conversations_tab_test.dart:'with nothing heard, Finish saves nothing and stays on current Home tab': verifiesforceProcessingCalls == 0(no optimistic processing row), preserves the existing Home tab, and closes the capturing page._pumpCapturingPageharness helper withheardtoggle (defaults totrue).app/test/widgets/capturing_finish_swipe_back_test.dart:'a finish with nothing heard closes the page and stays on the current tab'.Verification