Finish with nothing captured still jumps to Conversations and shows a 'Processing' row
Product impact
- Primary loop layer: Capture
- [ ] Involves data loss, failed capture, or broken sync/trust
Describe the bug
Finishing a capture in which nothing was heard (no segments, no photos) still runs the process stage: the optimistic "Processing" placeholder is added and the Live page switches to the Conversations tab. The placeholder goes away only when the server answers that there was nothing to process, so the user briefly sees a conversation that will never exist, on a tab they did not ask for.
To reproduce
- Start listening (phone or pendant) and stay silent.
- Open the Live page and tap Finish.
Current behavior
The app lands on Conversations with a "Processing" row that then vanishes.
Expected behavior
With nothing heard there is nothing to process: no placeholder, and the user stays on (or returns to) Home.
Evidence
lib/services/capture/capture_coordinator.dart:1937—_reduceFinishemitsProcessConversationStagewhatever was captured.lib/services/capture/capture_controller.dart:3300—forceProcessingCurrentConversationadds the optimistic placeholder unconditionally.lib/pages/conversation_capturing/page.dart:104—_stopConversationalways switches to Conversations.
Suggested fix
Skip processing (and the placeholder) when the session has no segments or photos, and only switch to Conversations when something was heard.
Fix available
Fixed with a regression test on the fork branch design/v2-step0-tokens (043db6c3cc, 7a705870d9). The branch's Stop processes only when something was heard and returns to Home otherwise. It will be linked from the draft PR.
Found while testing the Omi v2 Flutter restyle on an iPhone, then confirmed against main at 32c2ed22cf.
Submitted fix with hermetic regression tests in #21324:
- Root Cause & Fix:
_stopConversationwas unconditionally invokingswitchHomeToConversationsTab(context)and triggering optimistic processing throughfinishCapture().- When nothing was heard (
provider.segments.isEmpty && provider.photos.isEmpty), we now skip tab bouncing and optimistic skeleton row creation: active recording is cleanly stopped/paused (stopStreamRecordingfor phone mic, orpauseCaptureon device) and the route pops back to Home directly. - When content was heard, full processing and transition to the Conversations tab are preserved.
- Hermetic Tests:
- Added regression test
with nothing heard, Finish saves nothing and stays on current Home tabtoapp/test/widgets/process_now_conversations_tab_test.dart(assertsforceProcessingCalls == 0and preserves current Home tab). - Added
a finish with nothing heard closes the page and stays on the current tabtoapp/test/widgets/capturing_finish_swipe_back_test.dart.
- Added regression test