Skip to content

fix(app): move catch-up status from Home to Device - #23044

Merged
Git-on-my-level merged 5 commits into
mainfrom
lane/catching-up-row
Oct 21, 2026
Merged

Git-on-my-level merged 5 commits into
mainfrom
lane/catching-up-row

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

P30: a large offline-audio backlog, or a sync job without one target conversation, no longer adds a standalone row to Home. The device page's Catching up card now covers waiting transfers and server-only work, shows a status line in On the Way's own words, the available audio span and the target conversation titles/count, and opens On the Way. Progress is deliberately indeterminate (no bar, no "X of Y min") per lead ruling d02cce — see "Review history" below.

The inline "adding … from your Omi" status on a single conversation, Recently log, and bell failure/retry entries remain in place. Uses existing app typography, icons and localized copy; on by default. Includes a mobile changelog fragment.

Product invariants affected

none (routine UI change; existing INV-UI-1 and INV-UI-3 primitives retained).

How it was verified

  • 116 targeted Flutter widget/performance/semantics tests passed at the final head (/Volumes/Ephemeral/scratch/catching-up-row/p30b-tests-indeterminate3.log): Home backlog and loading states, server jobs with zero/one/several targets, the device card's indeterminate state for a device backlog, phone-only audio and server-only work, the synced-twin and terminal-failure cases, device card navigation and clearing, 200% text scaling, existing device controls, inline filling, bell attention/retry, and sync notification isolation (the status line reads the memoized snapshot, never the WAL list, so the per-tick inventory-read guard still passes).
  • bash app/scripts/analyze_ratchet.sh passed; no baseline changes.
  • Production visual-audit harness renders passed for the first commit (Home before/after, initial load, the large device backlog, zero/multiple server targets; the card was tapped through to On the Way). Synthetic fixtures only; no customer data or GCP tier used.
  • OMI_PR_BODY_FILE=<draft> pre-push gate passed all selected checks on every push. Exact-head GitHub workflow results are recorded before merge. No physical-device or TestFlight build was performed; the next TestFlight build picks up the merge.

Tests

home_pending_row_test.dart and home_processing_pending_row_test.dart assert no Home pending row through local backlog, upload/fetch, loading, processing, and server-target states, and On the Way's twin/piece rules. device_catching_up_test.dart covers the production device route: status text with no LinearProgressIndicator for a device backlog, phone-only audio and server-only work; known/unknown targets; completion; a synced phone twin hiding the card instead of opening an empty page; terminal failures never holding the card; accessibility. pending_work_test.dart retains the real failure/retry checks and adds a catch-up-only bell regression. Visual scenarios live in integration_test/visual_audit/scenarios/offline_processing.dart.

Review history (grok reviewer per lane_routing.json; 5 rounds, rounds 3–5 lead-ruled)

  • Round 1 (FIX-FIRST): the card could open an empty On the Way page (a synced same-id phone copy hid the device source on the page but not on the card); per-tick inventory rescans; phone-only audio labelled "Processing"; retry-exhausted audio padding the total. Fixed in 9e2d4b36673.
  • Rounds 2–4 (FIX-FIRST each): my attempts to compute drain progress from WAL timestamps (coverage by id, then by recording span; folding copied pieces into their source) kept surfacing real device shapes they were wrong for — a short uploaded chunk hiding its whole source, double-counted pieces, a bar rewinding when a chunk resolved to synced, ring sources stamped now − estimate, Limitless flash stalls rewriting seconds to the remaining pages, adjacent storage files sharing a boundary second (91cd49c37e9, 3d574c226ed).
  • Lead ruling d02cce: drop the progress math. 2bbb01f6527 reverts the round 2–4 coverage/fold changes to main's same-id twin rule, makes the card list exactly On the Way's rows (shared SyncPendingWork.syncingOf) so it can never open an empty page, removes the bar and the "X of Y" line in favour of a status line (SyncPendingWork.stageLabelFor), and keeps the memoized snapshot and split selects from round 1. Accurate drain progress is filed as follow-up debt on the swarm bus (reuse SyncRunTracker, the Offline Sync page's high-water model).
  • Round 5 (FIX-FIRST) → lead ruling 7b88dc: merge. The reviewer's P1 is main's pre-existing same-id twin hide (a first SD-card chunk shares its source's id, so an uploaded/synced chunk hides the whole miss source until the clear acknowledges); this PR restores that rule per d02cce and makes the card consistent with On the Way rather than introducing it. Its P2 (the span line uses [timerStart, timerStart+seconds], wrong for a Limitless flash stall that rewrites seconds to the remaining pages) is deferred. Both are recorded in debt item 04e112.

UI evidence

Real Flutter widget captures at 390 × 844 logical pixels (Android harness), using synthetic data. The harness has pre-existing missing fallback-font glyphs in unrelated header/emoji text. The before Home render was captured from base e2f942e7d8b6f77693d3a9873e346e4bccc319ac; after renders were captured at the first commit 02b900907dc.

Note: captures 003–005 predate ruling d02cce and still show the progress bar and the "0 of 180 min" line, which the final head no longer renders (the status line, span, targets and link are unchanged). The capture harness was not re-run inside the merge window; re-captures ride the follow-up. The tracked evidence.json says so for 003.

Before: Home with backlog After: Home with the same backlog
Home before Home after
Device: large backlog (pre-ruling, bar since removed) Device: several conversations Device: targets unknown
Large backlog Multiple targets No target yet

Device card opens On the Way

Failure class (fixes)

Failure-Class: none

This implements the ratified episodes design placement; it does not change sync execution or failure handling.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T16:39:44.526313Z 2bbb01f 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.

@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: 02b900907d

ℹ️ 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".

super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (!mounted) return;
unawaited(_pendingWork.refresh());

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 Refresh server-only work while the page remains open

For server-only jobs, this one-shot refresh is the only update initiated by the Device page. If a job completes after the initial request, neither PendingWorkStore nor OnTheWayPage polls or receives a completion event, and this ListView has no pull-to-refresh path, so _pendingWork.pending keeps the completed item and the Catching up card remains visible until another screen refreshes the singleton or the route is reopened. Add polling or a completion-triggered refresh while server work is displayed.

Useful? React with 👍 / 👎.

Comment on lines +23 to +24
DeviceCatchUpLocal deviceCatchUpLocal(List<Wal> wals) {
final amounts = SyncPipelineAmounts.of(wals);

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 Exclude terminal WALs from catch-up progress

When an active pending WAL coexists with a failed WAL, hasPending is set only from forward-moving/uploaded WALs, but SyncPipelineAmounts.of(wals) also counts WalSyncDisplayState.failed as syncable. Consequently a failed phone WAL can be included in both movedSeconds and totalSeconds, making the new card report progress such as “60 of 65 min” even though the only active five-minute transfer has not moved; terminal work belongs to the attention flow and should be filtered out before computing this card's amounts.

Useful? React with 👍 / 👎.

Comment on lines +640 to 642
// Phone-local recordings stay with their conversations. Device catch-up lives on Device.
const SliverToBoxAdapter(child: OnDeviceQueueBanner()),
const SliverToBoxAdapter(child: HeldAudioHomeSection()),

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 Keep catch-up reachable without a paired device

Server-only jobs from another device and phone-created processing conversations can exist when this installation has no remembered wearable, but moving the only status row off Home makes their details unreachable through the normal UI in that state. The active ring's pill routes to ConnectDevicePage when SharedPreferencesUtil().btDevice.id.isEmpty (battery_info_widget.dart:178-183), and the Settings Device group hides DeviceSettings unless a device is connected or remembered (settings_groups.dart:127-129); since DeviceSettings is now the only production caller of OnTheWayPage, these users see an activity ring that can only start device onboarding rather than explain the active work.

Useful? React with 👍 / 👎.

Comment on lines +83 to +85
for (final conversation in processing) {
ids.add(conversation.id);
include(conversation.startedAt, conversation.getDurationInSeconds());

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 Exclude the optimistic placeholder from target counts

Immediately after Process Now, ConversationProvider.processingConversations contains OptimisticProcessingPlaceholder.conversation(), whose ID is the sentinel '0' rather than a real conversation ID. Adding every processing ID here makes the Device card display “1 conversation” even though no target conversation exists yet and no title can be resolved; filter out OptimisticProcessingPlaceholder.id before building targetIds, while still allowing the processing state itself to keep the card visible.

Useful? React with 👍 / 👎.

Review round 1 of #23044 (one P1, three P2):

- A synced phone copy hid its on-device source from On the Way while the
  card still counted it, so a visible card could open "All recordings are
  synced". The twin is now hidden only when the phone copy stands for the
  whole recording (uploaded, or synced pieces covering its length), and
  the card lists exactly the rows On the Way renders.
- Retry-exhausted audio no longer inflates the progress denominator; the
  bell keeps the failure.
- Phone-local waiting audio gets a measured bar instead of an
  indeterminate "Processing".
- The device snapshot is memoized on the WAL list identity and the server
  flag selects on its own, so a per-chunk progress tick no longer rescans
  the inventory on the UI isolate.
Review round 2 of #23044 (two P1, one P2), ruled fixable in-PR by the
lead (bus 35acab):

- An uploaded same-id phone chunk hid its device source at any length,
  so mid-drain a 60 s uploaded first chunk made 179 min of device audio
  vanish from the card (which read "Processing") and On the Way.
  Uploaded and synced phone seconds now both count toward coverage; a
  phone copy hides its source only once it covers the source's length.
- The card's totals did not apply On the Way's piece-of-source fold: a
  20 min source plus its 15 min phone piece read "15 of 35 min". The
  snapshot now folds pieces into their source (shared
  SyncPendingWork.sourceOfPiece): the source stands for the whole
  recording and each piece counts once as audio that left the device.
- Phone-recorded audio counted as already moved ("180 of 180" with a
  full bar, flipping to "Processing" on upload). Moved now counts only
  audio that left device storage, so phone-only audio reads a measured
  "0 of 180 min" that fills as it uploads.

@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: 91cd49c37e

ℹ️ 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".

for (final w in wals) {
if (walIsOnDevice(w)) continue;
if (w.status == WalStatus.uploaded || w.status == WalStatus.synced) {
phoneCopySeconds[w.id] = (phoneCopySeconds[w.id] ?? 0) + (w.seconds > 0 ? w.seconds : 0);

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 Account for every drain chunk when hiding the source

For device recordings longer than the 60-second chunk size, the drain registers each phone chunk with an incremented timerStart, while Wal.id is derived from device and timerStart. Consequently only the first chunk shares the source ID and contributes to this map; later chunks never count toward the comparison at line 64. If the fully copied device source remains briefly as miss, the Catching up card and On the Way continue showing the completed source. Associate chunks with their source using the device/time-range logic already provided by sourceOfPiece rather than requiring identical IDs.

Useful? React with 👍 / 👎.

Comment on lines +45 to +47
final uploadedRow = w.status == WalStatus.uploaded;
final pendingRow = !uploadedRow && SyncPendingWork.isPendingWal(w) && !hidden.contains(w.id);
if (!uploadedRow && !pendingRow) continue;

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 synced drain chunks in transferred progress

When a copied device chunk advances from uploaded to synced while the remaining source WAL is still pending, both predicates become false and the chunk stops contributing to copiedBySource. The displayed transferred amount can therefore move backward—for example, from 1 of 3 minutes to 0 of 3—even though that audio has already left the device. Synced phone chunks that overlap a visible source should continue contributing to movedSeconds without becoming standalone pending rows.

Useful? React with 👍 / 👎.

Comment on lines +147 to +149
progress: local.hasPending && local.onDeviceSeconds + local.onPhoneSeconds > 0 && local.totalSeconds > 0
? (doneSeconds: local.movedSeconds, totalSeconds: local.totalSeconds)
: 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 Avoid measured completion with unmeasured server work

When a local backlog coexists with a PendingWorkItem from another device, this condition still derives the bar solely from the local WAL total. The card can consequently show a full “5 of 5 min” bar while unrelated server work remains pending, then abruptly switch to indeterminate “Processing” after the local WAL clears. If any server item cannot be correlated with the measured local rows, keep the combined card indeterminate or label the bar explicitly as local-transfer progress.

Useful? React with 👍 / 👎.

Comment on lines +138 to +140
for (final id in ids) {
final conversation = [...conversations, ...processing].where((c) => c.id == id).firstOrNull;
final title = conversation?.structured.title.trim() ?? '';

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 Index conversation titles before resolving targets

For an account with many loaded conversations and many pending target IDs, every ConversationProvider notification rebuilds this summary and, for each ID, allocates a new combined list and scans the entire conversation history. This makes the build cost O(targets × loaded history) on the UI isolate and can stall the Device page during a large catch-up. Build one ID-to-title map per summary calculation, or select a memoized projection instead of repeatedly spreading and scanning both lists.

Useful? React with 👍 / 👎.

Review round 3 of #23044 (one P1): a synced phone piece was skipped by
the card's row filter, so a chunk resolving uploaded -> synced rewound
the bar ("1 of 180 min" back to "0 of 180 min"), and chunks after the
first carry later starts — different ids — so id-based coverage never
summed a full drain and its lagging source stayed visible at zero.

- deviceCatchUpLocal folds synced pieces of a still-visible source into
  moved audio exactly like uploaded ones; a synced wal that is no
  visible source's piece stays unlisted (done).
- hiddenDeviceTwinIds sums coverage over the source's recording span
  (same-id copies or drain pieces with on-device originalStorage), so a
  fully synced chunk drain hides its lagging source instead of showing
  an empty "0 of N", with one time-window check to keep the pass linear
  on large inventories.

Not pushed: round 3 found a new P1, so the lane stops and asks the lead
before publishing or starting another review round.

@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: 3d574c226e

ℹ️ 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 +76 to +78
final end = src.timerStart + (src.seconds > 0 ? src.seconds : 0);
if (w.timerStart >= src.timerStart && w.timerStart <= end) {
coveredSeconds[src.id] = (coveredSeconds[src.id] ?? 0) + seconds;

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 Use half-open source ranges

When two device WALs from the same device are contiguous, a copied chunk beginning at the second WAL's start also satisfies w.timerStart <= end for the first WAL. hiddenDeviceTwinIds then credits that chunk to both sources and can hide the uncopied first recording; the same inclusive check in sourceOfPiece can attribute its progress to the wrong source. Treat the end timestamp as exclusive so a chunk at the boundary belongs only to the later recording.

Useful? React with 👍 / 👎.

Comment on lines +73 to +74
for (final src in candidates) {
if (src.device != w.device) continue;

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 Index source spans before matching chunks

For a large device drain containing many source WALs and copied phone chunks, every non-device WAL scans every candidate source here, making hiddenDeviceTwinIds O(sources × chunks), despite the comment describing the pass as linear. This runs on the Flutter UI isolate when the Device page rebuilds for refreshed inventories and is also called by syncing, so a substantial backlog can visibly stall the page; index the source spans by device/time or advance through sorted intervals instead of performing the nested scan.

Useful? React with 👍 / 👎.

Lead ruling (bus d02cce) after review rounds 2-4: drop the progress
math. Inventory-timestamp arithmetic for drain progress was wrong for
ring sources stamped now-estimate, Limitless flash stalls that rewrite
seconds to the remaining pages, and adjacent storage files sharing a
boundary second; each round surfaced another shape.

- Revert the round 2-4 coverage and piece-fold changes: a device twin
  is hidden by main's same-id rule (an uploaded or synced phone copy),
  and the card lists exactly the rows On the Way lists via the shared
  SyncPendingWork.syncingOf, so it can never open an empty page.
- The card shows no bar and no "X of Y min": a status line in On the
  Way's own words (waiting, downloading, uploading, transcribing, or
  the cooldown), the audio span, the target conversations and the
  On the Way link. The status reads sync state plus the memoized
  snapshot, never the WAL list, so a progress tick stays isolated.
- Tests cover the indeterminate state for a device backlog, phone-only
  audio and server-only work, plus the twin and terminal cases; the
  visual-audit scenario and changelog fragment say status, not progress.

Accurate drain progress is filed as follow-up debt on the bus.

@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: 2bbb01f652

ℹ️ 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".

for (final w in rows) {
if (w.conversationId case final id? when id.isNotEmpty) ids.add(id);
if (w.seconds <= 0) continue;
if (walIsOnDevice(w)) onDeviceSeconds += w.seconds;

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 retryable failures in the on-device total

When a connected device has a miss WAL whose automatic retries are exhausted, syncingOf excludes it because failed is not forward-moving, so this sum reports zero even though the audio remains on the wearable and can still be manually retried. Previously the Device page used SyncPipelineAmounts, which deliberately includes failed WALs in onDeviceSeconds; compute the stats total independently from the catch-up card's forward-moving rows so the “On device” tile remains accurate.

Useful? React with 👍 / 👎.

Comment on lines +141 to +145
Text(
summary.status,
key: const Key('device_catching_up_status'),
style: OmiType.footnote.copyWith(color: OmiColors.textSecondary),
),

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 Announce catch-up status changes

When a VoiceOver or TalkBack user remains on this page while the catch-up stage changes from waiting to downloading, uploading, or transcribing, this plain Text updates silently because it is not a live region. The removed Home indicator explicitly used Semantics(liveRegion: true), so moving the status here regresses announcement of ongoing state changes; wrap the changing status (or an appropriately concise card label) in a live-region semantic node.

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

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit aa7e1d6 into main Oct 21, 2026
52 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/catching-up-row branch October 21, 2026 17:01
Git-on-my-level added a commit that referenced this pull request Oct 21, 2026
Prepares App Store release notes for the next stable 1.0.571 build,
covering pendant audio continuity, scrolling/freezes/crashes,
catching-up status on the Device page, and the live recording timer.
Follows the existing 1.0.568 release JSON format and omits the
beta-gated episodes UI.

Store submission is separately gated on the processed TestFlight build
containing #23076, #23054, and #23044, green tests/CI and tester
eligibility. Submission will use MANUAL release with no phased release;
David controls release. Android rollout is unchanged.

Validation: mobile changelog schema and derived iOS notes passed; 14
preflight checks passed. Independent Luna review: SHIP, no P0/P1;
applied its suggested wording for catch-up details and the per-second
live-page timer. GitHub CI must finish green at the final head before
merge.

Product invariants: no production behavior changes (release-note data
only).
Git-on-my-level added a commit that referenced this pull request Oct 23, 2026
…sh session (#23371)

## What

Ending a conversation now looks like it did something, and the next one
starts cleanly (David, 2026-10-23). This covers Wrap up, a pendant
double-tap and Finish.

- **Processing row is back on Home.** The ended conversation shows as
"Processing…" under the live row right away, then turns into its own
row. Home lost this row with #23044, which removed the only surface that
drew `processingConversations`.
- **Fresh session at 0s.** All three triggers share one finalize hook,
`CaptureExternalActions.onLiveFinalized`, called from
`forceProcessingCurrentConversation`. `EpisodeProvider.onLiveFinalized`
closes the live episode (`POST /v1/episodes/{id}/wrap-up` with no
conversation id closes it on the server at once), never adopts that
episode again while the server still reports it live, and restarts
`LiveStartAnchor` at the moment of the finalize. The label then never
jumps back when the next episode opens at its first words.
- **Wrap up never pauses the pendant.** Pressing it right after a
double-tap or a server split used to call `pauseCapture`, because the
capture's segments were already empty. With nothing new it now just
closes the episode and restarts the clock.
- **Paused reads Paused.** The Home row shows no running clock while
paused. The live page leads with one-tap **Resume**, with Wrap Up Now
beneath it.
- **The old speaker prompt card is deleted.** Review ("Questions for
you") is on in every prod deploy (`REVIEW_SURFACE_MODE=on`) and every
app is eligible, so the older card (with its play button) only ever
appeared as Review's stand-in while availability loaded, which made it
flash at every launch. Deleted: `speaker_tag_prompt_card.dart` (752
lines), its test, its two visual-audit scenarios, and the integration
capture built around it. `ReviewEntryCard` draws nothing until Review is
known on. Dead-code ratchet passes. Test:
`test/pages/review/review_widgets_test.dart`.
- **Double-tap:** a light haptic, and a second double-tap within 3 s is
ignored.

The backend change that makes the server close the episode immediately
on every finalize path is in a separate backend PR. This app change is
correct without it.

Builds on #23366 (merged).

## Screens

Rendered from the real widgets (iOS platform, SF Pro).

![Home right after Wrap
up](https://raw.githubusercontent.com/BasedHardware/omi/6bea7ac57c5b6a41de828d7836924cda0eabecba/.agent-artifacts/ui-evidence/home-finalize/001-mobile-ios-home-after-wrap-up.png)
![Paused live page with
Resume](https://raw.githubusercontent.com/BasedHardware/omi/6bea7ac57c5b6a41de828d7836924cda0eabecba/.agent-artifacts/ui-evidence/home-finalize/002-mobile-ios-live-page-paused-resume.png)

## Tests

- `test/unit/live_start_anchor_test.dart`: the restart counts from the
finalize and never jumps back; an ended episode is never re-adopted;
ending with nothing live still restarts.
- `test/widgets/episodes_ui_test.dart`: Wrap up with nothing new never
pauses; while paused Resume leads and resumes.
- `test/perf/home_after_detail_perf_test.dart`: the processing row sits
under the live row and leaves when the conversation is replaced.
- 278 existing related tests unchanged and passing (capture provider,
processing reconcile, placeholder, spine, Home pending rows,
process-now).

Line-Count-Exception: app/lib/services/capture/capture_controller.dart |
4501 -> 4507 | the finalize hook must fire where the processing
placeholder is added; the debounce state lives in
live_finalize_gate.dart

## Product invariants affected

- INV-DATA-1: `app/lib/main.dart` only adds `EpisodeProvider` to the
capture provider's dependencies so the finalize hook can reach it. No
endpoint, environment, Firebase project or data plane changes.
- INV-CAP-1: `app/lib/services/capture/**` adds a hook call and a
double-tap debounce next to the existing processing placeholder. No
socket, subscription, WAL or audio path changes, and Wrap up now pauses
the pendant less often (never), so no frame is dropped that was kept
before.
- INV-MEM-4 and INV-TASK-2:
`backend/utils/conversations/process_conversation.py` arrives through
#23366, stacked under this branch. It changes Home salience (a
presentation field) only, with no memory intake or task writes. This
branch adds no backend change.

Failure-Class: FC-generated-presentation-contract-bypass
(From #23366's salience fix, stacked under this branch.)

## Risk

Client-only. Rollback is a revert. No data changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
ocakciomursel-pixel pushed a commit to ocakciomursel-pixel/omi that referenced this pull request Oct 23, 2026
…sh session

Wrap up, a pendant double-tap and Finish now share one finalize hook. Home shows the
ended conversation as a Processing row under the live row again (the row went away
with BasedHardware#23044). The live episode closes at once and a fresh one counts from 0. An ended
episode is never adopted again while the server still reports it live.

Wrap up never pauses the pendant any more. A paused session reads "Paused" with no
running clock, and its page leads with one-tap Resume. A second double-tap within 3 s
is ignored, and a double-tap gives a light haptic.

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