Skip to content

fix(app): Finish opens the conversation, with Processing until it is ready - #25733

Merged
kodjima33 merged 3 commits into
mainfrom
mux/2026-11-18-finish-opens-conversation
Nov 19, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
mux/2026-11-18-finish-opens-conversation

Conversation

@kodjima33

@kodjima33 kodjima33 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Nik, TestFlight 1.0.593, pendant, conversations v3: on the live page he tapped Finish and "nothing happens and I just get redirected back to list of all conversations". The conversation showed up about 4 minutes later.

What prod shows for his tap (read-only, 2026-11-18 22:21 UTC):

  • No POST /v1/conversations came from his phone. A batch pendant's live page shows only the on-device preview (provider.livePreview), never provider.segments, so _stopConversation took the "nothing heard" branch. That branch does nothing for a pendant and pops to the list.
  • The recording was sealed in that same second by the server's own 120 s quiet timeout inside the open /v4/listen session, not by the tap. So the v3 recording never got v3_manual_end, and the derived conversation has manual_end=False.
  • The derived conversation (v3_derived) carries the recording in recording_pieces[].recording_id, which is already on the list wire. The duplicate legacy sync piece (conversations-v3 beta: sync pieces duplicate derived conversations; open rows with audio and no job #25728) carries no pieces and no v3 flags.

Base: in the last 48 h about 51 people reported missing, stuck or slow conversations, and 13 of them (28%) are in a refund, return or cancel thread (mobile-ux-agent runs/2026-11-18/analysis/voice.md).

Change

Finish now opens the conversation itself:

  • Content: preview lines count as something to process, so a batch pendant Finish runs the same finishCapture the Live Activity's Finish already runs (REST Process Now with CLIENT_FINALIZE; on v3, recording_short_path marks v3_manual_end).
  • Answer is a conversation (legacy live STT, phone mic): its detail page opens. The detail page already polls a processing conversation.
  • Answer is a v3 recording document: a small Processing page opens (FinishedCapturePage, OmiLoadingState "Processing conversation…"). It reads the list every 5 s and once on every resume, then replaces itself with the conversation whose recording_pieces hold that recording. Back goes to Home, where that conversation is the top row. After 20 min it stops polling and shows OmiErrorState "Still processing. It will appear on Home." with Back to Home. A resume still reads once.
  • Answer is the recording still in_progress (the server's no_content noop: no transcript and no stored audio): "Nothing to process yet." and back to Home, never a page that cannot resolve.
  • One Finish at a time: a guard plus isLoading on Finish and Wrap Up Now. A double tap sends one request and opens one page.
  • Repeat Finish: a client Finish records the preview's word count (noteClientFinish). A later Finish with no new words says "Nothing to process yet." and sends nothing. The server-close mark works the same way, and both are tied to the preview session.
  • Several conversations from one recording: it opens the newest, the one on top of Home.
  • Server closed the recording just before the tap, with no new preview words since (Nik's exact case): Finish opens that recording's conversation instead of finishing the new, empty one.
  • Nothing to process: the clock still restarts as today, with a quiet "Nothing to process yet.". New strings: that one, "Still processing. It will appear on Home." and "Back to Home", all 49 locales.
  • Episodes on (Wrap Up Now): same code path, same navigation.
  • Swipe back during Finish: still never pops Home (route.isCurrent guard kept).
  • Old backend: an answer without recording opens as a normal conversation. A failed Process Now (null) goes back to Home as today.

Plaud, Pocket and Fieldy all land on the recording's own page after Stop and show transcribing/summarizing there until the note fills in. This follows that pattern with Omi's existing components.

Files: app/lib/pages/episodes/live_episode_page.dart, app/lib/pages/episodes/finished_capture_page.dart (new; OMI_FINISHED_CAPTURE_MAX_WAIT_SECONDS shortens the wait in debug builds only, for simulator evidence), app/lib/services/capture/capture_controller.dart (lastServerClose, lastClientFinish), l10n.

No backend change; no deploy order. Finding left for a separate PR: the listen teardown finalizes with the default CAPTURE_END trigger even after the client sent finalization_reason: user_stop (backend/routers/listen/runtime.py:1487-1530 → backend/routers/listen/conversations.py:493 → lifecycle.request_finalization). So a phone Stop under v3 still yields manual_end=False. Changing it also flips run_now for that path, so it needs its own review.

Impact estimate

Trust and retention. Every pendant owner who taps Finish now lands on that conversation instead of an empty list. Measured base: about 51 people in 48 h reported missing, stuck or slow conversations, and 13 of them asked for a refund or return (voice.md). No conversion change is modeled.

Evidence

Finish before and after

Processing expired

Dark and largest text

Same scenario on main and on this branch (pipeline/scenarios/p1-finish-v3.sh, simulator, local backend), each run 3 times (light, dark, largest text):

check main this branch
after Finish Home list, capture not there Processing page
conversation arrives not on the list within 40 s page turns into it, no tap
Back n/a Home, the conversation is the top row
wait runs out (p1-finish-expired.sh, 15 s debug wait) n/a "Still processing. It will appear on Home.", Back to Home goes to Home

Synthetic parts: the capture transcript (a seeded in-progress row loaded into the capture, since a simulator has no pendant) and the derived conversation (seeded 4 s after Finish). Finish, Process Now on the seeded v3 recording document, list reads and the detail page are real. Video: mobile-ux-agent runs/2026-11-18/p1/demo.mp4 and demo.gif (30 s).

At ship

No flags. Nothing to calibrate.

Tests

  • app/test/widgets/finish_opens_conversation_test.dart: batch pendant Finish with only preview lines processes; target page per Process Now answer; Finish right after a server close opens that recording; nothing heard shows the notice and pops; the matcher picks the derived row over the recording document and the conversations-v3 beta: sync pieces duplicate derived conversations; open rows with audio and no job #25728 sync piece, and the newest of several; the Processing page swaps in place once listed and stops polling; a double tap sends one request and opens one page; a repeat Finish with no new words sends nothing; a recording answered still in progress says nothing to process; after the wait it shows the expired state and Back to Home goes Home; a resume after the wait reads once and opens. 4 of the original behaviour tests fail with main's live_episode_page.dart.
  • Also run: process_now_conversations_tab_test, capturing_finish_swipe_back_test, episodes_ui_test, first_capture_finish_result_test, conversation_detail_transcription_pending_page_test (64 total, green).

Not verified

  • A real batch pendant capture with on-device preview lines (no BLE on a simulator). It is covered by widget tests only. UNVERIFIED on device.
  • The legacy live-STT path opening its detail page on the simulator: the local backend 500s on processing in offline mode ("Shaped notes disabled"). The app then fell back to today's behaviour (back to Home). Covered by a unit test only.
  • At the largest text size the compact Back to Home button label ellipsizes ("Back to Ho…"), the shared OmiButton compact style.
  • The double-tap and repeat-Finish paths on a device (widget tests only).
  • Prod timing of recording_pieces on a freshly derived row: Nik's prod row has them. If a row first lands without pieces, the page waits until they appear.

Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5030 -> 5046 | two read-only marks (server close, client Finish) with their getters and a setter, used only by Finish; splitting the controller is out of scope for this fix

Product invariants affected

  • INV-CAP-1: Finish never pauses the pendant or drops audio. It only adds a Process Now request on the shipped Live Activity path, and the clock restart is unchanged.

Failure class (fixes)

Failure-Class: none

UI-Evidence: see the images above (.agent-artifacts/ui-evidence/mux-2026-11-18-finish-opens-conversation)

…ready

On a batch pendant the live page shows only the on-device preview, never
segments, so Finish took the "nothing heard" branch: no Process Now, no
manual end, and the page popped to the list. Finish now counts preview
lines as content, opens the conversation Process Now returns, and for a
v3 recording opens a Processing page that turns into the conversation
made from it (matched by recording_pieces) as soon as it is listed.
Finish right after the server closed the recording on its own opens that
one; with nothing to process it says so.
@kodjima33 kodjima33 added the mux-proposal Mobile UX improver (MUX) proposal; waits for Nik's ship label Nov 18, 2026
…ocessing page ends

Review fixes. Finish is guarded and both Finish buttons show loading while
it runs, so a double tap cannot pop Home before the conversation's page
opens. A client Finish records the preview's word count; a repeat Finish
with no new words says "Nothing to process yet." instead of sending
another request. A recording the server answers still in progress (nothing
it could process) says the same instead of waiting. The Processing page
uses OmiLoadingState, reads once on every resume, and after its wait shows
OmiErrorState "Still processing. It will appear on Home." with Back to Home.
@kodjima33
kodjima33 marked this pull request as ready for review November 19, 2026 01:28
@kodjima33
kodjima33 merged commit f3d991e into main Nov 19, 2026
61 of 63 checks passed
@kodjima33
kodjima33 deleted the mux/2026-11-18-finish-opens-conversation branch November 19, 2026 01:28
kodjima33 added a commit that referenced this pull request Nov 19, 2026
## Problem

Follow-up to #25733 (review should-fix). Finish records the preview's
word count before it sends Process Now. When Process Now gets no answer
(offline, a server error), nothing was processed. But the next Finish
saw no new words, said "Nothing to process yet." and sent nothing, so
the capture waited for the server's own quiet close.

## Change

`app/lib/pages/episodes/live_episode_page.dart`: the watermark is still
taken at the tap, so words heard during the request still count as new.
When Process Now returns no answer (`result == null`), the previous
watermark is restored. Nothing visible changes.

Spinner check from the review: the dark Processing screenshot shows a
single dot only because a still frame caught the start of the
indeterminate `CircularProgressIndicator` cycle, where the arc is almost
zero. The other dark run, captured at a different moment, shows a normal
arc (crops: mobile-ux-agent
runs/2026-11-18/p1/spinner-dark-vs-light-frames.png). Same widget and
colour in both themes. Not a defect, no change.

## Impact estimate

Trust: a Finish tapped while offline now works on the next try instead
of silently doing nothing. Base as in #25733: about 51 people in 48 h
reported missing, stuck or slow conversations; 13 asked for a refund or
return (voice.md). No conversion change modeled.

## Evidence

No visible change; widget test only.

## At ship

Nothing.

## Tests

- New: `a Finish that failed offline is sent again by the next Finish`
in `app/test/widgets/finish_opens_conversation_test.dart` (offline
Finish, then Finish again online: one more request and the Processing
page). Fails with main's `live_episode_page.dart`, passes here.
- Also run: the rest of `finish_opens_conversation_test`,
`process_now_conversations_tab_test`,
`capturing_finish_swipe_back_test`, `episodes_ui_test` (58 green).

## Not verified

- On device, offline then online (widget test only).

## Product invariants affected

- INV-CAP-1: no change to capture or audio; only whether a retried
Finish sends Process Now.

## Failure class (fixes)

Failure-Class: none

UI-Evidence: none -- no visible change; the fix only decides whether a
retried Finish sends Process Now


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/25743?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/25743?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F25743&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mux-proposal Mobile UX improver (MUX) proposal; waits for Nik's ship

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant