Skip to content

feat(app): update UI for the conversation view - #20128

Merged
Git-on-my-level merged 5 commits into
BasedHardware:mainfrom
Itaxh1:feat/conversation-detail-v3
Oct 1, 2026
Merged

Git-on-my-level merged 5 commits into
BasedHardware:mainfrom
Itaxh1:feat/conversation-detail-v3

Conversation

@Itaxh1

@Itaxh1 Itaxh1 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Closes #20037

The conversation page, redone to the v3 design and made calmer to read:

  • Header: a large title over outlined chips: when it started and how long it ran, the folder, who spoke (overlapping avatars, e.g. Y 1 You + 1 other) and the event's recordings.
  • Tabs: Summary and Transcript sit at the top of the page. Private or Shared is a quiet label at the end of the tab row and opens the visibility sheet; it is also in ⋯. The conversation's Tasks tab is gone; its tasks stay on the Tasks page.
  • Transcript: plain lines with the speaker's name and clock time over the words, no bubbles. Tap the words or the time to play from that line, double-tap to edit, tap the name to name the speaker. A saved conversation opens at its first line; only a live one follows the latest line.
  • One bottom bar: on Transcript, the recording's waveform player (bars follow when people spoke) with a round Ask Omi button; on Summary, or with no recording, a centred Ask Omi bar. Ask Omi leaves the top bar, which keeps back, star, share and ⋯.
  • Summary app picker: moved from the bottom pill into ⋯ as Summary Template (first item; the current app's name as its subtitle). The summary's attribution row only shows when an app wrote the summary.

Audio playback, which worked for some conversations and not others:

  • Playback is now planned from the audio URLs before a player exists: the conversation MP3 when ready, else a playlist of the parts that are, else a message. It used to keep going on an empty player, so Play flipped to Pause and nothing played.
  • A response with no files (a failed or refused request, e.g. a locked conversation) says so at once instead of spinning for 90 s; a file that will not load says so and leaves Play; the next tap tries again.
  • Part playlists count only the parts that can play, so the time left and seeking match what is heard.
  • Tapping a transcript line now plays on part playlists too, through each part's start time; before, it only worked when the single conversation MP3 existed.
Summary, Private Summary, Shared Visibility sheet
Transcript and player Transcript, Shared ⋯ menu

Screenshots are from an iPhone 15 Pro Max (iOS 26.6.2) running this branch on real conversations; the summary and transcript text is blurred. They were taken before the playback fix, which changes no layout.

Product invariants affected

none

How it was verified

On this branch merged with upstream/main (33d25cd):

  • bash app/test.sh: 3,749 + 138 tests passed, 5 skipped, 0 failed.
  • app/scripts/analyze_ratchet.sh: passed.
  • python3 .github/scripts/pr_preflight.py --lane local: all 22 selected checks passed (invariants, INV-UI-1, INV-UI-3, changelog, dead code, line counts, event registry).
  • python3 app/scripts/l10n.py check: ok, 49 locales.
  • Visual audit scenario conversation-detail-design (Summary, Transcript with the player, ⋯ menu) rendered in light and dark and compared side by side with the design mock.
  • Built to an iPhone 15 Pro Max on the production backend and used on real conversations: both tabs, the Private/Shared label and sheet, the ⋯ menu with Summary Template, the Ask Omi bar and round button, the waveform player (screenshots above).
  • Playback: some conversations would not play on the phone. The fixed build was installed on the same iPhone and audio now plays; the failure paths are covered by the playback-plan and play-button tests below.

Tests

  • test/widgets/conversation_audio_playback_test.dart (new): the playback plan for every URL shape (conversation MP3, MP3 without spans, mixed cached/unavailable parts in recording order, parts without start times, zero-length parts, no files, nothing playable), transcript-tap mapping onto a part playlist, and the play button's failure paths against a faked just_audio channel: no files says so at once and retries on the next tap, gone audio reads as unavailable, a pending part is polled and a file that will not load leaves Play.
  • test/widgets/conversation_bottom_bar_summary_test.dart: Ask Omi alone and centred on Summary and on a silent Transcript, with no mic; the player and round Ask button share the bar on Transcript; the waveform's speech levels.
  • test/unit/conversation_detail_initial_tab_test.dart: tab order, no Tasks tab, Private at the end of the tab row, Ask Omi out of the top bar, Summary Template first in ⋯.
  • test/widgets/transcript_test.dart: saved-conversation lines (names, clock times, tap to name, tap words or time to play, double-tap to edit, a long transcript opens at its first line).
  • test/unit/capture_groups_test.dart: the people chip's avatars.
  • test/widgets/conversation_detail_title_alignment_test.dart, test/widgets/app_result_summary_source_label_test.dart: the title and the attribution row.

Failure class (fixes)

Failure-Class: none

Itaxh1 added 2 commits October 1, 2026 02:35
…ottom bar

The conversation page (BasedHardware#20037): a large title over outlined chips (when and
how long, folder, people with overlapping avatars, recordings), Summary and
Transcript tabs at the top with Private or Shared at the end of the row, and
a transcript of plain lines (name and clock time over the words; tap the
words or time to play from that line, double-tap to edit). A saved
conversation opens at its first line.

One bar at the bottom: on Transcript the recording's waveform player with a
round Ask Omi button, on Summary a centred Ask Omi bar. Ask Omi leaves the
top bar, the summary app picker moves into the ⋯ menu as Summary Template,
and the summary's attribution row shows only when an app wrote it. The
conversation's Tasks tab is gone.

Playback is planned from the audio URLs before a player exists, so a
conversation whose audio cannot play says so and keeps Play instead of
flipping to Pause on an empty player. No files (a failed or refused request)
no longer spins for 90 s, part playlists count only the parts that play,
and transcript taps play on part playlists through each part's start time.

@cubic-dev-ai cubic-dev-ai 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.

32 issues found across 125 files

Confidence score: 3/5

  • app/lib/pages/conversation_detail/page.dart can hide playback and the only Ask Omi entry point for audio-only or summary-only conversations; include playable audio and non-empty summaries in the gate.
  • app/lib/widgets/conversation_bottom_bar.dart can leave a failed lazy playlist marked initialized, preventing Play from retrying; dispose the failed player and clear the initialization state. app/lib/pages/conversation_detail/widgets/conversation_detail_tabs.dart also exposes a tab action screen readers cannot activate; add onTap to its Semantics node.
  • Plural forms in app/lib/l10n/app_localizations_tl.dart, app/lib/l10n/app_localizations_ru.dart, app/lib/l10n/app_uk.arb, and app/lib/l10n/app_localizations_mk.dart can show incorrect speaker counts in supported locales; use the correct locale plural categories and interpolate the count in each form.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/lib/l10n/app_localizations_ru.dart">

<violation number="1" location="app/lib/l10n/app_localizations_ru.dart:12155">
P2: The Russian plural only defines `=1`/`other`, but Russian has three plural categories (`one`/`few`/`many`); `other` is never selected for integer counts. With `locale: localeName` (ru), 2–4 speakers hit category `few` and render "Участников: 2" (should be "2 участника"), and 21+/31+ speakers hit category `one` and render the hardcoded "1 участник", dropping the real count. Define the `one`/`few`/`many` forms in `app_ru.arb` and regenerate this file via gen-l10n instead of editing it by hand.</violation>
</file>

<file name="app/lib/pages/conversation_detail/widgets/conversation_detail_header.dart">

<violation number="1" location="app/lib/pages/conversation_detail/widgets/conversation_detail_header.dart:256">
P2: These header chips expose only a 34 pt-tall gesture target, violating the app's 44 pt minimum and making folder/calendar actions harder to activate. Keep the 34 pt visual capsule, but place each tappable chip inside a 44 pt target.</violation>
</file>

<file name="app/lib/pages/conversation_detail/widgets/conversation_detail_tabs.dart">

<violation number="1" location="app/lib/pages/conversation_detail/widgets/conversation_detail_tabs.dart:57">
P2: Swiping back to Summary before detail hydration completes can be overwritten: this callback never marks the swipe as explicit, so `_selectInitialTabIfNeeded` later navigates back to Transcript. Mark settled controller changes as explicit too, or expose a callback for swipe selections.</violation>

<violation number="2" location="app/lib/pages/conversation_detail/widgets/conversation_detail_tabs.dart:91">
P2: This excludes the child GestureDetector’s tap action, so screen readers announce a button they cannot activate. Add the same callback to this Semantics node with `onTap`.</violation>
</file>

<file name="app/lib/l10n/app_localizations_sr.dart">

<violation number="1" location="app/lib/l10n/app_localizations_sr.dart:12135">
P3: The Serbian translation renders in Latin script ('Govornika: $count', '1 govornik') while the rest of the sr locale strings are Cyrillic, so the transcript heading chip (Transcript · 14 min · Govornika: 5) will show Latin text mixed into Cyrillic UI. The string matches the Croatian/Bosnian translation verbatim and was evidently copied without transliteration. Update app_sr.arb to Cyrillic ('Говорника: $count' / '1 говорник') via `python3 scripts/l10n.py set` and regenerate; the gen-l10n change follows automatically.</violation>

<violation number="2" location="app/lib/l10n/app_localizations_sr.dart:12136">
P2: Serbian's `one` plural category also matches counts such as 21, so this branch displays `1 govornik` for 21 speakers. Interpolate `count` to preserve the actual total.</violation>
</file>

<file name="app/lib/pages/conversation_detail/page.dart">

<violation number="1" location="app/lib/pages/conversation_detail/page.dart:1002">
P1: Audio-only and summary-only conversations fail this gate, so `ConversationBottomBar` gets `hasSegments: false` and hides both playback and the only Ask Omi entry point. Include playable audio and non-empty summaries in this predicate.</violation>
</file>

<file name="app/lib/l10n/app_bs.arb">

<violation number="1" location="app/lib/l10n/app_bs.arb:11329">
P2: This branch hardcodes `1`, so Bosnian counts such as 21 or 31 are displayed as “1 govornik.” Interpolate `{count}` in the `one` form so the heading reports the actual speaker count.</violation>
</file>

<file name="app/lib/l10n/app_uk.arb">

<violation number="1" location="app/lib/l10n/app_uk.arb:3769">
P2: Ukrainian’s `one` plural category also matches 21, 31, and similar counts, so these conversations are labeled “1 учасник.” Use Ukrainian plural categories and interpolate `{count}` in each form.</violation>
</file>

<file name="app/lib/pages/conversation_detail/widgets/conversation_markdown_widget.dart">

<violation number="1" location="app/lib/pages/conversation_detail/widgets/conversation_markdown_widget.dart:18">
P3: The new 80%-ink base style is inherited by p/a/strong/listBullet, but the `code` and `blockquote` overrides force `color: OmiColors.textPrimary` back to 100% opacity, so inline code and quotes render noticeably darker than the surrounding muted body text. Either keep code inheriting the muted ink so the 80% treatment is consistent (e.g. drop the color override), or confirm full-ink code/quote was intended.</violation>
</file>

<file name="app/test/widgets/app_result_summary_source_label_test.dart">

<violation number="1" location="app/test/widgets/app_result_summary_source_label_test.dart:109">
P3: The test name says the row "opens" the app, but the body only checks the name and chevron are rendered; no tap or navigation is asserted. Rename to reflect what it verifies (e.g., "shows the app name and chevron affordance") or add a tap test that asserts AppDetailPage is pushed.</violation>
</file>

<file name="app/lib/l10n/app_localizations_mk.dart">

<violation number="1" location="app/lib/l10n/app_localizations_mk.dart:12185">
P2: For Macedonian counts such as 21, `Intl.pluralLogic` selects `one`, so this renders “1 говорник” instead of the actual count. Interpolate `$count` in this branch and in the source ARB.</violation>
</file>

<file name="app/lib/l10n/app_localizations_sl.dart">

<violation number="1" location="app/lib/l10n/app_localizations_sl.dart:12152">
P2: Slovenian’s `one` plural category also matches counts such as 21 and 101, so this branch renders those conversations as `1 govorec`. Restrict that text to `count == 1` and use the plural label for the remaining `one` counts.</violation>
</file>

<file name="app/lib/pages/conversation_detail/conversation_detail_meta.dart">

<violation number="1" location="app/lib/pages/conversation_detail/conversation_detail_meta.dart:52">
P2: This extracts one Unicode scalar rather than one grapheme, so decomposed initials such as `e\u0301` lose their accent. Use grapheme-aware extraction, as `PersonAvatar.initials` does with `.characters.first`.</violation>
</file>

<file name="app/lib/widgets/transcript.dart">

<violation number="1" location="app/lib/widgets/transcript.dart:1164">
P3: Line clock times are computed as `startedAt + segment offset`, which is only correct when `startedAt` is the exact moment the recording's audio at offset 0 began. The caller passes `conversation.startedAt ?? conversation.createdAt` (transcript_tab.dart `getTranscriptWidget(...)` call), so for older conversations without a `startedAt` field the times are based on record-creation/upload time, which can be tens of seconds to minutes after the audio actually started — every line in such conversations then shows a systematically shifted clock time. The repo even documents that the session startedAt→finishedAt span over-counts the transcript span (conversation.dart, #4056), so `startedAt` is not guaranteed to equal the audio start either. Show clock times only when `startedAt` is known to be the recording start; otherwise fall back to the `OmiDuration.offset` display (or hide the time) rather than treating `createdAt` as the audio start.</violation>

<violation number="2" location="app/lib/widgets/transcript.dart:1219">
P2: Search-highlighted words in the new detail transcript lose the line's body typography because `_highlightSearchMatchesWithKeys` creates them as standalone `Text` widgets without the supplied detail style. Pass the active text style into the highlighter and apply it to each highlighted child so searched lines do not shrink or change their line height.</violation>
</file>

<file name="app/lib/widgets/conversation_bottom_bar.dart">

<violation number="1" location="app/lib/widgets/conversation_bottom_bar.dart:38">
P2: The waveform is normalized to the transcript’s first and last segment, not the conversation timeline used by playback. Leading or trailing silence therefore shifts the bars relative to the scrubber; base the levels on the audio duration and conversation-time origin.</violation>

<violation number="2" location="app/lib/widgets/conversation_bottom_bar.dart:326">
P2: A lazy playlist failure leaves `_isAudioInitialized` true, so the next Play reuses the failed player instead of retrying playback resolution. Dispose the failed player and clear the initialization state when handling the stream error.</violation>

<violation number="3" location="app/lib/widgets/conversation_bottom_bar.dart:489">
P2: Both Ask Omi controls expose a labeled button but suppress the child `InkWell` action, so screen-reader users cannot activate them. Add `onTap: _askOmi` to each `Semantics` node or preserve the child semantics.</violation>
</file>

<file name="app/lib/l10n/app_localizations_hr.dart">

<violation number="1" location="app/lib/l10n/app_localizations_hr.dart:12158">
P2: The `one:` form is applied to the whole Croatian "one" plural category (1, 21, 31, ...), so a transcript with 21+ distinct speakers renders "1 govornik". Fix in app_hr.arb via scripts/l10n.py: add few/many forms and interpolate {count}, then regenerate; don't edit this generated file by hand.</violation>
</file>

<file name="app/lib/l10n/app_localizations_lt.dart">

<violation number="1" location="app/lib/l10n/app_localizations_lt.dart:12141">
P2: The `one:` branch hardcodes '1 kalbėtojas', but Lithuanian's `one` plural category (n % 10 == 1 and n % 100 != 11) also matches 21, 31, …, so a 21-speaker transcript renders '1 kalbėtojas' instead of '21 kalbėtojas'. gen-l10n maps the ARB `=1` case onto this `one` category, so fix it in app_lt.arb by interpolating the count (e.g. `=1{$count kalbėtojas}`), then regenerate.</violation>
</file>

<file name="app/test/unit/conversation_detail_initial_tab_test.dart">

<violation number="1" location="app/test/unit/conversation_detail_initial_tab_test.dart:243">
P3: The `initialTab` parameter added to `_detailApp` is never passed by any test, and the harness passes it straight through to `ConversationDetailPage` only when a caller supplies it — no caller does. The new `ConversationDetailPage.initialTab` deep-link tab-preservation path therefore has no widget-level coverage: a regression in how `initialTab` is applied (e.g., it overriding post-hydration evaluation) would pass the suite. Drop the parameter or add a test that passes `initialTab` and asserts the resulting tab.</violation>
</file>

<file name="app/lib/l10n/app_localizations_ar.dart">

<violation number="1" location="app/lib/l10n/app_localizations_ar.dart:12048">
P3: The Arabic plural for transcriptSpeakerCount only provides `=1` and `other`, but Arabic CLDR distinguishes dual (2) and many (11+), so those counts all render the same genitive-plural string «متحدثين». The most common case, a two-speaker transcript header, will read «2 متحدثين» instead of the dual «متحدثان», and 11+ should be «متحدثًا». This generated method emits exactly the categories defined in the resource, so add the missing variants to `transcriptSpeakerCount` in app_ar.arb (`=2`, `few`, `many`) and regenerate — as other plural strings in this file already do.</violation>
</file>

<file name="app/test/widgets/transcript_test.dart">

<violation number="1" location="app/test/widgets/transcript_test.dart:243">
P2: This checks only avatars; restoring the old decorated speech bubbles would still pass despite the test name. Add an assertion that no rounded bubble decoration is rendered.</violation>
</file>

<file name="app/lib/l10n/app_localizations_tl.dart">

<violation number="1" location="app/lib/l10n/app_localizations_tl.dart:12225">
P2: The 'one' branch hardcodes '1 nagsasalita', but for the tl locale the plural category 'one' is not limited to count 1 (Intl.PluralRules('tl') reports one for 0, 2, 3, 5, 7, 8, 10-13, 20-23, 100, ...). intl.Intl.pluralLogic selects the branch by the locale's plural rule, not by exact ==1, so a 3-speaker transcript displays '1 nagsasalita', and count 0 renders as '1 nagsasalita' as well. Since 'nagsasalita' does not inflect, use {count} in the one-branch: change app_tl.arb to "{count, plural, =1{{count} nagsasalita} other{{count} nagsasalita}}" and regenerate.</violation>
</file>

<file name="app/lib/l10n/app_localizations_lv.dart">

<violation number="1" location="app/lib/l10n/app_localizations_lv.dart:12147">
P3: The hardcoded "1" breaks Latvian pluralization: `Intl.pluralLogic` selects the `one` category for every count ending in 1 except 11 (21, 31, 41, ...), so a transcript with, e.g., 21 distinct speakers renders "1 runātājs". This `one` value comes from the ARB `=1` form in `app_lv.arb`; change it to interpolate the count and regenerate the l10n files (via `scripts/l10n.py`).</violation>
</file>

<file name="app/lib/pages/conversation_detail/widgets/transcript_tab.dart">

<violation number="1" location="app/lib/pages/conversation_detail/widgets/transcript_tab.dart:261">
P3: `_TranscriptHeading` counts Omi (speakerId 99) as a speaker via `'speaker-${segment.speakerId}'`, so a You↔Omi conversation reads "2 speakers" even though one person took part. The app's canonical speaker numbering (`SpeakerNames.denseOrdinals` in speaker_names.dart:78-85) excludes both the owner and `omiSpeakerId` from speaker counts, and Omi is never labeled "Speaker N". Mirror that rule in the `voices` set so the heading count matches the labels the transcript actually shows.</violation>
</file>

<file name="app/lib/pages/conversation_detail/widgets/summary_tab.dart">

<violation number="1" location="app/lib/pages/conversation_detail/widgets/summary_tab.dart:66">
P3: The `#` check assumes every leading `#` is an ATX heading, but CommonMark only parses a heading when `#` is followed by whitespace or end-of-line. A summary starting with `#include`, `#1 …`, or a bare `#hashtag` renders as an ordinary paragraph (no heading margin), so `leadsWithHeading` is true and the tab loses the intended top spacing — content ends up flush under the tab row with 0px instead of 18px. Also, the check runs on `summarySelection.content` while the tab actually renders `selection.content.decodeString` (widgets.dart), so escaped/encoded prefixes make the same heuristic miss a real heading and double-space. Restrict the test to a real heading prefix on the decoded content.</violation>
</file>

<file name="app/lib/l10n/app_be.arb">

<violation number="1" location="app/lib/l10n/app_be.arb:11329">
P3: Belarusian has a separate "few" plural category for 2–4, so a 2–4 participant transcript renders "Удзельнікаў: 3" (genitive plural) instead of "Удзельнікі: 3". Add few and many categories; the existing "other" text happens to be correct for "many" (5+).</violation>
</file>

<file name="app/test/widgets/conversation_audio_playback_test.dart">

<violation number="1" location="app/test/widgets/conversation_audio_playback_test.dart:234">
P3: The wait for the error SnackBar depends on wall-clock timing: up to 10 loops of 50 ms real delay, and if the just_audio failure settles later, `find.text('An error occurred. Please try again.')` fails with an unhelpful message. Make the wait bounded but threshold-free (loop until the SnackBar appears or a fixed deadline passes) so the failure is deterministic on slow CI and reports what was missing.</violation>
</file>

<file name="app/lib/l10n/app_en.arb">

<violation number="1" location="app/lib/l10n/app_en.arb:14445">
P3: The `=1`/`other` authoring is compiled by gen-l10n into the CLDR `one`/`other` named parameters of `Intl.pluralLogic` (visible in every generated file, e.g. ru: `one: '1 участник'`), and the intl runtime fires `one` for every count the locale's CLDR `one` rule covers — not only exactly 1. For ru/uk/be/pl/cs/sk/lv/lt/hr/sr/bs/sl, `one` also matches 21, 31, 41…, so a group meeting whose transcript has 21 distinct speakers (Omi records meetings) would render the literal singular text ("1 участник") instead of "21 участник". Prefer authoring full CLDR categories for those locales, or at least include `{count}` in the singular variant so the `one` branch stays readable when it fires for 21/31/….</violation>
</file>

<file name="app/integration_test/visual_audit/scenarios/conversation_detail.dart">

<violation number="1" location="app/integration_test/visual_audit/scenarios/conversation_detail.dart:128">
P3: This is the only scenario that never registers its conversation with the fixture server. Every sibling scenario calls `a.server.conversations.add(conversation.toJson())` before pumping (see `conversation-detail-summary`, `conversation-detail-screenshots`), while `_pumpDesignConversation` seeds only the in-memory `ConversationProvider`. The page's post-frame hydration (`provider.initConversation()`) can thereby hit a 404 for `audit-design` on the hermetic server, and the screenshots silently depend on the provider cache absorbing the miss. Register the conversation with the server for parity and robustness.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment on lines +1002 to +1004
final hasBar = conversation.transcriptSegments.isNotEmpty ||
conversation.photos.isNotEmpty ||
conversation.externalIntegration != 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.

P1: Audio-only and summary-only conversations fail this gate, so ConversationBottomBar gets hasSegments: false and hides both playback and the only Ask Omi entry point. Include playable audio and non-empty summaries in this predicate.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/conversation_detail/page.dart, line 1002:

<comment>Audio-only and summary-only conversations fail this gate, so `ConversationBottomBar` gets `hasSegments: false` and hides both playback and the only Ask Omi entry point. Include playable audio and non-empty summaries in this predicate.</comment>

<file context>
@@ -1002,8 +998,10 @@ class ConversationDetailPageState extends State<ConversationDetailPage> with Tic
-    final hasTasks = conversation.structured.actionItems.any((item) => !item.deleted);
-    if (_providerInitialized) _syncTabCount(hasTasks);
+    // The bottom bar (and its backdrop) shows once there is something to play or ask about.
+    final hasBar = conversation.transcriptSegments.isNotEmpty ||
+        conversation.photos.isNotEmpty ||
+        conversation.externalIntegration != null;
</file context>
Suggested change
final hasBar = conversation.transcriptSegments.isNotEmpty ||
conversation.photos.isNotEmpty ||
conversation.externalIntegration != null;
final hasBar = conversation.hasAudio() ||
ConversationSummarySelection.select(conversation).kind != ConversationSummaryKind.empty ||
conversation.transcriptSegments.isNotEmpty ||
conversation.photos.isNotEmpty ||
conversation.externalIntegration != null;

}

@override
String transcriptSpeakerCount(int count) {

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: The Russian plural only defines =1/other, but Russian has three plural categories (one/few/many); other is never selected for integer counts. With locale: localeName (ru), 2–4 speakers hit category few and render "Участников: 2" (should be "2 участника"), and 21+/31+ speakers hit category one and render the hardcoded "1 участник", dropping the real count. Define the one/few/many forms in app_ru.arb and regenerate this file via gen-l10n instead of editing it by hand.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/l10n/app_localizations_ru.dart, line 12155:

<comment>The Russian plural only defines `=1`/`other`, but Russian has three plural categories (`one`/`few`/`many`); `other` is never selected for integer counts. With `locale: localeName` (ru), 2–4 speakers hit category `few` and render "Участников: 2" (should be "2 участника"), and 21+/31+ speakers hit category `one` and render the hardcoded "1 участник", dropping the real count. Define the `one`/`few`/`many` forms in `app_ru.arb` and regenerate this file via gen-l10n instead of editing it by hand.</comment>

<file context>
@@ -12150,4 +12150,15 @@ class AppLocalizationsRu extends AppLocalizations {
   }
+
+  @override
+  String transcriptSpeakerCount(int count) {
+    String _temp0 = intl.Intl.pluralLogic(
+      count,
</file context>

},
child: _HeaderChip(
icon: FaIcon(folderIconToFa(folder?.icon), size: 12, color: color),
child: ConversationDetailChip(

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: These header chips expose only a 34 pt-tall gesture target, violating the app's 44 pt minimum and making folder/calendar actions harder to activate. Keep the 34 pt visual capsule, but place each tappable chip inside a 44 pt target.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/conversation_detail/widgets/conversation_detail_header.dart, line 256:

<comment>These header chips expose only a 34 pt-tall gesture target, violating the app's 44 pt minimum and making folder/calendar actions harder to activate. Keep the 34 pt visual capsule, but place each tappable chip inside a 44 pt target.</comment>

<file context>
@@ -283,12 +253,10 @@ class _FolderChip extends StatelessWidget {
         },
-        child: _HeaderChip(
-          icon: FaIcon(folderIconToFa(folder?.icon), size: 12, color: color),
+        child: ConversationDetailChip(
+          key: const Key('conversation_folder'),
+          icon: FaIcon(folderIconToFa(folder?.icon), size: 13, color: folder?.colorValue),
</file context>

unselectedLabelStyle: style,
overlayColor: const WidgetStatePropertyAll(Colors.transparent),
splashFactory: NoSplash.splashFactory,
onTap: (index) {

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: Swiping back to Summary before detail hydration completes can be overwritten: this callback never marks the swipe as explicit, so _selectInitialTabIfNeeded later navigates back to Transcript. Mark settled controller changes as explicit too, or expose a callback for swipe selections.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/conversation_detail/widgets/conversation_detail_tabs.dart, line 57:

<comment>Swiping back to Summary before detail hydration completes can be overwritten: this callback never marks the swipe as explicit, so `_selectInitialTabIfNeeded` later navigates back to Transcript. Mark settled controller changes as explicit too, or expose a callback for swipe selections.</comment>

<file context>
@@ -0,0 +1,114 @@
+                  unselectedLabelStyle: style,
+                  overlayColor: const WidgetStatePropertyAll(Colors.transparent),
+                  splashFactory: NoSplash.splashFactory,
+                  onTap: (index) {
+                    OmiHaptics.selection();
+                    onTap(index);
</file context>

Comment thread app/lib/l10n/app_bs.arb Outdated
"speakerTagPromptNotMeAction": "Nisam ja",
"confidenceNextLabels": "{count, plural, =1{Označite ih u još 1 razgovoru.} other{Označite ih u još {count} razgovora.}}"
"confidenceNextLabels": "{count, plural, =1{Označite ih u još 1 razgovoru.} other{Označite ih u još {count} razgovora.}}",
"transcriptSpeakerCount": "{count, plural, =1{1 govornik} other{Govornika: {count}}}"

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: This branch hardcodes 1, so Bosnian counts such as 21 or 31 are displayed as “1 govornik.” Interpolate {count} in the one form so the heading reports the actual speaker count.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/l10n/app_bs.arb, line 11329:

<comment>This branch hardcodes `1`, so Bosnian counts such as 21 or 31 are displayed as “1 govornik.” Interpolate `{count}` in the `one` form so the heading reports the actual speaker count.</comment>

<file context>
@@ -11325,5 +11325,6 @@
     "speakerTagPromptNotMeAction": "Nisam ja",
-    "confidenceNextLabels": "{count, plural, =1{Označite ih u još 1 razgovoru.} other{Označite ih u još {count} razgovora.}}"
+    "confidenceNextLabels": "{count, plural, =1{Označite ih u još 1 razgovoru.} other{Označite ih u još {count} razgovora.}}",
+    "transcriptSpeakerCount": "{count, plural, =1{1 govornik} other{Govornika: {count}}}"
 }
</file context>
Suggested change
"transcriptSpeakerCount": "{count, plural, =1{1 govornik} other{Govornika: {count}}}"
"transcriptSpeakerCount": "{count, plural, one{{count} govornik} other{Govornika: {count}}}"

Comment thread app/lib/l10n/app_be.arb Outdated
"speakerTagPromptNotMeAction": "Не я",
"confidenceNextLabels": "{count, plural, =1{Пазначце яго яшчэ ў 1 размове.} other{Пазначце яго яшчэ ў {count} размовах.}}"
"confidenceNextLabels": "{count, plural, =1{Пазначце яго яшчэ ў 1 размове.} other{Пазначце яго яшчэ ў {count} размовах.}}",
"transcriptSpeakerCount": "{count, plural, =1{1 удзельнік} other{Удзельнікаў: {count}}}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Belarusian has a separate "few" plural category for 2–4, so a 2–4 participant transcript renders "Удзельнікаў: 3" (genitive plural) instead of "Удзельнікі: 3". Add few and many categories; the existing "other" text happens to be correct for "many" (5+).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/l10n/app_be.arb, line 11329:

<comment>Belarusian has a separate "few" plural category for 2–4, so a 2–4 participant transcript renders "Удзельнікаў: 3" (genitive plural) instead of "Удзельнікі: 3". Add few and many categories; the existing "other" text happens to be correct for "many" (5+).</comment>

<file context>
@@ -11325,5 +11325,6 @@
     "speakerTagPromptNotMeAction": "Не я",
-    "confidenceNextLabels": "{count, plural, =1{Пазначце яго яшчэ ў 1 размове.} other{Пазначце яго яшчэ ў {count} размовах.}}"
+    "confidenceNextLabels": "{count, plural, =1{Пазначце яго яшчэ ў 1 размове.} other{Пазначце яго яшчэ ў {count} размовах.}}",
+    "transcriptSpeakerCount": "{count, plural, =1{1 удзельнік} other{Удзельнікаў: {count}}}"
 }
</file context>
Suggested change
"transcriptSpeakerCount": "{count, plural, =1{1 удзельнік} other{Удзельнікаў: {count}}}"
"transcriptSpeakerCount": "{count, plural, =1{1 удзельнік} few{Удзельнікі: {count}} many{Удзельнікаў: {count}} other{Удзельнікаў: {count}}}"

Comment on lines +234 to +236
for (var i = 0; i < 10 && find.byType(SnackBar).evaluate().isEmpty; i++) {
await tester.runAsync(() => Future<void>.delayed(const Duration(milliseconds: 50)));
await tester.pump(const Duration(milliseconds: 50));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The wait for the error SnackBar depends on wall-clock timing: up to 10 loops of 50 ms real delay, and if the just_audio failure settles later, find.text('An error occurred. Please try again.') fails with an unhelpful message. Make the wait bounded but threshold-free (loop until the SnackBar appears or a fixed deadline passes) so the failure is deterministic on slow CI and reports what was missing.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/test/widgets/conversation_audio_playback_test.dart, line 234:

<comment>The wait for the error SnackBar depends on wall-clock timing: up to 10 loops of 50 ms real delay, and if the just_audio failure settles later, `find.text('An error occurred. Please try again.')` fails with an unhelpful message. Make the wait bounded but threshold-free (loop until the SnackBar appears or a fixed deadline passes) so the failure is deterministic on slow CI and reports what was missing.</comment>

<file context>
@@ -0,0 +1,244 @@
+      await tester.pump();
+      await tester.pump(const Duration(milliseconds: 20)); // the poll interval the backend asked for
+      // just_audio settles a failed load through real platform-channel replies.
+      for (var i = 0; i < 10 && find.byType(SnackBar).evaluate().isEmpty; i++) {
+        await tester.runAsync(() => Future<void>.delayed(const Duration(milliseconds: 50)));
+        await tester.pump(const Duration(milliseconds: 50));
</file context>
Suggested change
for (var i = 0; i < 10 && find.byType(SnackBar).evaluate().isEmpty; i++) {
await tester.runAsync(() => Future<void>.delayed(const Duration(milliseconds: 50)));
await tester.pump(const Duration(milliseconds: 50));
// just_audio settles a failed load through real platform-channel replies.
final deadline = DateTime.now().add(const Duration(seconds: 2));
while (find.byType(SnackBar).evaluate().isEmpty && DateTime.now().isBefore(deadline)) {
await tester.runAsync(() => Future<void>.delayed(const Duration(milliseconds: 20)));
await tester.pump(const Duration(milliseconds: 20));
}
if (find.byType(SnackBar).evaluate().isEmpty) fail('SnackBar never appeared after the failed load');

Comment thread app/lib/l10n/app_en.arb
}
}
},
"transcriptSpeakerCount": "{count, plural, =1{1 speaker} other{{count} speakers}}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The =1/other authoring is compiled by gen-l10n into the CLDR one/other named parameters of Intl.pluralLogic (visible in every generated file, e.g. ru: one: '1 участник'), and the intl runtime fires one for every count the locale's CLDR one rule covers — not only exactly 1. For ru/uk/be/pl/cs/sk/lv/lt/hr/sr/bs/sl, one also matches 21, 31, 41…, so a group meeting whose transcript has 21 distinct speakers (Omi records meetings) would render the literal singular text ("1 участник") instead of "21 участник". Prefer authoring full CLDR categories for those locales, or at least include {count} in the singular variant so the one branch stays readable when it fires for 21/31/….

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/l10n/app_en.arb, line 14445:

<comment>The `=1`/`other` authoring is compiled by gen-l10n into the CLDR `one`/`other` named parameters of `Intl.pluralLogic` (visible in every generated file, e.g. ru: `one: '1 участник'`), and the intl runtime fires `one` for every count the locale's CLDR `one` rule covers — not only exactly 1. For ru/uk/be/pl/cs/sk/lv/lt/hr/sr/bs/sl, `one` also matches 21, 31, 41…, so a group meeting whose transcript has 21 distinct speakers (Omi records meetings) would render the literal singular text ("1 участник") instead of "21 участник". Prefer authoring full CLDR categories for those locales, or at least include `{count}` in the singular variant so the `one` branch stays readable when it fires for 21/31/….</comment>

<file context>
@@ -14441,5 +14441,14 @@
             }
         }
+    },
+    "transcriptSpeakerCount": "{count, plural, =1{1 speaker} other{{count} speakers}}",
+    "@transcriptSpeakerCount": {
+        "description": "How many people spoke, after the length in the transcript's heading: Transcript · 14 min · 2 speakers",
</file context>

? null
: startedAt == null
? OmiDuration.offset(data.start)
: OmiDateFormat.of(context).time(startedAt.add(Duration(milliseconds: (data.start * 1000).round())));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Line clock times are computed as startedAt + segment offset, which is only correct when startedAt is the exact moment the recording's audio at offset 0 began. The caller passes conversation.startedAt ?? conversation.createdAt (transcript_tab.dart getTranscriptWidget(...) call), so for older conversations without a startedAt field the times are based on record-creation/upload time, which can be tens of seconds to minutes after the audio actually started — every line in such conversations then shows a systematically shifted clock time. The repo even documents that the session startedAt→finishedAt span over-counts the transcript span (conversation.dart, #4056), so startedAt is not guaranteed to equal the audio start either. Show clock times only when startedAt is known to be the recording start; otherwise fall back to the OmiDuration.offset display (or hide the time) rather than treating createdAt as the audio start.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/widgets/transcript.dart, line 1164:

<comment>Line clock times are computed as `startedAt + segment offset`, which is only correct when `startedAt` is the exact moment the recording's audio at offset 0 began. The caller passes `conversation.startedAt ?? conversation.createdAt` (transcript_tab.dart `getTranscriptWidget(...)` call), so for older conversations without a `startedAt` field the times are based on record-creation/upload time, which can be tens of seconds to minutes after the audio actually started — every line in such conversations then shows a systematically shifted clock time. The repo even documents that the session startedAt→finishedAt span over-counts the transcript span (conversation.dart, #4056), so `startedAt` is not guaranteed to equal the audio start either. Show clock times only when `startedAt` is known to be the recording start; otherwise fall back to the `OmiDuration.offset` display (or hide the time) rather than treating `createdAt` as the audio start.</comment>

<file context>
@@ -1131,11 +1137,140 @@ class _TranscriptWidgetState extends State<TranscriptWidget> {
+        ? null
+        : startedAt == null
+            ? OmiDuration.offset(data.start)
+            : OmiDateFormat.of(context).time(startedAt.add(Duration(milliseconds: (data.start * 1000).round())));
+
+    final who = Row(
</file context>

conversationCount: 1),
]);
await a.tester.runAsync(folders.loadFolders);
await a.pump(ConversationDetailPage(conversation: conversation), providers: [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This is the only scenario that never registers its conversation with the fixture server. Every sibling scenario calls a.server.conversations.add(conversation.toJson()) before pumping (see conversation-detail-summary, conversation-detail-screenshots), while _pumpDesignConversation seeds only the in-memory ConversationProvider. The page's post-frame hydration (provider.initConversation()) can thereby hit a 404 for audit-design on the hermetic server, and the screenshots silently depend on the provider cache absorbing the miss. Register the conversation with the server for parity and robustness.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/integration_test/visual_audit/scenarios/conversation_detail.dart, line 128:

<comment>This is the only scenario that never registers its conversation with the fixture server. Every sibling scenario calls `a.server.conversations.add(conversation.toJson())` before pumping (see `conversation-detail-summary`, `conversation-detail-screenshots`), while `_pumpDesignConversation` seeds only the in-memory `ConversationProvider`. The page's post-frame hydration (`provider.initConversation()`) can thereby hit a 404 for `audit-design` on the hermetic server, and the screenshots silently depend on the provider cache absorbing the miss. Register the conversation with the server for parity and robustness.</comment>

<file context>
@@ -52,7 +56,97 @@ final _cachedDavid = {
+                conversationCount: 1),
+          ]);
+  await a.tester.runAsync(folders.loadFolders);
+  await a.pump(ConversationDetailPage(conversation: conversation), providers: [
+    ..._detailProviders(conversation),
+    ChangeNotifierProvider<FolderProvider>.value(value: folders),
</file context>
Suggested change
await a.pump(ConversationDetailPage(conversation: conversation), providers: [
a.server.conversations.add(conversation.toJson());
await a.pump(ConversationDetailPage(conversation: conversation), providers: [

@Git-on-my-level

Copy link
Copy Markdown
Member

Reviewed the conversation-page v3 work against the current head — this is a well-built, cohesive redesign and the playback rework in particular fixes real failure modes. Some notes from the review, none blocking:

What held up well on close reading

  • conversation_bottom_bar.dart: ConversationPlaybackPlan.resolve() (dense MP3 → playable parts → explicit failure) plus the pending-artifact polling and immediate no-files error is a real fix for the "Play flips to Pause with nothing playing" class of bug. Player disposal on load failure so the next tap retries, and the _segmentSeekGeneration guard on segment-stop handlers (Segment playback starts at wrong timestamp and keeps playing  #4471), are both correct.
  • transcript.dart: saved conversations opening at the first line while only live transcripts follow the latest line (shouldFollow now gated on !isConversationDetail) is the right split, and the clock-time label falls back to a recording offset cleanly when startedAt is unknown.
  • The ConversationTab enum replacing magic tab ints across page.dart, conversation_list_item.dart, and global_search.dart removes a whole class of order-dependent bugs; tests were migrated with it.
  • scripts/l10n.py check passes: 49 locales, 3600 keys, generated localizations fresh.
  • New conversation_audio_playback_test.dart covers the happy path and the expired-URL failure path; transcript_test.dart gained saved-conversation line coverage.

Follow-up polish worth addressing

  1. Swipe before hydration can be reverted. _hasExplicitTabSelection is set on tab tap (page.dart, onTap and the tap handler) but not when the user swipes to Summary; _selectInitialTabIfNeeded can then animate them back to Transcript once detail hydration completes for a transcript-only fragment. Marking settled controller changes as explicit too would close this.
  2. Tap targets. The new 34 pt ConversationDetailChip capsules look right, but the tappable ones (folder, recordings, visibility) should keep a 44 pt minimum activation target.
  3. transcriptSpeakerCount plurals. Several Slavic locales (ru, uk, pl, cs, sk, and friends) use a "Noun: {count}" other form, which reads fine but sidesteps the locale's one/few/many categories. Proper plural forms would be more grammatical when the tooling regenerates.

One process note: Dart Analyze & Tests was skipped on this head, so the merged-with-main state hasn't had the app test suite run on it yet.

Product-direction items — the Tasks tab moving out of the conversation page (tasks stay on the Tasks page) and the summary app picker relocating into the ⋯ menu — are deliberate and documented in the changelog entry; they need a maintainer's product sign-off before merge rather than any code change.

Thanks @Itaxh1 — the changelog entry, test coverage, and l10n discipline made this straightforward to review despite the size.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge labels Oct 1, 2026
- conversation_detail/page.dart: keep the PR's removal of the top-bar Ask Omi
  button (moved to the bottom bar); main's startFresh removal is inside the
  deleted block.
- l10n: three-way union of all ARB files (PR adds transcriptSpeakerCount,
  main swaps update keys; no same-key value collisions) and regenerate all
  localization Dart files with Flutter 3.44.5 (matches CI pin).
- conversation_audio_playback_test.dart: dart format --line-length 120.
@Git-on-my-level
Git-on-my-level self-requested a review as a code owner October 1, 2026 13:17
- conversation_detail/page.dart: keep the PR's removal of the top-bar Ask Omi
  button (moved to the bottom bar); main's startFresh removal is inside the
  deleted block.
- l10n: three-way union of all ARB files (PR adds transcriptSpeakerCount,
  main adds update keys and Siri shortcut hints; no same-key value collisions)
  and regenerate all localization Dart files with Flutter 3.44.5 (CI pin).
- conversation_audio_playback_test.dart: dart format --line-length 120.
Includes the conversation_audio_playback_test.dart dart format fix produced
with the app package's formatter context (matches the CI Formatting gate).
@Git-on-my-level
Git-on-my-level merged commit 298baab into BasedHardware:main Oct 1, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conversation page: large title, Summary | Transcript tabs at the top, and a plain transcript (v3 design)

2 participants