Skip to content

feat(app): a live conversation's transcript follows its newest line; flags no_live_player and title_at_end - #26467

Merged
Nizarius merged 3 commits into
mainfrom
feat/live-conversation-page
Nov 27, 2026
Merged

Nizarius merged 3 commits into
mainfrom
feat/live-conversation-page

Conversation

@Nizarius

Copy link
Copy Markdown
Collaborator

What changed and why

How the page of a conversation in progress looks. One part has no flag; the other two are per-account flag store rules (the family of #26348), off by default, and no rule exists for either.

  • Transcript follows its newest line (no flag). The conversation page's Transcript tab opens already at its newest line while the conversation is in progress, with nothing painted on the way there, and follows new text while the reader stays at the end. A reader who scrolled up is left in place and gets the jump button. The clear space under the last line is shorter while live. A saved conversation opens at its first line as before. On the Listening page, a slow drag back to the end now resumes the follow.
  • no_live_player (app). No audio player on a conversation still in progress: the bar is Ask Omi and, where it applies, End Conversation; a tap on a line does not seek and no audio is loaded. The player returns when the conversation ends.
  • title_at_end (app + backend). An open conversation is not named before it ends. The backend returns from the live-title step before claiming an attempt (no model call, no title written; the outline names the conversation at its end) and the app reads "Listening" for any conversation in progress.

The two flags remove behaviour production has today, which is why they are flags; the follow is not.

Known limits

  • title_at_end: a name the server already stored for an open conversation stays in the page's edit field (tapping the title shows it); surfaces other than Home and the page header were not searched for a live conversation's name.
  • The backend half of title_at_end works only on a backend release that includes this change; the app half alone already shows "Listening".

Product invariants affected

None. No capture, upload, memory or task path changes; the backend change is one early return in the live-title step.

How it was verified

  • On an iPhone 16 Pro against a local prod-parity stack, with a conversation growing from speech fed without sound, flags selected through the development override: the Transcript tab opened at its newest line and followed it; with the flags on, a conversation in progress showed "Listening" on Home and on its page and had no player in the bar; an ended conversation still showed its name and its player.
  • On the local stack: an open conversation holding more speech than the live-title threshold had no title and no live-title attempt recorded.
  • The tests below on this branch merged with current main.

Not verified: the per-account form of the two flags against a real flag store (the local stack uses the development override); Android on a device.

Tests

  • app/test/widgets/transcript_follow_open_conversation_test.dart: opening at the end with no visible scroll, the follow, a reader who scrolled up, the jump button, the shorter foot, a saved conversation opening at its first line.
  • app/test/widgets/live_conversation_bar_and_title_test.dart: the bar and the header with each flag on and off.
  • Cases in app/test/widgets/transcript_test.dart, app/test/pages/conversations/home_v3_test.dart and app/test/unit/reliability_experiments_test.dart.
  • backend/tests/unit/test_reliability_experiment_title_at_end.py (3 cases).

UI evidence

Widget-test renders of the bar under a conversation in progress.

no_live_player off (as on main), the player shows:

Bar of a conversation in progress with the player

no_live_player on, Ask Omi only:

Bar of a conversation in progress without the player

No picture for the transcript follow: it is a scroll position (asserted in transcript_follow_open_conversation_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/widgets/conversation_bottom_bar.dart | 1516 -> 1527 | the flag check that leaves the player out while a conversation is in progress
Line-Count-Exception: app/lib/widgets/transcript.dart | 1601 -> 1664 | placing the list at its end before first paint and the follow, in the widget that owns the scroll position
Line-Count-Exception: backend/utils/conversations/v3/service.py | 2010 -> 2013 | one early return in the live-title step for an account with the flag

🤖 Generated with Claude Code

…experiments no_live_player and title_at_end

The conversation page's Transcript tab opens at its newest line while the conversation is in
progress and follows new text; the foot under the last line is shorter while live. Not behind a flag.

no_live_player (app): no audio player on a conversation still in progress.
title_at_end (app + backend): an open conversation is not named before it ends; the backend skips
the live-title step for the account and the app reads Listening for any conversation in progress.
Both are per-account flag store rules, off by default.

Failure-Class: none
…on page

Two widget tests can write a picture of their screen when SURFACE_RENDER_OUTPUT is set.

Failure-Class: none
@Nizarius
Nizarius merged commit d3910c3 into main Nov 27, 2026
70 checks passed
@Nizarius
Nizarius deleted the feat/live-conversation-page branch November 27, 2026 01:43
Git-on-my-level added a commit that referenced this pull request Nov 27, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant