Skip to content

app: outcomes contract — every tap ends in something the user can see - #25757

Merged
Git-on-my-level merged 15 commits into
mainfrom
lane/mobile-ux-outcomes
Nov 20, 2026
Merged

Git-on-my-level merged 15 commits into
mainfrom
lane/mobile-ux-outcomes

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What this changes

Every tap now ends in something the reader can see. This PR adds §17 Outcomes to the mobile UX contract, adds four ratchet rules to check_mobile_ux_contract.py, fixes the Finish path completely, and lands the clear S1 and S2 fixes from the 2026-11-19 behaviour audit (omi-knowledge-base/projects/mobile-ux-behaviour-audit/evidence/2026-11-19-behaviour-audit.md). Each fix that has an injection seam has a test for the failing path; the ones without one are listed under C.

This PR changes the INV-UI-3 contract and its guard (product/invariants/mobile-ux-contract.md): it adds §17 and the new MUST NOT lines, and extends §2 so inline editors and full-page forms also guard unsaved input.

Product invariants affected

  • INV-UI-3: §17 Outcomes, new MUST NOT lines, four new ratchet rules.
  • INV-CAP-1: capture_controller.dart gains finishCaptureWithOutcome() and a typed mic-denied start error. The capture ownership order is unchanged (see B).

A. Contract and guards

  • app/docs/ux-contract.md §17 Outcomes keeps all nine rules from the audit draft, tightened. It names the shared pieces: FinishOutcome / presentFinishOutcome, OmiMissingTarget, applyOmiSetting and OmiUnsavedChangesGuard.
  • §2: the dirty guard now covers inline editors and full-page forms through OmiUnsavedChangesGuard.
  • product/invariants/mobile-ux-contract.md: matching MUST NOT lines.
  • New ratchet rules. Each uses the per-file no-increase shape and the omi-ux-allow escape, and each has a failing case plus precision cases in test_check_mobile_ux_contract.py. The new --totals flag prints the tree-wide counts below.
Rule Counts Tree-wide at merge base (2779f1adc04) After this PR
silent-catch catch (…) {}, and catch bodies that only log, under pages/ and providers/ 135 132
generic-error somethingWentWrong* in a call with no way forward (actionLabel: with onAction:, or onRetry:) 64 60
material-page-route MaterialPageRoute( in code (not comments) 8 7
pop-before-await a Navigator…pop( whose next await in the same block is a request 10 10 (one new deliberate pop is allow-commented)

pop-before-await ships because it was tuned on app/lib until it was precise. The naive version counted 32 hits, about half of them false positives: arrow handlers such as () => Navigator.pop(ctx, true), and a pop followed by await showOmiConfirm(…) or openAppSettings(), which moves on to the next surface. The rule now:

  • counts only a pop in a {} block, not an arrow handler;
  • counts only when the first await after the pop is a request, not show*, open*, push* or launch*;
  • stops at a case label.

That leaves 10 hits on main. All of them are real "close, then request" sites, for example add_app.dart Submit, the summary template sheet and the M1 bulk-visibility sheet.

B. Finish (C1, C4, C5, C6, C7, C9, C13): done completely

"Finish this capture" now returns one typed outcome everywhere (services/capture/finish_outcome.dart):

  • FinishOpened
  • FinishProcessing
  • FinishNothingNew(alreadySaved)
  • FinishDiscarded
  • FinishNotReceived
  • FinishSavedForLater (phone Transcribe Later)
  • FinishFailed(noAnswer | exception)

finishLiveCapture in pages/episodes/finish_capture.dart is the one path behind the live page's Finish, Home's Wrap Up and the record-button stop. It never throws, so no caller can get a bare null. presentFinishOutcome shows the outcome the same way from every entry point:

  • Success: opens the conversation, or the processing page, from every entry point, including Wrap Up and the record button (C9). Home switches to its list and scrolls to the newest row, so the new row is on screen when the reader goes back (C13).
  • Failed (no answer, timeout or any exception): the reader stays on the live page, the transcript stays on screen, and an error offers Try Again, which re-sends even though the controller has moved its lines aside (C1, C4). The Finish button stays while the request runs and after it fails (C7).
  • Server refused / not received: with words on the page this now says "Omi hasn't received this audio yet…" and keeps the page. "Nothing to process yet" is used only when the page showed nothing (C5).
  • Discarded: "That recording was too short or empty to keep." The processing page now ends as soon as it sees the discarded conversation or recording, instead of waiting 20 minutes (C6).
  • Phone mic: the phone's own recording always goes through Process Now, so the server decides. Home's stop used to call finishCapture() directly, and the live page used to skip the request for a phone page with no lines yet. Both now take the same path.

Capture ownership contract (kept): the controller still clears its live state before Process Now, inside forceProcessingCurrentConversation. The C1 ownership and generation contracts depend on that ordering: _systemSurfaceConversationRevision is bumped synchronously before the request, so lines that arrive afterwards belong to the next conversation, and the placeholder row is added before reset. test/providers/force_processing_placeholder_test.dart and app/test/spine/c1_* cover this. Following the brief, I kept the contract and fixed what the reader sees at the page level. The live page holds the transcript it showed at the tap (HeldCapture), and LiveTranscriptView(held:) renders it read-only while the server has not answered and after a failure. The controller's only change is finishCaptureWithOutcome(), which keeps the existing request and returns the ProcessAbsence that finishCaptureWithResult() used to drop. The processing row is still removed only after the server answers.

Outcome tests: test/widgets/finish_outcome_test.dart runs on the real LiveEpisodePage and CaptureProvider. It covers 5 answers × 3 sources (pendant streaming, pendant batch, phone mic), and each case asserts what is on screen. The 5 answers are: success, server refuses, no answer, exception and discarded. The file also has a mapping test for every Process Now answer. test/services/capture/mic_denied_start_test.dart drives the real controller through the replay world. Two cases in finish_opens_conversation_test.dart pinned the old behaviour (silent pop to Home on failure; "Nothing to process yet" on a page with preview lines). They now assert the new behaviour.

C. Clear fixes

S1, all landed:

  • C2: with the mic denied, the record button gets a typed MicPermissionDenied and shows "Omi can't use the microphone…" with Open Settings. Any other start failure says "Couldn't start recording." with Try Again.
  • P1: UsageProvider.restorePurchases() → paid | free | failed. A failed read is never "Free plan" on the trial, outline or web paywall.
  • D1: the firmware lookups return null on failure. The page shows OmiErrorState with Try Again instead of a green "up to date".
  • V1: Share and the visibility menu run one runConversationShare flow. A sheet that fails after the conversation went public is reverted. A revert that fails says "still shared" and offers Make Private.
  • A1: the create-app and edit-app forms are wrapped in OmiUnsavedChangesGuard. The create form compares against its presets, so a preset form is not "dirty". The edit page's clear() now runs only after a real pop.
  • G1: the goal slider follows the finger. A failed save puts it back with a message and Try Again.
  • G2: the goal sheet stays open on a failed save, with what the reader typed, and says so inside the sheet with Try Again. A page toast would sit under the modal sheet, out of sight.

S2, all landed:

  • L1: an ended-recording link says it has ended.
  • L2, H4, V12: OmiMissingTarget messages replace "Something went wrong" and "not found or deleted". H4 and V12 add Try Again.
  • L3: a failed pull-to-refresh with rows on screen says so, with Try Again.
  • D2: closing Google's sheet is silent, like cancelling Apple.
  • D4: a disconnected device gets "Connect your device…", not "unsupported".
  • D5: Use a Different Account confirms first.
  • D8: a Ray-Ban rescan that finds nothing says so, with Try Again.
  • G3: the Goals page shows an error, not the empty "Add goal" state.
  • G4: a failed goal delete says the goal is back, with Try Again.
  • T1: a failed load-more shows a notice with Try Again, and scrolling stops re-triggering it.
  • T3: a failed drag between sections says so, with Try Again.
  • T4: the Apple Reminder is deleted only after the server confirms.
  • T5: locked tasks that were kept are an info message, not a failure.
  • P4: notification settings that could not be read show an error state, not defaults.
  • P5: every notification setting saves through applyOmiSetting, which rolls back and reports.
  • H2: a mid-stream error keeps the words already shown and puts the error under them.
  • H3: Clear Chat and persona switch say "Wait for Omi to finish answering."
  • H5: a voice note that is too short says so.
  • A2: a disabled Submit says what is missing.
  • A4: a setup timeout says the setup isn't finished, not "Failed to connect".
  • V3: a refresh keeps the rows, failures show OmiPartialNotice, and a failed Show More has Try Again.
  • V5: the visibility menu goes through the Share consent flow.

Tests for S1 and S2 are in:

  • test/widgets/outcomes_widgets_test.dart: D1, G2, G4, A1, P4, P5, D2, D5, C2
  • test/providers/outcomes_provider_test.dart: P1, G1 (provider: a failed save answers null and keeps the saved value; the slider-follow behaviour itself has no widget test), G3, T1, T4, T5, H2, D4, V1/V5, C6
  • test/widgets/home/home_navigation_test.dart: L1, L2
  • test/pages/review/recent_changes_page_test.dart: V3

L3, D8, T3, H3, H4, H5, A2, A4 and V12 have no dedicated test. Each is a page-level message on a path with no injection seam: a top-level API call, a platform plugin or a file I/O guard. I did not add seams just for tests.

Not reproduced or out of scope

  • Not reproduced (medium confidence, no cheap failing test): C3, H1, P2, V8, V9, L4, L5, D7, D9, P6, P8.
  • Out of scope per brief: C8, C10, visual and motion work, and S3 items other than C13.

Turn 2: David's rulings of 2026-11-19 and the V3 findings

Rulings applied

  1. Legacy pendant live page ("Listening · Pendant", episodes off): Finish takes the reader to the conversation once it exists. While the server is still making it, the reader waits on the processing page for that recording, which turns into the conversation page as soon as it exists. Finish never lands on Home. finish_outcome_test.dart (pendant streaming, pendant batch, phone) and finish_opens_conversation_test.dart assert this.
  2. "Finish" is not renamed anywhere. No stop control is added, moved or relabeled. The swipe action below uses the existing finish string.
  3. No in-place transform of the live page. The design stays a separate processing page that turns into the conversation.
  4. Motion rules: added to app/docs/ux-contract.md §10 as contract text.
  5. Copy: every new string is short and avoids "process". I also shortened my own turn-1 strings, for example "Didn't go through. Your audio is safe." and "Audio's still on its way."; I did not rewrite strings outside the findings. The copy table is applied at the named sites (see "Not done" for two exceptions).

V3 findings

Id What changed Test
X2 Same fix as C1. The test that asserted the silent pop now asserts the reader stays on the page with the error and Try Again. finish_opens_conversation_test.dart "a Finish that failed offline…"
X5 One isFailedConversation() (pages/conversations/home_rows.dart) reads tileState first, then the legacy fields. Home, the conversation page's Summary retry slot, Activity and the bell all use it. A failed V3 conversation is hidden from Home (shownOnV3Home) and listed under Activity's needs-attention section with Try Again, whether or not home_processing_today is on. It lights the bell's attention dot until Activity has shown it. v3_outcomes_test.dart: a predicate test, plus a table from each tile state to Home, Activity and the bell dot, built from the decoder fixture (status completed, tile failed)
X6 A failed older page ends Home's list with one line of tertiary text, "Couldn't load older ones. Tap to retry." It is tappable with a 44 pt target and shows a small spinner while it retries. It has no button styling. Scrolling no longer retries on its own. Tasks (T1) and Recent Changes (V3) use the same line. v3_outcomes_test.dart X6 (provider and widget)
X7 While any listed row is transcribing or writing, Home re-reads the list on the existing 15 s V3 tick (ConversationsV3Provider.watch(rowsPending:, refreshRows:)). v3_outcomes_test.dart X7
X9 A discarded recording ends the processing page on its first read with the too-short message. This is the C6 fix plus the panel's F1 fix (the read includes discarded rows). outcomes_widgets_test.dart C6
X10 Three failed reads in a row show "Couldn't check on it. Try again." with Try Again. "Taking longer than usual. We'll have it on Home." appears only after a read that answered. A failed list read now counts as a failure instead of "not there yet". v3_outcomes_test.dart X9/X10
X11 One conversationIsLive() (conversation_detail/conversation_live_guard.dart) gates the Home row (long-press, delete swipe) and the conversation page's Delete, Reprocess, Rename, Move, Visibility, Link and Share. A refused action says "Wait until it ends to change it." v3_outcomes_test.dart X11
X12 On V3 the detail strip names the step ("Transcribing…", "Writing summary…"). #25725's page refresher and summary section keep those conversations current. When the strip's own reads run out for a processing conversation, it shows "Still working on it." with Try Again, and it resumes when the app comes back to the front. conversation_detail_status_test.dart X12
X14 A conversation link reads through openConversationById (new api/conversation_open.dart), which separates found, deleted (404), locked (402) and unreachable. Offline says "Can't connect right now." with Try Again; deleted and locked each have their own sentence. "Not found or deleted" is gone from this path. v3_outcomes_test.dart X14 (3 cases)
X17 A failed pending-work read keeps the last good home_processing_today answer, so Activity's lists stay. Before the first answer, and after an account reset, a failed read still keeps old Home. The two store tests that pinned "every failed read turns it off" now assert this rule. v3_outcomes_test.dart X17

Approved design changes

  • Status words on V3 Home rows: live "Listening · 11m", transcribing "Transcribing…", writing "Writing summary…". This is one quiet line in the secondary style where the time goes, with no button. The live length is the speech so far, from fix(app): v3 Home pages on server has-more and cursor; live tile shows speech span and End #25725's duration authority.
  • In place: the state tile and the line cross-fade at OmiMotion.standard through a new OmiCrossFade (ui/components/omi_cross_fade.dart). At rest it draws the bare child: AnimatedSwitcher kept a fade layer and a clipping stack on every Home row, and the production shell gate caught it (30 opacity layers against a budget of 11). With OmiCrossFade the gate passes with no budget change. A screen reader hears "Summary ready" when a row goes from transcribing or writing to done.
  • Swipe left on the live row reveals Finish. It has the same gesture and shape as swipe-to-delete, in neutral colours, with the existing finish label.
    • A long swipe only opens the row.
    • A tap runs finishLiveCapture once: the live page's typed outcome from part B, then presentFinishOutcome opens the result.
    • It shows only when this phone captured the conversation, using fix(app): v3 Home pages on server has-more and cursor; live tile shows speech span and End #25725's rule (a shared segment id).
    • A failure leaves the row live and shows the error toast.
    • Tested: a swipe reveals Finish; a long swipe does not fire it; a tap finishes once; a failure says so; another device's live row does not swipe.
  • Failed conversations fold away: a failed row leaves Home and the bell's dot appears, with no toast. Home has no row-removal animation today; deleted rows vanish too. So the row leaves without animation. Adding list removal motion means changing the Home sliver list that fix(app): v3 Home pages on server has-more and cursor; live tile shows speech span and End #25725 also changes, so I left it for a follow-up.
  • End of list: see X6.
  • Conversation page waiting state (V3): the activity strip says "Transcribing…", then "Writing summary…", from the tile state, instead of "Processing conversation…".
  • Copy table: applied at the named sites.
  • Motion where I was already in the code:
    • Tasks first load cross-fades from skeleton to list in the same place.
    • A completed task's tick lands within OmiMotion.quick before the row moves to Completed.

Not done, and why

After PR #25725 merged (merge 06f73ba2a56)

#25725 landed on main at 11:12 UTC. I merged it in and resolved the overlap:

After merging main again (merge b36880a4e9a, translations 4788ffc0fa2)

Main had moved 78 commits. Resolved:

  • l10n: took main's ARBs and generated files, then re-added this PR's 42 keys with omi-l10n-fill stub.
  • app/lib/pages/home/firmware_mixin.dart: both sides added a top-level declaration in the same spot: this PR's debugLatestFirmwareLookup test hook, and main's firmwareNotInstalledMessage (CV1). Both are kept.
  • Translations: omi-l10n-fill fill translated all 42 strings into the 48 other locales, with a review pass that made 12 fixes. app/l10n-pending.json is removed.

Other polish I noticed (not done here)

  1. app/lib/pages/episodes/finished_capture_page.dart:176: the processing page becomes the conversation through a MaterialPageRoute slide. Under the §10 motion rules, content changing in the same place should cross-fade.
  2. app/lib/pages/conversations/widgets/conversation_list_item.dart:737: legacy Home rows still carry "Summary failed · Retry", a button on a row. For legacy accounts with home_processing_today off, that contradicts the no-buttons-on-rows ruling; those failures could go to Activity the same way as V3.
  3. app/lib/widgets/conversation_bottom_bar.dart:1108: audio still being built when the 90 s budget ends reads "Audio Unavailable". It should say "Getting audio ready…" and keep checking.
  4. app/lib/pages/chat/widgets/ai_message.dart:836: an offline citation tap shows the generic internet error with no Try Again. It could use OmiMissingTarget.offline like links do.
  5. app/lib/l10n/app_en.arb:2330: "This conversation cannot be merged (locked or already merging)" is technical. "This one can't be merged right now." would do.
  6. app/lib/pages/action_items/action_items_page.dart:1256: a failed task tick shows failedToUpdateActionItem with no Try Again, and the tick snaps back with no motion.
  7. app/lib/pages/conversations/widgets/conversation_list_item.dart:1111: the "New" badge blinks at 1 s for a minute. A static badge would be calmer, and the blink ignores Reduce Motion.
  8. app/lib/pages/conversations/conversations_page.dart:750: scroll-to-top uses a literal 500 ms instead of OmiMotion.emphasized.
  9. app/lib/pages/conversations/widgets/conversation_list_item.dart:523: the card's selection and opacity changes use literal 200 ms durations instead of OmiMotion tokens, so they ignore Reduce Motion.
  10. app/lib/pages/conversations/conversations_page.dart:1347: Logger.debug('loading more conversations') runs on every build of the list end, which is noise in support logs.

Strings

All new copy is English-only, stubbed with omi-l10n-fill stub. app/l10n-pending.json lists 30 keys for the coordinator's translation fill. python3 app/scripts/l10n.py check passes.

Review panel (omi-panel review-20261119t060850-6128, FIX-FIRST at 0538116473)

The fifth commit (49d171c323a) answers it:

  • F1 accepted: the processing page fetched without discarded rows, so C6 never fired in production. It now reads with includeDiscarded: true. A widget test drives the page's poll with a discarded row.
  • F2 and F5 accepted: generic-error now needs actionLabel: with onAction:, or onRetry:. There are tests for a label with no callback and for OmiErrorState(onRetry:).
  • F3 accepted: applyOmiSetting takes a setting key. A late failure of a superseded write neither rolls back nor reports. Tested.
  • F4, F7 and F11 accepted: a fresh first page or a filter reset clears load-more failure state (tasks and Recent Changes). Tested for tasks.
  • F8 accepted: the disabled Submit says "Finish the capability and pricing details above to submit." when the basics are filled in. This adds one English string, stubbed.
  • F9 accepted: heardSomething: hadContent || retry.
  • F10 accepted: a firmware lookup that throws is a failed check.
  • F12 accepted: a goal delete that throws puts the goal back. Tested.
  • F13 accepted: commented-out code no longer counts toward material-page-route. The table above is recomputed with the final rules.
  • F14 accepted: finishCaptureWithResult had no production caller and is removed. Its test uses finishCaptureWithOutcome.
  • F6 rejected: app/l10n-pending.json is read by the workspace's omi-l10n-fill fill, which the coordinator runs before review. The tool lives in the workspace repo, not here.

Screenshots

Rendered from test/widgets/outcomes_render_test.dart (iPhone size, real fonts, synthetic data).

D1 firmware check failed P4 settings not read G2 goal save failed C2 mic blocked
D1 P4 G2 C2

The G2 capture caught a bug in my first fix: the error went to a page toast hidden under the sheet. The third commit moves it into the sheet.

Line-count exceptions

Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5046 -> 5059 | finishCaptureWithOutcome returns the ProcessAbsence the old wrapper dropped, and the typed mic-denied start (C2) must live where the stage runs; splitting the capture controller is out of scope for a UX outcomes PR
Line-Count-Exception: app/lib/providers/action_items_provider.dart | 1533 -> 1561 | T1 load-more failure state, T4 reminder-after-server ordering and T5 typed clear result belong to the provider that owns these writes
Line-Count-Exception: app/lib/providers/device_provider.dart | 1754 -> 1755 | D1: firmware lookups now return null on failure, and the caller keeps its empty-map default explicitly
Line-Count-Exception: app/lib/pages/action_items/action_items_page.dart | 1468 -> 1507 | T1's quiet load-more line and the first-load cross-fade and tick timing (approved motion) live in the page that owns the list; splitting the Tasks page is out of scope here
Line-Count-Exception: app/lib/providers/conversation_provider.dart | 2350 -> 2358 | X6: a loadMoreFailed flag set in the existing failed-page branch and cleared on success; no paging logic changed (PR #25725 owns paging)
Line-Count-Exception: app/lib/pages/conversation_detail/page.dart | 1734 -> 1738 | X11: the live-conversation guard on the menu and share paths (two imports, two early returns); the share flow itself moved out to share_flow.dart

Panel review (turn 2, review-20261119t101336-51ef)

Only luna ran: deepseek and glm-flash failed to launch.

Finding Triage
F1: an empty pendant Finish leaves the pendant streaming Rejected. origin/main (live_episode_page._finishOnce) does the same: the pendant keeps listening, and Finish closes the episode.
F2: a late failed goal-slider save resets a newer drag and offers a stale retry Fixed in 1c2d6fd50c6 with a per-goal revision. Test: outcomes_widgets_test "G1: a late failed save…", which fails without the fix.
F3: the processing page reads only 10 rows Rejected. origin/main reads the same 10 rows, and the target is the newest.
F4: two overlapping failed setting writes show a value the server never saved Fixed in 1c2d6fd50c6: a failure rolls back to the last value the server confirmed. Test: "P5: two overlapping failed changes…", which fails without the fix.
F5: the pop-before-await ratchet misses braced pops Rejected for this PR. It is a heuristic ratchet, so this is a false negative; left as a follow-up.

Verification

All runs on m5, Flutter 3.44.5 (the pinned version), TZ=UTC, through omi-heavy.

Head 4788ffc0fa2 (after the second main merge and the translation fill), Flutter 3.44.5:

Command Result
python3 app/scripts/l10n.py check pass: 49 locales, 4569 keys
app/scripts/analyze_ratchet.sh (on b36880a4e9a) pass
flutter test on the merge-affected files: finish_outcome, finish_opens_conversation, outcomes_widgets, goal_sheet_and_undo and 12 firmware test files (on b36880a4e9a) pass: 155 tests
scripts/pr-preflight (pre-push hook) pass

The full app/test.sh was not rerun after this merge; CI runs it.

Final head 06f73ba2a56 (after merging #25725 from main):

Command Result
bash app/test.sh pass: 9892 passed, 7 skipped, 0 failed
scripts/pr-preflight --pr-body-file <this body> pass: 34 checks
python3 app/scripts/l10n.py check pass: 49 locales, 4566 keys
CI on the previous head 1c2d6fd50c6 all green except "UI author approval"

Turn 2, earlier head ac37906b563:

Command Result
bash app/test.sh pass: 9874 passed, 7 skipped, 0 failed
scripts/pr-preflight --pr-body-file <this body> pass: 34 checks
python3 app/scripts/l10n.py check pass: 4565 keys (42 new English keys, stubbed with omi-l10n-fill stub)
run_journeys.sh --lane hermetic --filter j7_conversation_merge_recovery pass on ac37906b563: 4 tests
make mobile-verify ARGS="fast --all" (on a0c6f1a9bf9 plus an uncommitted first draft of OmiCrossFade) j1–j6 pass. j7 failed 4 tests on that draft's dispose bug, fixed in ac37906b563 and rerun above. The full fast set was not rerun on the final head.

The full suite on 23b0f179aec failed 15 tests in 5 files. Each failure is fixed in ac37906b563:

  • Perf shell gate: per-row fade and clip layers, fixed with OmiCrossFade.
  • Two pending-work store tests that pinned the old X17 behaviour.
  • The Home V3 row list, which still expected the failed conversation on Home (X5).
  • A test that used the old predicate name.
  • The pending-row "read error" cases, which pass again with the "no answer yet" rule.

Turn 1 (earlier heads): the full app/test.sh and mobile-verify fast --all passed on b97e008006f. The UX contract ratchet tests passed (32).

After ac37906b563 the branch gained only:

  • a clean merge of origin/main (26 commits, no shared files); the whole-app analyzer then reported no errors.
  • one const in a test, for the analyzer ratchet; app/scripts/analyze_ratchet.sh passes.
  • the panel F2/F4 fixes (1c2d6fd50c6). outcomes_widgets_test and goal_sheet_and_undo_test pass (15 tests), and preflight passes (34 checks).

The new tests were written against the audit's failing paths. I did not check out the old code to watch each one fail.

Failure-Class: new

🤖 Generated with Claude Code

Git-on-my-level and others added 4 commits November 19, 2026 11:51
…n see

Adds §17 Outcomes to the mobile UX contract (INV-UI-3) with four ratchet
rules (silent-catch, generic-error, material-page-route, pop-before-await),
and fixes the behaviour audit of 2026-11-19:

- Finish (C1, C4, C5, C6, C7, C9, C13): one typed FinishOutcome from the
  live page, Wrap Up and the record button. A failed Finish keeps the
  reader on the live page with the transcript and Try Again; success opens
  the result from every entry point; discarded and not-yet-received say so.
- S1: C2 mic blocked -> Open Settings, P1 restore reads the error, D1
  firmware check error state, V1 share visibility, A1 form dirty guard,
  G1/G2 goal slider and sheet.
- S2: L1 L2 L3 D2 D4 D5 D8 G3 G4 T1 T3 T4 T5 P4 P5 H2 H3 H4 H5 A2 A4 V3
  V5 V12.

The capture controller still clears live state before Process Now (C1
ownership contract); the live page holds what it showed until the server
answers.

Failure-Class: new

Co-Authored-By: Claude Opus 5.5 <[email protected]>
MicPermissionDenied stays a StateError so the coordinator contract tests
(a refused phone start throws StateError) still hold. Three older tests
pinned behaviour this PR replaces on purpose: the generic start error (C2),
the citation "not found or deleted" copy (H4), and defaults shown when
notification settings could not be read (P4).

Failure-Class: new

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The goal sheet's failed-save toast went to the page's ScaffoldMessenger,
which sits under the modal sheet, so the reader never saw it. The sheet now
shows an inline notice with Try Again. Adds a render test and screenshots
for D1, P4, G2 and C2.

Failure-Class: new

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 05381164735a51b2fc0e3fdba5276e396ee93ac9. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

- C6: the processing page reads discarded rows too, so a discarded
  recording ends the wait on the first poll (the list fetch excluded them).
- P5: a late failure of an older setting write no longer rolls back a
  newer choice.
- T1, V3: a fresh first page or a filter change clears a failed load-more.
- D1: a firmware lookup that throws is a failed check, not a spinner.
- G4: a goal delete whose answer cannot be read puts the goal back.
- C5: a retry or a phone page with no lines maps "not received" honestly.
- A2: the disabled Submit names capability and pricing details when those
  are what is missing.
- Ratchet: generic-error accepts only a label with its callback, or
  onRetry:; material-page-route ignores commented-out code.
- finishCaptureWithResult had no production caller; removed.

Failure-Class: new

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 49d171c323a78922b1a0fd236434e1fdbed52bba. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

Git-on-my-level and others added 5 commits November 19, 2026 15:47
…tus words, swipe to Finish

David's rulings and the v3 audit of 2026-11-19:
- X5: one isFailedConversation (tile state first) for Home, Activity, the
  bell and the Summary slot; a failed v3 conversation leaves Home, is
  listed in Activity with Try Again and lights the bell's attention dot.
- X6: a failed older page ends Home, Tasks and Recent Changes with one
  tappable line, not a button and not silence.
- X7: rows still transcribing or writing re-read on the 15 s v3 tick.
- X9, X10: the processing page says when its reads keep failing, and
  "taking longer" only after a read that answered.
- X11: one conversationIsLive gates the row and the detail page's changes.
- X12: the detail strip names the v3 step and ends with Try Again.
- X14: a conversation link tells offline, deleted and locked apart.
- X17: a failed pending-work read keeps the last answer.
- v3 Home rows show "Listening", "Transcribing…" or "Writing summary…"
  in place of the time, cross-fading with the tile; the live row this
  phone captures swipes open to Finish (the live page's path).
- Motion rules in ux-contract §10; Tasks first load cross-fades and a
  tick answers before the row moves; shorter copy.

Failure-Class: new

Co-Authored-By: Claude Opus 5.5 <[email protected]>
openConversationById now classifies ConversationApi.byId's ApiResult
(404 gone, 402 locked, anything else unreachable) instead of a nullable
raw call, and conversationOpenFrom is unit-tested.

Failure-Class: legacy-nullable-http

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ith X5/X17

AnimatedSwitcher left a fade layer and a clipping stack on every Home row,
so the production shell gate counted 30 opacity and 11 clip layers. The new
OmiCrossFade draws the bare child at rest and fades only during a change.

X17 keeps the last good home_processing_today answer, but a failed read
before any answer (or after an account reset) still keeps old Home. The
store and Home V3 tests that encoded the old fail-to-off and the failed
row on Home now assert the ruled behaviour.

Failure-Class: rebuild-storm

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 1eb90a0a665c5f201e98d2f5ff033a13eeb83c8f. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 905dc555851aabe995b7e2e26187cf755c3b473e. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

…ing (panel F2, F4)

Goal slider: each drag and save bumps a per-goal revision, so a late
answer for an older drag neither clears the newer thumb nor offers a
retry that would overwrite it.

Settings: while writes to one setting overlap, a failure rolls back to the
last value the server confirmed, not to that write's own "previous".

Each fix has a test that fails without it.

Failure-Class: stale-write-overwrites-newer-choice

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 1c2d6fd50c6e3ca3b4adcdcf08698ac836b1ce7e. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

l10n: took main's ARBs and generated files, re-added this PR's 42
pending keys, and regenerated (l10n.py check: 49 locales, 4566 keys).

conversation_list_item: the V3 "Listening · X" line now uses #25725's
duration authority (speech so far), not start to now, and carries its
conversation_row_live_length key.

Activity strip: #25725's LiveConversationRefresher and LiveSummarySection
now own V3 re-reads, so the strip only names the step for V3 and keeps its
capped poll and "Still working on it." Try Again for status processing.

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 06f73ba2a56b9761e2e1ad88f7acdd93e9f7f70f. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

Git-on-my-level and others added 2 commits November 20, 2026 09:35
Translation files taken from main, with this PR's 42 pending English keys
re-stubbed; firmware_mixin.dart keeps both the test lookup hook and main's
CV1 not-installed message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Filled with bin/omi-l10n-fill (48 locales, 10 batches, review pass with 12
fixes); removes app/l10n-pending.json.

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

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 4788ffc0fa24e92a09b0c22866bd9cd3bf99f42b. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

/approve-ui 4788ffc

@Git-on-my-level
Git-on-my-level merged commit bc2e1e1 into main Nov 20, 2026
53 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/mobile-ux-outcomes branch November 20, 2026 04:36
shubhxho added a commit to shubhxho/omi that referenced this pull request Nov 20, 2026
…ardware#25757

BasedHardware#25757 added a failed-check state with Try Again for a lookup that gets no
answer. Keep that design and drop this branch's own inconclusive-lookup retry.
Keep only what main still lacks: an answered lookup with an unusable release
(empty, draft, unparsable) now goes to main's failed-check state, while a
device below the release minimum, a release that needs a newer app, an
unreadable device revision and a rollback with no usable stable version no
longer show the green up-to-date status.
aryanorastar added a commit that referenced this pull request Nov 22, 2026
…or an unread revision as up to date (#25375) (#25455)

## Problem and resulting behavior

Fixes #25375. Firmware Update could show a green “up to date” status for
an unusable release, an unread device revision, or a release the
device/app cannot use. Main's #25757 already handles failed requests;
this PR completes the status boundary using one typed firmware-check
result.

Only a conclusive result may show “up to date.” Empty, draft or invalid
release metadata uses the existing failed-check state and Try Again.
When a successful response supplies usable release metadata, a
below-minimum result points to support and an app requirement points to
an app-store update. These are separate typed reasons with precise
localized warnings. An unreadable device revision is explained before
any request, since repeating a backend call cannot repair the BLE read.
Rollback validates the stable version before offering installation.
Optional app-version and build requirements are each honored; releases
with neither remain eligible.

The provider's existing offer-only API delegates to the same
classification. The update/install flow and its battery gates are
preserved.

## Eligibility clarification

Current [CV1 3.0.24
metadata](https://github.com/BasedHardware/omi/releases/tag/Omi_CV1_v3.0.24)
has general rollout 0%, blocked=false and an account allowlist. Firmware
3.0.21 meets its firmware floor 3.0.6; app minimum is 1.0.74 / build
438. An anonymous representative production lookup returns 404 for no
eligible candidate. [Issue
audit](#25375 (comment)).
Production filters below-floor releases before responding; its 404 has
no per-reason diagnostic and remains an inconclusive failed check. The
synthetic 200 below-minimum cases prove defensive client classification,
not production eligibility integration. No rollout metadata or backend
contract changes are included. Reporter-specific eligibility and the
separately mentioned SD-transfer symptom are unverified.

## Verification

- `flutter test` across all 12 firmware test files and
`outcomes_widgets_test.dart`: **152 passed**, including existing
battery/install-verification coverage.
- New no-request revision regressions failed before the guard. Four
optional/crossed app-floor regressions failed before the comparison fix.
Final typed-classification cases cover non-string versions, malformed
minima, legacy omissions and eligible controls.
- Live `agent-flutter` verification drove the production page in a
synthetic Android-layout flutter_tester harness: 404 → actual Try Again
→ eligible offer; unknown/garbled revisions with zero HTTP requests;
unusable metadata, below-minimum/app-ineligible states and malformed
rollback; eligible and confirmed-current controls. HTTP and
device/plugin data were fixtures; a long German warning also fits; no
firmware was flashed and no physical BLE or customer session was used.
- Independent agent review approved the final production source and
regression changes.
- Full local Flutter suite at prerequisite-fix commit `0db54f1c83`:
**9,977 passed, 12 skipped**. After the final reason-specific copy
change, all **152 affected tests** pass. Full analyzer ratchet,
localization check (49 locales / 4,571 keys), and all 28 preflight
checks pass. [Final-head
CI](https://github.com/BasedHardware/omi/actions/runs/45003473711)
passed: **10,106 Flutter tests, 8 skipped**, full analyzer ratchet and
non-UTC Home boundary checks; Mobile Release Eligibility passed.

## UI evidence

The existing warning/confirmed-current layouts are retained. The
contributor captures below show the earlier warning wording and
unchanged current-version control. Final Android-layout captures
(including precise warnings and German copy) were inspected in the live
verification described above and retained with its receipt.

![Below minimum
version](https://raw.githubusercontent.com/shubhxho/omi/efa69268ae1ba7dbeb436b88a4ca095096b8f0f8/.agent-artifacts/ui-evidence/issue-25375/001-mobile-ios-firmware-below-minimum.png)
![Confirmed
current](https://raw.githubusercontent.com/shubhxho/omi/efa69268ae1ba7dbeb436b88a4ca095096b8f0f8/.agent-artifacts/ui-evidence/issue-25375/002-mobile-ios-firmware-up-to-date.png)

## Product invariants and failure class

INV-UI-1, INV-UI-3, INV-PERF-1. Status changes reuse the shared UI and
localized copy.

Failure-Class: none
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