Repository navigation
Show manual finish progress on Home v3 - #26080
Git-on-my-level merged 11 commits into
Conversation
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a61a180e11
ℹ️ 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".
| _finishExpiry = Timer(OptimisticProcessingPlaceholder.timeout, () { | ||
| _clearManualFinish(); | ||
| notifyListeners(); |
There was a problem hiding this comment.
Keep polling accepted finishes after the optimistic row expires
If a v3 phone finish is accepted but reconciliation has not listed its conversation within two minutes, this timer clears the only pending-finish marker. ConversationsPage polls the list only while finishRow != null or a listed conversation is mid-pipeline, so with no derived row yet and /conversations/live remaining null, subsequent Home ticks never fetch the eventual result. This becomes a regression because presentFinishOutcome now skips FinishedCapturePage, whose polling previously continued for up to 20 minutes. Keep pending-finish tracking alive until a successor is observed, or expose a retryable timeout instead of silently dropping both the row and its polling.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 026ca50. An accepted finish cancels the optimistic expiry and stays on Home's poll path until a visible successor arrives. The Home regression advances past two minutes with no live window.
|
|
||
| void acknowledgeManualFinish(ServerConversation row) { | ||
| if (!identical(finishRow, row)) return; | ||
| _clearManualFinish(keepClosedLive: true); |
There was a problem hiding this comment.
Reset Listening suppression when a new capture session starts
After a successful finish is handed off, this call cancels _finishExpiry but leaves _suppressListening true. For the same account, it remains set until _read() returns a different non-null live window; starting another capture does not reset it. Consequently, a fresh phone recording or reconnected pendant with no server window inherits the previous recording's suppression: ConversationsPage hides V3LivePlaceholderRow while also deferring the normal capture card, leaving the new capture without a live row until the server publishes a window. Preserve suppression of the closed window ID, but scope Listening suppression to the finished capture identity and clear it for a new session.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 026ca50. Listening suppression matches the capture's client-minted recording ID. The Home regression switches capture IDs after handoff while the server has no live window and verifies Listening appears.
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84d340a74b
ℹ️ 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".
| final conversationRows = showManualFinish | ||
| ? _withProcessingRows(rowsWithLocalProcessing, [manualFinish], clock.now()) |
There was a problem hiding this comment.
Route the Processing row with a real recording identity
If the user taps this row before handoff, ProcessingConversationRow._open opens an EpisodePage whose sole member has the optimistic sentinel ID 0. EpisodePage resolves updates by the original member IDs, while settleManualFinish leaves _finishRow as the sentinel, so the opened page cannot adopt the returned recording or derived conversation. Covering Home also suspends its polling. The new pending-result entry therefore leads to a synthetic episode that cannot complete. Route it through the v3 pending-result flow using a real recording identity, or prevent opening it until that identity is available.
AGENTS.md reference: app/AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 026ca50. The synthetic row has no tap action or chevron. The Home regression taps it before settlement and verifies no route opens.
| CaptureProvider provider, { | ||
| EpisodeProvider? episodes, | ||
| bool retry = false, | ||
| bool v3Feedback = false, |
There was a problem hiding this comment.
Propagate the v3 finish policy to Home's finish callers
On a v3 account, Home's Wrap Up (home_recording_bar.dart:106), record-button stop (battery_info_widget.dart:368) and row-swipe Finish still omit this argument, so they bypass the new v3 outcome classification. For example, a 404 is announced as “Already saved. It's on Home.” from these controls, but becomes a failure from the live page or the updated Home retry helper. Pass finishFeedbackEnabled through all manual-finish callers, or resolve it centrally, so the same operation does not report success or failure depending on its entry point.
AGENTS.md reference: app/AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 026ca50. The shared finish helper reads the v3 policy from context for every caller. A regression exercises the helper from Home and verifies a 404 yields FinishFailed.
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui 026ca50 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 026ca50b56
ℹ️ 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".
| final homeShowsProcessing = outcome is FinishProcessing && v3?.finishRow != null; | ||
| final page = homeShowsProcessing ? null : finishedPageFor(outcome); |
There was a problem hiding this comment.
Preserve the result route when Home filters hide the processing row
When a v3 user finishes a phone recording while Home is filtered to an earlier date range, finishRow exists even though conversations_page.dart:912–921 disables the manual-finish row outside defaultHome. showNewestOnHome() only selects the tab and scrolls it; it does not clear the filter. This condition therefore skips FinishedCapturePage and returns to filtered results containing neither the promised Processing row nor the eventual conversation. Keep the result route for filtered views, or clear the filters before handing off to Home.
AGENTS.md reference: app/AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 964def3. Wrap Up now opens FinishedCapturePage when Home has an active date filter. The widget regression verifies the result recording ID and that the filter is preserved.
| v3!.finishHasSuccessor( | ||
| convoProvider.groupedConversations.values.expand((rows) => rows).where(shownOnV3Home)); |
There was a problem hiding this comment.
Settle pending finishes when their derived conversation fails
If summary generation fails after the recording is accepted, shownOnV3Home filters out the matching conversation because its tile state is failed. This is terminal processing (backend/database/conversations_v3_processing.py:461–468 clears v3_process_pending), but acceptance has already canceled _finishExpiry, and only a visible successor can acknowledge the finish. Consequently, Home retains a non-openable Processing row and continues list polling indefinitely while visible, despite the known failure. Handle terminal matches separately from the visible-successor handoff and replace the pending status with failure or Activity guidance.
AGENTS.md reference: app/AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 964def3. A matching failed summary now clears the Processing row, stops finish-driven list polling, and shows the localized summary failure message. The Home widget regression covers an unrelated failure and the matching terminal failure.
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui 964def3 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 964def3417
ℹ️ 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".
| _finishAccepted = true; | ||
| _finishExpired = false; | ||
| _suppressListening = true; | ||
| _finishExpiry?.cancel(); |
There was a problem hiding this comment.
Handle accepted finishes whose results stay hidden from Home
When an accepted v3 recording is subsequently classified as media or wearer-recognized background, the backend keeps its derived conversation home_hidden even after a manual finish (backend/utils/conversations/v3/visibility.py:31–37). Canceling this deadline leaves no way to settle that successful finish: Home acknowledges only a visible successor or a failed conversation, and a successfully hidden result satisfies neither. Consequently, the non-openable Processing row remains indefinitely and drives conversation-list requests every 15 seconds while Home is visible, even after processing has completed. Resolve terminal hidden results separately, or provide an explicit retryable timeout rather than an unbounded Processing state.
AGENTS.md reference: app/AGENTS.md:L3-L3
Useful? React with 👍 / 👎.
…tchet Failure-Class: FC-mobile-failure-collapsed-into-outcome-value Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui a8d35ab |
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
Failure-Class: merge-conflict Co-Authored-By: Claude Opus 5.5 <[email protected]>
…26181) ## What changed and why On Android build 1.0.598 (1620), a Google Play-billed subscriber cancelled in Google Play's subscription page (Plans & Billing → Manage subscription) and came back with Back. The sheet still said "Your Omi Pro plan will renew on <date>." Closing and reopening the sheet did not help; only relaunching the app showed "ends". Resubscribing had the same problem the other way round. The server row was right within seconds both times, so the app was simply not reading `GET /v1/users/me/subscription` again. The app now reads the plan again: 1. **When it comes back to the foreground**, on every platform. This also covers an iOS Stripe reader returning from the portal in the browser. - A small observer widget, `PlanRefreshOnResume`, wraps Home's content and calls `UsageProvider.refreshOnResume`. - At most one successful read every 2 minutes. A failed read does not start the window. - No read when signed out, and none while a Google Play purchase is on Play's sheet or being confirmed (`PlayBilling.busy`). The Play sheet closing is not the reader coming back, and the purchase reads on its own. - No read on cold start: Flutter sends no resume event on launch. 2. **When Plans & Billing opens** (`PlansSheet.initState`, so every host that shows the sheet gets it). The last answer stays on screen while the read runs and updates in place. A failed read keeps the working sheet, with no skeleton and no error state. 3. **Once more about 5 seconds after returning from Google Play's subscription page.** This happens only after the "Manage subscription" tap for a Play-billed plan, because the server learns of the change from Play's notification a few seconds after the reader is back. - This resume skips the 2-minute window. - There is exactly one follow-up and no polling. - A Google Play page that fails to open does not arm it. - Signing out cancels it. ### Race this PR introduced, and its fix `fetchSubscription()` shares a read that is already in flight. With the resume read added, the Play purchase sheet closing fired a GET at once, while the verify POST started alongside it. If that GET was still in flight when verify returned, the post-purchase `fetchSubscription()` joined it and got the stale Free answer. A reader who had just paid then saw Free under the success toast. The reviewer reproduced it: 1 GET, plan still basic. The fix has two parts: - **`fetchSubscription(fresh: true)`.** Use it when the server just changed. A read already in flight may have started before the change, so the call waits for it and then issues one more read. Its future completes with that later read, and fresh callers arriving meanwhile share the same later read. - **No resume read while a Play purchase or verify is in flight** (see 1 above). Callers that read after a server change, all now `fresh: true` (from `grep -rn fetchSubscription app/lib`): - `pages/paywall/paywall_checkout.dart`: - reactivated / resubscribe without checkout (`:85`) - Stripe checkout return (`:107`) - Play purchase verified (`:146`) - `pages/settings/widgets/plans_sheet.dart`: - upgrade / plan switch applied (`:610`) - Stripe checkout return (`:619`) - customer portal return (`:719`) - `providers/usage_provider.dart`: - Play pending-token delivery (`_deliverPendingPlayTokens`) - `restorePurchases` (Play restore) - `redeemUserSubscriptionCode` (code applied) - `cancelUserSubscription` - `upgradeUserSubscription` - `pages/settings/widgets/plans/prepaid_code_sheet.dart:83-84`: prepaid code redeemed (the read now and the one 4 s later) - `pages/settings/widgets/cancel_subscription_sheet.dart:223`: retention offer accepted - `pages/settings/widgets/yearly_switch.dart:217`: yearly switch - `pages/home/widgets/monthly_switch_sheet.dart:82, 91`: payment-issue monthly switch, after an answer and after no answer - `pages/home/widgets/payment_issue_row.dart:180`: customer portal return - the Google Play manage follow-up read Plain reads, unchanged: startup, screen opens, paywall gates, quota invalidation and the backlog poll. Also in this PR, to get the analyzer green: - `integration_test/visual_audit/demo_billing.dart` takes the `fresh` flag. - `test/widgets/finish_opens_conversation_test.dart`'s `forceRefreshConversations` override now accepts `reconcileHeldRecordings`. The analyzer on `main` fails without it, because #26080's override predates the parameter added in 9e3cc7c. ## Product invariants affected none ## How it was verified - `app/test/widgets/plan_refresh_on_resume_test.dart` (13 tests) uses a fake server whose GET answers with what the server held when the request arrived: - **The reviewer's probe, end to end through the real Play purchase path** (`PlayPlansContent` → `PaywallCheckout` → `PlayBilling`). A resume GET is held open carrying Free, the purchase is verified, and then the stale answer lands. The app ends on Pro and exactly 2 GETs were issued. Without `fresh: true` the same test sees 1 GET. - A resume while a Play purchase is being confirmed issues no GET. Without the guard it issues one. - The cases from the first round: - a resume reads once, and the sheet goes from "will renew" to "ends" and back without a relaunch; - opening the sheet reads and updates in place; - signed out: no read; - the Play manage path reads on resume plus exactly one follow-up 5 s later. - The 2-minute window (1:59 reads once, 2:00 reads again). - A failed resume read does not block the next one. - A failed read on sheet open keeps the plan on screen, with no error state. - Two fresh reads requested during a stale read share one later read. - A Google Play page that fails to open does not arm the follow-up. - Signing out cancels the pending follow-up. - `PlanRefreshOnResume` driven by `handleAppLifecycleStateChanged`: 1 read on resume when signed in, 0 when signed out, 0 when leaving. - Updated fixtures: - Test fakes that override `fetchSubscription` now accept `fresh`. - Four suites' scripted answers allow for the sheet's opening read. Assertions are unchanged. - 1117 tests pass across 94 files: every test touching the changed callers, plans sheet, paywall, Play billing, UsageProvider, Home widgets and `test/pages/home`. `flutter analyze` reports no errors. - Device evidence comes from the Android emulator test on the internal build after merge, including buying Pro on a Free test account and checking that a GET follows the verify call. ## UI evidence UI-Evidence: none -- no layout or copy change; the existing Plans & Billing line now switches between "Your Omi Pro plan will renew on <date>." and "Your Omi Pro plan ends <date>." after a resume, after reopening the sheet, and after Google Play's follow-up read, and a just-bought plan shows as Pro instead of Free; device evidence comes from the Android emulator test on the internal build after merge ## Failure class No `fix:` commits; no declaration required. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26181?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/26181?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26181&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. -->
What changed and why
SCA-3024. Home v3 immediately replaces the owned live row with a Processing row after pendant double-tap, Wrap Up, or End. Home refreshes the live window and conversation list when the request settles. End uses verified source identity when transcript segments are unavailable. Finish failures show existing localized feedback.
Rollback by setting the compile-time dart define
OMI_V3_FINISH_FEEDBACK_OFF=true.Accepted finishes keep polling until a visible successor arrives or the matching conversation reports a summary failure. A failed match clears the Processing row and shows an error. When Home is filtered, Wrap Up opens the result route and preserves the filter. Listening suppression follows the finished capture identity. The temporary Processing row has no navigation affordance, and all Finish buttons use the shared v3 outcome policy.
Product invariants affected
How it was verified
65 focused Flutter tests passed through omi-heavy with Flutter 3.44.5 in the final review round. The existing Home renders matched byte-for-byte, and the new failure render was visually inspected.
Tests
Added coverage for the pendant double-tap before the drain, verified End with no segments, Wrap Up with a 404, the Home transition from processing to the summarized card, the end of list polling after a failed summary, and the result route under a date filter.
UI evidence
Failure class
Failure-Class: FC-mobile-failure-collapsed-into-outcome-value
Line-Count-Exception: app/lib/pages/conversations/conversations_page.dart | 1550 -> 1572 | The existing Home list assembly owns placement and handoff of the transient row.
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5014 -> 5045 | The capture close owner publishes outcome feedback at the existing WAL drain and request boundaries.
Line-Count-Exception: app/lib/providers/conversation_provider.dart | 2379 -> 2388 | Home rendering and finish navigation share the same visibility predicate.