Skip to content

feat(mobile): live preview polish — Home row line, Continues chip, on-device live notes, transcript divider - #23805

Merged
Git-on-my-level merged 14 commits into
mainfrom
lane/live-preview-polish
Oct 27, 2026
Merged

Git-on-my-level merged 14 commits into
mainfrom
lane/live-preview-polish

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Live preview polish for batch-lane sessions (preview admitted, no cloud live transcript), matching David's approved mockups for the Home row, the listening header, the Summary tab and the Transcript tab — plus notes drafted on this phone from the preview text. Preview and notes text never leaves the device.

  • Home "Listening now" row (option E) — same row size. The 36 pt tile holds the breathing live dot over the running length in whole minutes (22m, tabular figures, scaled down rather than clipped). Line one is the episode title, or "Listening now" before one exists. Line two is the newest preview words, trimmed at the start so the latest words stay visible, or today's subtitle without the duration when there is no preview text. No colour; the spoken label keeps the page's exact length.
  • Capture duration — Home and detail now share the capture start owned by the app, including when either surface first mounts after the server timestamp has moved. Server episode start is a fallback until local capture start is known; reconnects/episode rotations cannot reset the running duration. Explicit Wrap up and new phone captures still reset the anchor. Regression reproduces capture start 08:11:57Z, server start 08:20:02Z, and elapsed 8m 24s.
  • Listening header — the centred "Open Previous Episode: …" button is replaced by a small pill under the duration line: link glyph + Continues “<title>”, opening the same page. The metadata is one calm line: green dot + length, then grey · since 3:12 PM and participants, ellipsized instead of wrapping; the moment count moves to the Moments section header. The pinned header (title, line, tabs) is opaque in the page colour with no scrolled-under tint, so Summary content no longer reads as scrolling under the tab bar.
  • Summary, "So far" — for a preview-admitted session with no server running notes, the misleading "Running notes aren't updating." line is gone; instead up to 4 bullets are drafted on device, tagged On this phone, with the footnote "Drafted on your phone as you talk. The full notes arrive with the final transcript." Once server running notes exist they replace the drafts. Either way the card stays compact: at most 4 bullets (the newest server notes; the full notes arrive at wrap-up), and the On this phone tag shows only beside drafted bullets.
  • On-device live notes engine (iOS) — Apple Foundation Models via the new com.omi/live_preview_notes channel (LivePreviewNotesPlugin.swift), reusing OnDeviceOverflowPlugin's availability checks and patterns. Re-summarizes at most every 60s and only after ≥40 new preview words, counted with an uncapped monotonic session total even after line eviction; the prompt is capped to the newest ~1500 words (AFM's context budget is prompt plus completion); the schema bounds the output to 4 bullets × 12 words (maximumElements plus a clamp); generation runs detached off the main thread and a busy draft is dropped. A session generation invalidates late successes and errors after capture/account/silence clears, including clear-and-refill in one notification. Native input is also character-bounded, completion reserves 160 tokens, and the prompt forbids invented speaker labels. Unavailable (older iOS, Apple Intelligence off) or erroring hides the bullets behind the quiet line "Notes start when the final transcript arrives." — no cloud fallback. Android ships no engine in this PR (same quiet line). Preview and notes are never uploaded, stored or logged, and clear on capture stop, account change and the controller's own conversation-gap clear. Telemetry: Live Preview Notes (engine, outcome, latency_ms, bullet_count — never text).
  • Summary, "Live" card — title Live with an Open transcript link that switches tabs; the body is the newest preview text, at most 3 lines, volatile tail lighter; trimmed at the start so the newest words stay; no speaker label. It replaces the old "Live Transcript" card (generic Speaker/Others labels, "Open All") for preview and cloud sessions alike.
  • Transcript tab — final segments (with speakers) first, then a thin Live on this phone divider, then the preview lines the finals do not already cover (union of final audio-time intervals, with timed-word coverage for partial hand-off), volatile tail lighter. The uploading pill and "Chunks pending" line are replaced by one quiet line — clock glyph + Final transcript about <N>s behind (N = pending-upload duration rounded to 10s) or Final transcript catching up when unknown; it sits under the transcript on the episode page; failed/retrying uploads keep today's actionable pill. The old "Live preview / On-device preview…" header is gone (the divider replaces it).
  • No engine — the calm "Transcribing…" spinner state becomes the "Recording safely" card at the top of the Transcript tab (outline mic glyph, "Your words show up here a minute or two after you say them."), with a Turn on live text link only where the platform can deep-link to its speech settings (a denied speech permission on either platform; other reasons omit the link).
  • Footer — "Wrap Up Now" → "Wrap up now" (all other locales were already sentence case); "Omi wraps this up when you move on" unchanged.

All new strings go through l10n in all 49 locales (13 keys added, 6 retired with their last in-tree callers, 1 sentence-cased), keeping the ARB placeholder structure. The visual pass adds no strings.

Largest text (AX5, 3.1×): Home line two takes two lines; card titles and their tag/link stack; the shared Summary/Transcript tab labels stop growing at 1.6× (as system tab bars do) and the pinned live header at 2× so the tab content keeps the screen.

Evidence

Widget-render harness (app/test/widgets/live_preview_render_test.dart), iOS light at 390×844 plus one dark Summary, at 9883b029a8dc.

Home: title + preview Home: before a title Home: no preview Home: largest text
Home row with title and preview Home row before a title Home row without preview text Home row at the largest text size
Summary: on-device notes Summary: notes unavailable Summary: server notes (6 → newest 4) Summary: dark
Summary with on-device notes Summary with notes unavailable Summary with server notes Summary dark
Transcript: final + preview No engine Summary: largest text
Transcript with final and preview lines Recording safely card Summary at the largest text size

Correctness review

  • Groundwork froze notes after 1,500 input words and could render an old session's late notes. The controller now owns a monotonic new-word total and explicit display-session generation; notes fence both successful and failed completions.
  • Groundwork only kept an already-seen earlier duration anchor. A freshly mounted row still chose the shifted server timestamp. Local capture time now has authority from the first read, with server time only a fallback.
  • Incremental list refresh only upserted completed rows: discarded/bridged donors omitted by the server stayed in Home. Successful refresh now reconciles absence inside its authoritative page window, retaining older pages, concurrent live updates and rows on failed/truncated reads. The conversation model preserves sync_merged_into; merged/deleted rows cannot remain in list/search/group projections or be revived by stale sync upserts. Ordinary discarded visibility continues to honor Show discarded. The pending-sync completion path observes hidden/redirected results before filtering result pointers and refreshes Home; sync result rows re-read earlier pointer IDs so donors can retire after a later bridge. Redirects collapse to one canonical result pointer, later discarded results supersede earlier visible ones, and an in-progress survivor is not inserted as a second completed Home row.
  • Groundwork used normalized text matching for transcript replacement, which hid legitimate repeated phrases and duplicated changed recognition. Native iOS now supplies audio/word timestamps, Android 14+ requests word timing when supplied by its recognizer, and downloaded Whisper carries window audio time. Input audio timestamps cross the preview-only channel, independently of delayed recognition results. Coverage unions final intervals, preserving holes when batches arrive out of order, and removes covered words from partial lines. Final segments sort at ingestion. Unknown timing is retained conservatively rather than guessed or matched by text.
  • All corrections are app-only; no backend, firmware or workflow edits. The visual pass (Opus) changes presentation only and wires the UI to the logic above.

Luna review follow-up (reviewed base 9883b029a8dc)

All four FIX-FIRST findings are repaired without restyling Opus's UI:

  1. Unspaced-language notes budgets: shared Dart LivePreviewWordBudget now counts Han, Kana, Hangul-syllable and Thai runs at one word per two graphemes (rounded up), and other non-whitespace runs at one word; script transitions end a run. The cumulative controller count, 1500-word prompt tail and 12-word bullet clamp use that same policy. Swift mirrors the character budget for both input and output. Mixed-script text cannot hide an arbitrarily long run inside one whitespace word. characters is now an explicit dependency, at its already locked version.
  2. Unknown final-transcript lag: zero pending-upload seconds means duration is unavailable while preview text remains uncovered by finals. The existing Final transcript catching up string now appears in that state, updates directly on preview changes, and disappears when there is no preview or finals cover it. Known small lag keeps its existing threshold; failed/retrying WALs retain their actionable indicator.
  3. Continues tap target: a transparent minimum 44×44 pt target surrounds the unchanged, centered pill. Regression taps above its visible bounds and verifies navigation.
  4. Start trimming: prefer whitespace word boundaries, then fall back to complete graphemes when no word cut fits. Japanese/Chinese, combining marks, surrogate pairs and ZWJ emoji retain the newest text and leading ellipsis; volatile-run styling is retained.

Validation for the follow-up:

  • Focused Dart run: flutter test test/services/live_preview/ test/widgets/start_trimmed_text_test.dart test/widgets/live_preview_render_test.dart test/widgets/episodes_ui_test.dart — 269 passed.
  • Render suite with evidence enabled — 100 passed across iOS/Android and light/dark. Follow-up captures inspected visually; CJK evidence uses a host font in the test harness only.
  • ruby app/ios/test/live_preview_notes_plugin_test.rb — 3 tests, 36 assertions passed, including executable native unspaced/mixed-script bounds and real iOS SDK type-checking.
  • Analyze ratchet, make preflight, and scripts/pr-preflight --pr-body-file <body> — passed.
  • No new UI strings; existing English/localized copy is reused.
  • Device-level verification remains unavailable: agent-flutter connect found no running Flutter VM service. Evidence is from the widget harness; AFM generation has not been run on a physical phone.
Unknown final-transcript duration Japanese Home preview Unchanged Continues pill
Final transcript catching up Start-trimmed Japanese preview Continues pill with accessible tap target

Backend follow-up: mutable started_at

Dogfood evidence supplied for this PR: the same live row had created_at/real capture start 08:11:57Z but started_at advanced to 08:20:02Z. Static code explains a likely mechanism: backend/routers/listen/transcripts.py's legacy writer sets data['started_at'] = first_audio_byte_timestamp + raw_segments[0]['start'] whenever the stored row has no transcript segments (around lines 1023–1028 at this branch's base). Preview admission intentionally suppresses live transcript segments until WAL/batch pieces arrive, extending that empty-row interval. The v2 pinned-timeline writer is a separate path. This is a code-backed hypothesis, not a production trace proving which writer changed this exact row. Follow-up: correlate that row's writer/timeline version and first raw segment; preserve the capture origin while appending the first delayed batch speech. No historical data or backend code is changed here.

Product invariants affected

  • INV-CAP-1 — preview timing is metadata on the existing display-only audio copy. Capture/WAL custody, socket admission, BLE subscriptions and durable delivery are unchanged; transcript ordering is applied at the existing projection boundary.

Validation

  • Focused Dart/widget suites: notes cadence, >1,500 words, eviction, old success/error after account reset, silence clear-and-refill, time coverage and partial words, out-of-order finals, identical phrases at distinct times, missing timing, local duration and fallback, merged/discarded donors, failed refresh preservation and page boundaries, pending-sync visibility, server notes precedence, Home and episode surfaces.

  • Native Swift notes policy/schema/privacy and preview plugin SDK type-check suites pass (6 tests, 62 assertions).

  • Focused Dart/widget run: 368 tests passed; a separate final widget-only run passed 82 tests.

  • Android JVM: :app:testDevDebugUnitTest --tests '*LivePreview*' — 11 tests passed (JDK 21, cached Gradle 8.14.2; this worktree has no gradlew).

  • bash app/scripts/analyze_ratchet.sh, make preflight and scripts/pr-preflight --pr-body-file <body> — passed, all 42 selected guards in each lane, without exceptions.

  • bash app/test.sh — 7,734 passed, 9 expected skips from the final source snapshot.

  • Visual pass: live_preview_render_test.dart 68 passed (iOS/Android × light/dark, writes the evidence above); touched Home/episode/capture/perf widget suites 322 passed; conversation-detail suites (shared tabs) 662 passed; app/scripts/analyze_ratchet.sh passed; mobile UX contract check clean on every touched file; l10n.py check ok.

Limitations: AFM generation and recognizer timestamp alignment have not been exercised on a physical phone in this review. Android 13 or recognizers omitting optional word timing retain untimed preview conservatively; the API cannot prove its coverage. No cloud fallback. UI evidence above is from the widget harness, not a device; the AX5 renders approximate iOS's largest size with a linear 3.1× text scale.

Failure-Class: FC-derived-list-recomputed-before-sources-pruned

🤖 Generated with Claude Code

…vice live notes, transcript divider

Home's listening row keeps its layout and gains the session duration plus the
newest preview line in its subtitle; the duration no longer resets when the
server rotates the episode mid-capture (LiveStartAnchor may only move the
running start earlier within a capture) and the row formats it exactly as the
live page does (OmiDuration.live, seconds retained). The live header adds
"· since <time>" and replaces the full-width previous-episode button with a
small Continues pill.

The Summary tab stops warning preview sessions that their running notes
"aren't updating" (they were never supposed to run): instead, up to four
twelve-word bullets are drafted on device — Apple Foundation Models on
iOS 26+ over the new com.omi/live_preview_notes channel, schema-bounded,
off the main thread, throttled to once a minute after 40 new preview words,
prompt capped to the newest ~1500 words, dropped while busy, never uploaded,
stored or logged — tagged "On this phone" until the server's running notes
arrive. Unavailable or erroring shows the quiet "Notes start when the final
transcript arrives." line (Android too, which ships no engine this release);
telemetry is Live Preview Notes (engine, outcome, latency_ms, bullet_count).

The Summary "Live" card shows the newest preview text (no speaker label)
with an Open transcript link. The Transcript tab puts final segments first,
then a "Live on this phone" divider, then the uncovered preview lines, with
one quiet "Final transcript about Ns behind" line replacing the uploading
pill; the no-engine state becomes the "Recording safely" card with a
settings link only where the platform can deep-link to its speech settings.
"Wrap Up Now" is sentence-cased in English.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T14:44:43.055021Z 3aa3b1c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agentic security review of the live-preview polish diff found one medium session-isolation issue in the new on-device notes path. Other review modules (API/RPC privilege, config/template injection, platform patterns, agent tooling, filesystem boundary, privacy guard) did not produce reportable findings.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

Comment on lines +185 to +186
final drafted = await engine(input, preview.language);
if (_disposed || _preview != preview || preview.lines.isEmpty) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Agentic Security Review
Severity: MEDIUM

An in-flight on-device notes draft is not bound to a capture generation. After await engine(...), the only invalidation checks are dispose, a different controller instance, or empty preview lines. endCapture() (stop and account change) clears lines and resets displayed bullets, but the same LivePreviewController is reused. If a new session already has preview text when the old Future completes, bullets drafted from the previous transcript are written onto the new session's Summary tab.

Impact: On a shared device, conversation-summary bullets (up to four 12-word lines) from account A's live preview can appear in account B's UI after switch-and-recapture while AFM is still running. Same-user consecutive captures can also show the previous session's notes until the next successful draft. The text stays on-device and is not uploaded.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 7846364. Configure here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 784636494c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +165 to +166
final words = LivePreviewNotesPolicy.wordCount(LivePreviewNotesPolicy.inputText(preview.lines));
if (words - _wordsAtLastRun < LivePreviewNotesPolicy.minNewWords) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Track new words independently of the capped prompt

During a continuous session, inputText() eventually reaches its 1,500-word cap, so this count stops increasing even as new speech replaces older words. Once _wordsAtLastRun exceeds 1,460, the 40-new-word condition can never pass again, permanently freezing the running notes until a reset. Count incoming words independently of the bounded prompt window and apply the cap only to the text sent to the engine.

Useful? React with 👍 / 👎.

Comment on lines +143 to +146
if (preview.lines.isEmpty) {
_stopCadence();
_reset();
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset notes explicitly at conversation-gap boundaries

After a conversation-length silence, LivePreviewController._onResult() clears the old lines and adds the first new line before calling notifyListeners(). Consequently, this listener never observes an empty list at that boundary, so the previous conversation's bullets and _wordsAtLastRun remain. The Summary can keep displaying unrelated notes, and drafting is suppressed until the new conversation exceeds the previous word count by 40. Expose a conversation generation or explicit reset notification rather than inferring every boundary from an empty list.

Useful? React with 👍 / 👎.

Comment on lines +185 to +190
final drafted = await engine(input, preview.language);
if (_disposed || _preview != preview || preview.lines.isEmpty) return;
_wordsAtLastRun = words;
final bullets = LivePreviewNotesPolicy.clamp(drafted ?? const <String>[]);
// Unavailable drafts nothing: the quiet line replaces the bullets.
_bullets = bullets;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fence draft completion against capture resets

If capture ends while a draft is pending and the same controller is re-admitted and receives new words before that draft completes, this guard accepts the old result: _preview still references the same controller and its lines are nonempty again. The previous capture's bullets then appear in the new capture, and its word count overwrites the reset counter. Increment a notes generation on reset and require both success and error completions to match the generation that started the request.

Useful? React with 👍 / 👎.

Comment on lines +368 to +369
l10n.episodeLiveSince(dates.time(started)),
maxLines: 1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive the since timestamp from the running-duration anchor

When an episode rotates during continuous capture, the updated LiveStartAnchor deliberately retains the earlier session start, but started still takes the new episode's startedAt directly. The new label therefore contradicts the adjacent duration: a capture starting at 10:00 with a replacement episode at 10:10 reads Live · 15m · since 10:10 at 10:15. Derive this timestamp from the same resolved anchor used by EpisodePresentation.elapsed(episode, ...), rather than the current episode's start.

Useful? React with 👍 / 👎.

].join(' '));
final lines = [
for (final line in preview.lines)
if (_normalize(line.text).isNotEmpty && !covered.contains(_normalize(line.text))) line,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match complete words before hiding covered preview lines

In the hybrid transcript, this substring check hides short preview utterances merely because their letters occur inside an unrelated word in the final transcript. For example, a final segment containing We can discuss another option suppresses a new preview line No. because normalized another contains no, even though that response has not arrived in the final transcript. Match complete normalized tokens or enforce word boundaries before treating a preview line as covered.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 9 commits October 27, 2026 18:36
Count new preview words independently of bounded prompts; invalidate stale notes across display sessions. Prefer local capture duration, retire merged sync donors, and replace lexical transcript matching with audio-time coverage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tion

Keep the owning providers within the existing file-size budgets by extracting private projection helpers into library parts. Public capture and provider seams retain their behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the transcript projection part focused on ordered display state while the existing controller remains the owner of its list read seam.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep bridge retirement in the shared visibility projection and avoid inserting an in-progress survivor into the completed Home list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep a bounded per-line word high-water mark so repeated shrinking and expanding hypotheses do not manufacture forty new words for notes admission.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Retain ChangeNotifier notification authority in the owning classes rather than calling protected framework methods from extension parts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Remove the redundant widget-build sort now that final segments are ordered at ingestion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tity

Collapse redirected donor results onto one survivor and let a later discarded result retire an earlier visible pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 659d3df5b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +834 to +836
final coveredAfter = rawNewConversations.length >= _conversationPageSize
? rawNewConversations.map((c) => c.startedAt ?? c.createdAt).reduce((a, b) => a.isBefore(b) ? a : b)
: null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match the server's ordering when pruning refreshed history

When a full refresh page includes a recently uploaded recording whose startedAt is much older than its createdAt, this boundary can remove valid conversations from previously loaded pages. The production list endpoint uses get_conversations_without_photos(), which orders by created_at (backend/database/conversations.py:1943), whereas this pruning compares startedAt ?? createdAt. For example, an offline recording created today but started last month moves coveredAfter back a month, causing loaded conversations from yesterday that legitimately fall outside the first 50 results to disappear from Home. Compute both the page boundary and the removal predicate using the server's pagination ordering, rather than the display timestamp.

Useful? React with 👍 / 👎.

Comment on lines +424 to 427
if requestClock?.origin == nil {
requestClock?.origin = startedAt
}
request.append(buffer)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve audio-clock gaps within SFSpeech requests

On the iOS SFSpeech path, if preview overload drops audio during a request, retaining only the first chunk's startedAt assigns incorrect capture times to every subsequent word. LivePreviewController._flush() explicitly drops whole chunks at its in-flight limit, but SFSpeech receives the remaining PCM concatenated without those gaps, and the result handler adds its sample-relative offsets to this single origin. For example, dropping two seconds makes a word actually spoken at seven seconds appear at five seconds, allowing LivePreviewCoverage.uncovered() to hide it when the final transcript has only reached six seconds. Preserve a mapping of accepted audio offsets to capture times, or rotate the recognition request when a timestamp discontinuity occurs.

Useful? React with 👍 / 👎.

Comment on lines +67 to +68
child: Container(
padding: const EdgeInsetsDirectional.fromSTEB(OmiSpacing.xs, 4, OmiSpacing.sm, 4),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the minimum touch target for the previous-episode link

At normal text scaling, replacing OmiButton.tertiary with this unconstrained InkWell shrinks the previous-episode link's hit area to the footnote/icon height plus eight points of vertical padding—roughly 24 points rather than 44. The surrounding padding is outside the InkWell, so it does not enlarge the tappable area, making this navigation control harder to activate. The UI contract routed by app/AGENTS.md explicitly requires every tappable control to be at least 44×44 points (app/docs/ux-contract.md:99–100). Keep the small visual pill inside a minimum-height hit target or use the shared button primitive.

AGENTS.md reference: app/AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

… compact Summary cards

- Home live row (option E): the tile holds the breathing live dot over the
  running length in whole minutes; line one is the title ("Listening now"
  before one exists); line two is the newest preview words trimmed at the
  start, or today's subtitle without the duration. No colour.
- Live page header: one line — green dot and length, then grey
  "· since <time>" and participants, ellipsized; the moment count moves to
  the Moments section header. The pinned header is opaque in the page
  colour with no scrolled-under tint.
- Summary: So far shows at most four bullets (the newest server notes, or
  the on-device drafts) with the "On this phone" tag only beside drafted
  bullets; the Live card (title, quiet Open transcript link, start-trimmed
  three lines, lighter volatile tail) replaces the old "Live Transcript"
  card with Speaker/Others labels for preview and cloud sessions alike.
- Transcript: the quiet "Final transcript about Ns behind" line sits under
  the transcript on the episode page; the no-engine state is the
  "Recording safely" card at the top of the tab.
- Largest text: line two takes two lines on Home; card titles and tags
  stack; tab labels and the pinned header stop growing before they clip.
- Retires the unused episodeOpenAll and episodeLivePreviewLine strings.
- Evidence: iOS light 390x844 set plus one dark Summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9883b029a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +45 to +48
final cuts = <int>[
for (var i = start + 1; i < full.length; i++)
if (full[i - 1] == ' ' && full[i] != ' ') i,
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back to grapheme boundaries when trimming unspaced text

For a Chinese or Japanese preview utterance without spaces that exceeds the available width, cuts is empty, so start stays at zero and the returned text uses trailing ellipsis. Both the Home subtitle and Summary Live card consequently show the oldest words of that utterance and hide newly spoken words—the opposite of this widget's intended behavior. When no word-boundary cut fits, find a fitting suffix using grapheme boundaries instead.

Useful? React with 👍 / 👎.

Git-on-my-level and others added 3 commits October 27, 2026 21:23
Use a shared grapheme-based word budget for notes cadence, prompt and bullets, mirrored in Swift. Restore unknown-duration catching-up status and expand the Continues hit area without changing its visual pill. Cover all four review findings with regression tests and rendered evidence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3aa3b1cad8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +890 to +892
Padding(
padding: const EdgeInsets.symmetric(horizontal: OmiSpacing.sm),
child: Text(label, style: OmiType.footnote.copyWith(color: OmiColors.textTertiary)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Constrain the divider label at accessibility text sizes

On a narrow phone with accessibility text scaling enabled, longer translations such as French (“En direct sur ce téléphone”) exceed the available transcript width. This non-flex child of a Row is measured with unbounded horizontal space, so the text cannot wrap; the expanded hairlines collapse and the label overflows the screen. The transcript does not inherit the header's text-scale clamp. Put the label inside a flexible, width-constrained child so it can wrap while retaining the user's text size, as required by the mobile UX contract's accessibility guidance.

AGENTS.md reference: app/AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

// Paused (or waiting) shows no clock: a time that keeps counting while nothing listens misleads.
// A local-preview session reads its newest on-device words on line two, trimmed at the
// start so the latest words stay visible. The duration lives in the tile.
final preview = listening && capture.segments.isEmpty && capture.localPreviewAdmitted ? capture.livePreview : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the Home preview after final transcript segments arrive

When an admitted local-preview capture receives its first final transcript segment while recording continues, capture.segments.isEmpty becomes false and this permanently removes the newest preview words from the Home subtitle, even though the preview engine is still producing them. The subtitle falls back to metadata or just “Live” instead of showing current speech. This mixed state is explicitly supported by _previewBody() in live_transcript_view.dart, which displays final segments alongside newer preview lines. Gate the Home preview on admission and listening state rather than requiring the final transcript to remain empty.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit f85a8b7 into main Oct 27, 2026
46 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/live-preview-polish branch October 27, 2026 15:06
Git-on-my-level added a commit that referenced this pull request Oct 27, 2026
… row; no tile dot (#23819)

## What David saw on TestFlight 1.0.579

- No gray on-device words while talking. Before #23805 they appeared at
once and darkened as they settled.
- The Home live row never showed the preview line.
- The Home tile showed a dot above the duration. David wants no dot.

## Causes and fixes

1. **The iOS SpeechAnalyzer stalled or failed.** #23805 gave every
`AnalyzerInput` a wall-clock `bufferStartTime`, derived from when each
BLE burst arrived. Those start times overlap or leave gaps between
consecutive buffers. The analyzer then stalls, or its results stream
fails. Once two engines fail, the controller settles in `unavailable`,
and the transcript page falls back to the cloud-only view with the
"Uploading Ns of audio" pill.
- **Fix:** buffers go in contiguous again, as they did before #23805.
The wall clock of the first sample is added to the analyzer's result
times, so the coverage check keeps its audio timestamps.
2. **The Home row hid the preview once any final line arrived.** It was
gated on `capture.segments.isEmpty`, and on a batch session the first
final lines land within about a minute.
- **Fix:** line two now shows the newest preview words not yet covered
by the final transcript (`LivePreviewCoverage.uncovered`), for the whole
session. It redraws as words arrive instead of on the 1 s clock tick.
3. **The tile showed a dot.** It now shows the running length alone.

## Verification

- `flutter test test/widgets/episodes_ui_test.dart
test/widgets/live_preview_render_test.dart test/services/live_preview/`:
all 258 pass.
- A new test checks that the row keeps the preview after final lines
arrive and updates without waiting for a clock tick.
- **Not verified here:** the SpeechAnalyzer behaviour on a physical
phone. David's TestFlight QA is the gate for this lane, per the 10-25
on-device preview ruling.

## UI evidence

| Home row | Largest text |
|---|---|
| ![Home live
row](https://raw.githubusercontent.com/BasedHardware/omi/117cbad48cf150da1afef0fb2668a269f99fff9e/.agent-artifacts/ui-evidence/live-preview-hotfix/001-mobile-ios-home-title-preview.png)
| ![Home live row, largest
text](https://raw.githubusercontent.com/BasedHardware/omi/117cbad48cf150da1afef0fb2668a269f99fff9e/.agent-artifacts/ui-evidence/live-preview-hotfix/002-mobile-ios-home-largest-type.png)
|

David's TestFlight QA is the gate for the on-device preview lane (ruling
10-25).

Failure-Class: none

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/23819?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/23819?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F23819&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. -->
ocakciomursel-pixel pushed a commit to ocakciomursel-pixel/omi that referenced this pull request Oct 27, 2026
…Home row; drop the tile dot

- iOS SpeechAnalyzer: feed buffers on the analyzer's own contiguous timeline and
  add the first sample's wall clock to result times. BasedHardware#23805 stamped each buffer
  with a wall-clock start; bursty BLE delivery makes those overlap or gap, and
  the analyzer stalls or fails, which drops the session to the no-engine view.
- Home live row: line two shows the newest preview words the final transcript
  does not yet cover for the whole session (it hid them once any final line
  arrived), and redraws as words land instead of on the 1 s clock.
- Home tile: the running length alone, no dot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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