Repository navigation
Live words on the open conversation's transcript: no heading, aligned with the transcript - #26394
Merged
Merged
Conversation
On an open conversation's Transcript tab the live words sat under a "Just now, on this phone" heading and 16 pt further right than the transcript lines, because the page already insets the transcript and the live lines added their own inset. - LivePreviewTail takes showHeading and horizontalInset; the conversation page passes no heading and no inset. The capture page keeps both. - StreamedLinesTail (instant_live_text) drops its own side inset. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
The instant_live_text widget test can write a picture of the open conversation's Transcript tab (SURFACE_RENDER_OUTPUT), and the before and after pictures for this change are tracked as UI evidence. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ctor LivePreviewTail.continuingTranscript carries the three settings the conversation page needs (no heading, no side inset, no bottom inset), so conversation_detail/page.dart does not grow. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
Nizarius
added a commit
that referenced
this pull request
Nov 27, 2026
…il reaches the first summary (live_words_cascade) (#26473) ## What changed and why `live_words_cascade`: one per-account flag store rule (the family of #26348), app and backend, inert for an account its rule does not admit. No rule exists for it. The page of a conversation in progress went separately in #26467; this is the live-words half of the same work. Builds on `vendor_recognizer_on_opened_app`; its End parts also need `end_open_conversation`. - **Order.** Per stretch of audio time the grey live words show the provider's words where it has them and the phone's own recogniser's only where it has none (the reverse of today); stored text still replaces both. The phone's recogniser is not started for an account whose language is multi-language or outside its list. Its phrases are joined into one paragraph instead of one line each, and a line rebuilt from part of its words no longer starts with a space. - **How long a grey word stays.** Until a stored line covers its moment of audio (2 s reach) or, where stored text exists to compare with, until it is five minutes old. This replaces, under the flag, the rule that dropped every live line older than the last stored line minus 10 s. A conversation that has ended keeps the live words of its own time range on its page by the same rule. - **An End cuts the live words** at the End instant (the `X-Omi-Ended-At` time), per word, for every screen, and the phone tells the display connection (`{"type":"end"}`), so the provider's line in progress breaks there. - **The End's tail reaches the first summary.** The End request carries `live_tail`, the words shown for the conversation being ended (at most 600 words). The backend checks and bounds it, keeps it encrypted with the stored End and nowhere else, and adds the words no stored line covers to that conversation's notes prompt, marked as a draft. The count the notes read and the time of its first word are stamped on the conversation; the late-speech rewrite rule takes stored words that land in that stretch to be the same speech, up to that count, and a summary pass still running when that speech lands settles instead of writing the notes again. Speech from before that stretch that lands late counts in full, as before. **Trust boundary, stated plainly.** `live_tail` makes phone-authored text an input to one model prompt for an admitted account. That is a deliberate exception to the rule that client-authored text is display only, which `tests/unit/test_client_processing_trust_boundary.py` proves for `client_processing`; that field and that test are untouched. The bounds: only under the flag; a separate request field hidden from the published schema; 600 words / 6,000 characters / 200 lines; control and bracket characters removed; only words that start before the End, at most six hours before it and inside the conversation; dropped wherever stored text exists; never written to a conversation, a recording row or a transcript; one reader (the `transcript=` argument of the notes prompt). What the notes say (title, summary, the action items they propose) can therefore reflect those words, and so can whatever reads the notes; the discard and wake-word checks, memory extraction and search read the stored transcript alone. Change note: `backend/docs/listen_pusher_pipeline/changes/2026-11-26-live-words-cascade-end-tail-title-at-end.md`. ### Known limits - An End with a tail must reach a backend that has this change: an older one does not take `live_tail` for part of the app's Finish body and answers 404 where it would have finished the recording. The flag tool's live check refuses to admit accounts before the serving commit includes the key. - The stored tail is removed when a later summary pass finds it covered, when the credit is used up, or at the owner's next End with a tail (Ends one to eight days old). There is no timed sweep, so a tail whose speech never lands can stay (encrypted, at most 6,000 characters). - A summary pass writes the tail count to the conversation before the notes are written; a grouping pass that had already loaded that conversation loses its commit race once and is retried. - A grey word that stored text never covers sits under newer stored lines for up to five minutes, because grey lines are drawn after the transcript. - `/v4/live-words` still needs a load-balancer path rule before a wide ramp (unchanged). ## Product invariants affected - INV-CAP-1: `app/lib/services/capture/capture_controller.dart` and `capture_composition.dart` gain one optional callback that an End calls after it has sealed the open phone file. With `live_words_cascade` off the callback returns null and the End request is byte-for-byte what it was; capture, upload and receipt handling are unchanged in both modes. - INV-MEM-4: `backend/utils/conversations/process_conversation.py` changes in one argument of the notes prompt builder. Memory intake, consolidation and promotion are untouched; memory extraction reads the stored transcript, never the tail. - INV-TASK-2: the same one-argument change. No capture-policy outcome, Candidate path or writer changes; action items the notes propose go through the path they went through before. For an admitted account the notes prompt can contain the tail's words, so a proposed item can come from them. ## How it was verified - On an iPhone 16 Pro with an Omi pendant against a local prod-parity stack, flags selected through the development override: - cascade: twenty minutes of real speech with the provider's words replacing the phone's on screen (local counters: most of the phone recogniser's words replaced, a handful only it had, no recogniser restart); - one End pressed mid-speech: every live line left the list at the End instant, the display stream logged its line break at the same moment, the server stored the tail and the summary pass read the uncovered part; - On the local stack with a probe and fresh accounts (`live_tail` sent with an End, then the same speech uploaded): the first summary held facts that existed only in the tail, the stored transcript held only the batch text, and the landing 6 s later left the summary as it was (no rewrite). The same run without a tail wrote a second summary. - Backend: the changed and neighbouring test files one file per process; `backend/scripts/typecheck.sh`; `scan_async_blockers.py`. - The phone and stack runs above were made before this branch was rebased onto #25992, which moved the grouping pass's planning loop into `_plan_projection`; the tail credit was carried into it unchanged and the backend tests were run again afterwards. - App: `flutter test` on the live-preview, unit, widget, page and provider folders; `dart analyze lib` no errors. Not verified: Home's Listening row, the Listening page and the next conversation right after an End with speech continuing (the test phone was restarted seconds after the End); the five-minute rule, the joined paragraph and the indent fix on a phone's screen (unit tests only); a language outside the phone recogniser's list on a phone; a landing that brings substantially more than the tail on a stack (unit test only); the per-account form of the flag against a real flag store (the local stack uses the development override). ## Tests - `backend/tests/unit/test_reliability_experiment_live_words_cascade.py` (43 cases): per-account switch, payload bounds and plain text, encrypted storage with the End, covered words dropped, transcript never written, the prompt as the only reader, rewrite accounting, the settle rule, removal of stored words, the display line break. - `app/test/services/live_preview/live_words_cascade_test.dart` (46 cases): reversed merge, joined paragraph and spacing, language rule, counters, watchdog, the End cut per word on the inputs of all three screens, a conversation's own time range, the stored-text-or-five-minutes rule, the tail payload and the End request body, the End message on the display connection. ## UI evidence UI-Evidence: none -- the grey live words keep the look merged in #26394; what changes is which words are listed and for how long (asserted in `live_words_cascade_test.dart`), and the screenshots taken on the test phone show real speech, so they are not published. ## Failure class (fixes) Failure-Class: none Line-Count-Exception: app/lib/backend/http/api/conversations.dart | 1780 -> 1787 | one optional field on the End request beside the header it travels with Line-Count-Exception: app/lib/pages/conversation_detail/page.dart | 1874 -> 1900 | the flag-gated branch that picks a conversation's live words by its time range, inside the function that already picks them Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5138 -> 5149 | one optional callback an End calls after sealing the open phone file Line-Count-Exception: backend/routers/conversations.py | 3358 -> 3365 | passing the optional tail to the End's stored cut Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3614 -> 3622 | one argument of the notes prompt builder and its comment Line-Count-Exception: backend/utils/conversations/v3/service.py | 2013 -> 2051 | the tail credit beside the rewrite rule it adjusts and the tail read beside the notes call it feeds 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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 changed and why
On an open conversation's Transcript tab, the live words (grey text that has not reached the stored transcript yet) now continue the transcript: the "Just now, on this phone" heading is gone there, and the lines start at the same left edge as the transcript lines.
Before, the lines sat 16 pt further right than the transcript, because the page already insets the transcript and the live lines added their own inset on top.
LivePreviewTailgets a second constructor,LivePreviewTail.continuingTranscript, with no heading, no side inset and no bottom inset. The conversation page uses it; the default constructor keeps today's look.StreamedLinesTail(the server-streamed lines ofinstant_live_text, used only on the conversation page) drops its own side inset.Product invariants affected
none
How it was verified
flutter test test/widgets/instant_live_text_test.dart test/widgets/streamed_lines_on_open_conversation_test.dart test/widgets/live_preview_render_test.dart: 133 passed.flutter analyzeon the changed files: no new issues (one existing info inpage.dart, on a line this change does not touch).local_devbuild with this change on an iPhone 16 Pro with an Omi pendant, against a local stack: the open conversation's Transcript tab loads and the stored transcript lines sit at the page inset.Not verified: the live words themselves with the new look on the physical phone. Nobody was speaking while the open conversation's Transcript tab was on screen after the install, so the tab showed stored lines only.
Tests
app/test/widgets/instant_live_text_test.dart, case "on: they show under the server text when the latest speech came from this install": asserts that the heading is absent on the conversation page and that the live line starts at the page's 16 pt inset. The same test can now write a review picture of the screen whenSURFACE_RENDER_OUTPUTis set (shared helpertest/support/surface_render.dart); without it the test's metrics are unchanged.live_preview_render_test.dartstill asserts the heading on the capture page.UI evidence
Widget-test renders. The test engine draws the stored transcript text as blocks; the grey line is the live words.
Before (main):
After:
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code