Repository navigation
refactor(home): replace Home chat bar with clean Ask Anything button (#19854) - #21393
undivisible merged 6 commits into
Conversation
kodjima33
left a comment
There was a problem hiding this comment.
Refactor/UI cleanup, not a bug fix — approve-only per confidence gate (features/refactors stay approve-only in mobile area). Tests added, CI green.
|
Reviewed the full diff for #19854 — nice, cohesive cleanup. Per file:
Removing the direct voice entry point from the Home bar matches what the issue asks for, with voice still reachable inside the chat sheet. Leaving the merge call with the maintainers. — automated maintainer review on behalf of the Omi maintainers by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks @Dragonire9 — verified this against the acceptance criteria in #19854, file by file. It's a clean implementation:
Two non-blocking follow-ups:
Removing the mic shortcut from the bar matches the issue's product decision (voice remains in the chat composer), and this was approved by a maintainer on this head. No blocking concerns from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…t on main Introduced by #21393; every app PR's Dart Analyze job fails on it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n test origin/main's analyzer ratchet fails on it (unused_import 1 > baseline 0) since #21393, so every PR merged with main fails Dart Analyze & Tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ll, never on Home (#22119) * fix(app): retry capture recovery in place, one outage statement on the capturing page The capture recovery banner's tap dumped the reader on /settings/device for BLE-health wedges, a page that cannot fix a stalled link, and back from it landed in Settings instead of where they were. The banner now retries the episode in place (the same recovery the monitor runs itself), offers a What's going on? sheet with the real explanation, and can be dismissed until a newly declared trigger alerts again; the audio-safe reassurance stays as a second line. The capturing page also stated one outage three times: the app bar sentence, the banner, and the empty state. The app bar now reads the short Not transcribing, and the empty state keeps the neutral listening line — the banner is the one statement. * fix(app): move slow-burn capture problems from the Home banner to the Activity bell Storage-at-risk and upload-stall episodes stop occupying the Home banner: the banner is removed from Home (it stays on the capturing page), and both problems render as durable rows in Activity's Needs attention section with counts and a tap into Offline Sync, which owns storage management and retry. The bell lights its warning dot for unseen capture attention and opening Activity marks it seen; a new episode re-lights it. * test(app): compat visual-audit suite for revisions before capture attention UNTIL 3840a19: the current suite's capture scenarios reference ActivityPage's capture attention rows, which do not exist before it. The compat suite pumps the capturing-page recovery banner under its current id (conversation-live-recovery-banner) so the stacked before/after gallery pairs the scene; activity-capture-attention shows as not-yet-existing before. * fix(app): visual audit prep builds generated files through the flutter solver A bare `dart run build_runner build` re-resolves with the pure-Dart solver, which fails on flutter-constrained dependencies (device_info_plus_platform_interface) once their pub.dev metadata reaches the local cache. `flutter pub run` keeps the Flutter-aware resolution the mobile CI job uses. * test(app): fix compat suite import depth * style(app): capture recovery banner as an amber action card The shipped banner read as a system toast: a flat gray pill whose title wrapped into the trailing controls, with a squeezed text button floating next to the close icon. It is now the warning card from the approved mockups — amber tint and border over the card surface, the title on its own full-width line, the audio-safe reassurance as a second line, and an actions row: a filled amber Try reconnect (Retry sync for the phone- storage episode, which is what its transfer retry does), the What's going on? sheet action, and the dismiss control. The actions wrap on narrow phones instead of overflowing, and every control runs the same recovery the card tap does — verified by a test that the button retries exactly once and never double-fires through the card gesture. * style(app): capture attention rows get action pills The two capture rows in Needs attention ended in a bare chevron, which said "there is a page somewhere" but not what to do there. They now carry the mockups' compact warning-tinted pill — Manage on the full-disk row, Retry on the stalled upload — using the destructive button's tint idiom in amber. Both the pill and the row body open the same Offline Sync entry as before; a test pins that the pill navigates exactly once and never double-fires through the row gesture. The rows tighten to match the section's rhythm (semibold subhead title, footnote tertiary subtitle) while the server and recordings rows above keep their layout. * fix(app): honest capture banner copy, ingress-aware actions, 44pt targets, prompt-scoped dismiss Review follow-up on the capture recovery banner: - ingress_recovery_failed no longer offers a dead-end "tap to reconnect": the monitor no-ops a Dart retry for that trigger (native owns the recovery), so the banner now informs (app-owned recovery in progress) with its own details sheet explaining the manual disconnect/reconnect fallback, and is not a button. - The BLE second line no longer claims "Audio saved": an ingress failure proves ingress, not durability (INV-CAP-1) — it now says the link stalled and transcripts resume when it recovers. - The info and dismiss actions meet the 44pt minimum tap target (UX contract §3). - Dismissing the banner clears only the visible prompt episode (dismissVisibleEpisode); a telemetry-only episode for the same device keeps its lifecycle instead of being silently erased. - The capturing page keeps one truthful unavailable line for local STT failure, out-of-credits and terminal STT failure instead of promising a transcript (#14473); the app-bar heading stays the short "Not transcribing". * fix(app): exhausted ingress recovery asks for a manual reconnect; dismissal holds across native re-ticks Round-2 review follow-up: - actionRequired means native recovery is exhausted, not active (iOS tick() returns no action in that phase and clears its deadline; Android emits the phase only when recovery is spent), so the ingress title now says "Audio isn't reaching the app — reconnect your Omi" and the sheet explains the manual disconnect/reconnect instead of claiming recovery is in progress. - Dismissing an ingress episode records the dismissed connection generation; observeIngressHealth no longer recreates the episode while native keeps republishing the same actionable snapshot (~5s on iOS). A new generation, or health leaving actionRequired, re-allows the alert. Also maintains lastIngressHealth so the dismissed generation is knowable. * style(app): capture surfaces match in-app warning idioms Banner: firmware-card triangle (18pt FontAwesome, ExcludeSemantics), subhead title / footnote secondary at height 1.35, card padding 14, OmiSpacing.xs action gaps, plain OmiButton.tertiary for the explanation action, and an OmiIconButton.filled(36, surface2) dismiss in the capture page's pause-button family. Keys, copy branching, semantics, and telemetry unchanged. Activity capture rows: warning-wash badge tile (diagnostics idiom), pill on plain warning.withValues(0.15) like the badge, row padding aligned with the server rows (14/14/10/14). * style(app): capture banner matches in-app warning idioms Banner half of af489ec (cherry-picked from capture-banner-activity; the Activity capture rows do not exist on this branch): firmware-card triangle (18pt FontAwesome, ExcludeSemantics), subhead title / footnote secondary at height 1.35, card padding 14, OmiSpacing.xs action gaps, plain OmiButton.tertiary for the explanation action, and an OmiIconButton.filled(36, surface2) dismiss in the capture page's pause-button family. Keys, copy branching, semantics, and telemetry unchanged. * test(app): seed each capture audit scenario with the outage type it audits Codex review: _seedVisibleWedgeEpisode always declared an ingress_recovery_failed episode (actionRequired ingress health), the one trigger whose banner variant disables retry and shows the manual-reconnect copy. home-capture-recovery-banner therefore could not audit the retry-in-place affordances its state text promises, and conversation-live-outage — a terminal STT failure that owns no wedge episode — grew an unrelated ingress banner on top of the outage it never declared. Seed the zero-byte streak instead (three empty capture sessions, the same seeding the banner widget test uses) so the Home scenario renders the retryable card, key-assert the retry/dismiss affordances so the audit cannot pass vacuously, and stop seeding the live-outage scenario entirely, asserting no wedge banner appears. The STT outage keeps its short Not-transcribing app bar and truthful unavailable placeholder. Also list capture_state_labels_test.dart and capturing_empty_state_test.dart in FC-capture-recovery-dead-end's canonical_prevention_artifact: both guard the failure class's one-outage-statement half and predate this fix. * fix(app): resolve capture-attention review findings (storage row lifetime, recording counts, phone-local routing) Address Codex review threads on the capture attention rows: - Storage row ends only with its own retention observation: local-WAL resolutions (empty backlog, upload completion) clear the upload-stall row alone; new clearStorageAtRisk() is called when SyncProvider reads no retention risk, and resets the retention fingerprint so a re-reporting risk re-engages the row. - Upload-stall attention counts grouped recordings, not WAL fragments (groupRecordingBlocks), and excludes local-only (on-device STT) and terminal WALs; kept-audio seconds still sum across fragments. - Activity's empty-state branch listens to the monitor so capture attention arriving on an open empty page shows its row. - markCaptureAttentionSeen moves out of the load path: the bell stays lit when a failed load would have hidden rows the user never saw. - SyncProvider.clearUserData resets the capture monitor singleton so the previous account's rows and unseen flag do not leak into the next login. - The storage row never renders blockedCount as a recording count (attempts counter): the uncounted title stays; activityAttentionStorageBlocked removed from all ARBs + generated l10n. - Capture rows open Offline Sync with phoneLocal: true, bypassing the wearable-detection gate that an unrelated device recording could arm. - On the Way groups attention fragments with progressing ones: one recording with a refused fragment reads once, as refused. * fix(app): resolve remaining capture-attention review findings (terminal copy grouping, count-cap row lifetime, live-page audit) Address Codex review threads on the capture attention work: - On the Way no longer drops a terminal phone copy whose wearable source shares its Wal.id: the three pending lists partition by WAL status, so the id filter's only effect was hiding the terminal state the block must show. groupRecordingBlocks(joinDeviceCopies: true) already joins copy and source and selects the block's worst state, so a recording with an exhausted phone copy reads once — as needing attention — instead of as merely syncing. - Count-cap retention pressure ends a storage row a disk failure engaged: a count_cap reading proves the disk admitted a write again, so the row must not keep claiming storage is full and recordings are paused. The retention fingerprint stays, so the diagnostic observation keeps its telemetry dedupe and a returning disk failure (different reason, different fingerprint) re-engages the row. - The recovery-banner visual audit pumps the live capturing page (ConversationCapturingPage), the banner's only production mount since this change removed it from Home; the seeded zero-byte episode then renders the banner this scenario exists to audit (was the failing Dart Analyze & Tests check). Both regression tests fail on the pre-fix code with the exact reported behavior (1 uploading instead of 1 needs attention; storageAtRisk non-null after count_cap). * fix(app): resolve second round of capture-attention review findings (seen snapshot, storage episode lifetime, Try Again, probe copy) Address the Codex threads on the Activity capture rows: - markCaptureAttentionSeen takes the build's snapshot (through:) and the seen timestamp never rewinds: Activity's post-frame callback marks only the episodes its build actually rendered, so a stale callback cannot extinguish the bell for an incident declared after that build. A build with no capture rows marks nothing. - A storage row ending with its own condition (disk recovered, or count-cap pressure proving admission resumed) also resolves the local-WAL episode that declared it: the capturing page's banner stops reporting a recovered storage problem, and a later disk incident can declare a fresh episode. The upload-silence telemetry episode stays independent. - The upload-stall action uses the prescribed Try Again copy; the nonconforming activityAttentionRetry key is removed from all locales. - A storage row whose free-space probe failed (disk_space_unknown) says so instead of claiming the disk is full: new activityAttentionStorageUnknownTitle key in all 49 locales. All three new regression tests fail on the pre-fix code with the exact reported behavior (bell extinguished by a stale callback; banner episode surviving its row's clear; 'Can't check storage' copy absent). * fix(app): keep acute capture recovery warnings on Home The Home banner removal dropped acute link-failure episodes (zero-byte streak, rapid reconnects, connected-but-silent, exhausted ingress recovery) along with the slow-burn ones: the live pill does not observe the wedge monitor, so a stalled BLE link had no Home surface left and its warning only appeared if the reader opened the capturing page. Home now remounts CaptureRecoveryBanner with acuteOnly: true, which filters the storage-at-risk trigger (upload silence never reaches the prompt slot — telemetry-only); the capturing page keeps the unfiltered banner. - CaptureRecoveryBanner.acuteOnly hides the slow-burn storage episode - Home asserts the split: acute zero-byte episode renders the banner, storage episode keeps Home banner-free - banner widget tests cover acuteOnly both ways - audit copy: Home keeps the acute banner; only slow-burn is Activity's * fix(app): resolve third round of capture-attention review findings - The upload-stall slice now reads the memoized displaySortedWals order instead of re-sorting the WAL index on the UI isolate at every refresh (the same keyed order the pending-work row reads). - Kept-audio seconds sum the same upload-eligible set as the row itself: retry-exhausted failures and local-only audio no longer read as audio waiting on this upload. - The pre-capture-attention compat suite now carries every area's scenarios at the pre-change revision, so a full audit of an older revision compares settings/chat/device and friends instead of marking them 'did not exist'; only the capture area swaps for its pre-change registry, per the pre-ui-program convention. Addresses Codex review threads on sync_provider.dart (WAL sort, pending-seconds set) and compat/capture-attention/registry.dart. * fix(app): cleaner capture banner and Needs attention rows Banner (Home acute + capturing page): drop the border and the copy that repeated the button ("— tap to reconnect"); the title is now "Omi isn't sending audio" with one detail line, a white Reconnect primary beside a tertiary "What's going on?", and the dismiss ✕ in the card's corner instead of its own row. The storage variant titles "Phone storage full" (or "Can't check storage" when the probe failed) instead of "Phone Storage: You have recordings…". Drops the OmiButtonColors escape hatch for UI-kit variants. Activity rows: per-problem badges (storage, cloud upload), single-line titles ("Phone storage full", "Upload stalled") in the server rows' body style, the counts and kept-audio length in the subtitle ("5 recordings waiting · 47m"), and neutral secondary Manage / Try Again buttons; amber stays on the badge only. New/changed strings derive from the existing translations (each old "A — B" string split), applied with scripts/l10n.py across all locales; unused keys removed. Adds the home-capture-recovery-banner audit scenario. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(app): UI evidence for the capture banner and Needs attention cleanup Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): capture stalls speak in the live header and the Activity bell, never on Home The live page drops the recovery card for one status line under the header: the header reads "Reconnecting" during an acute link episode, and the line names the cause with an in-place Reconnect (Retry sync for storage). No dismiss; it clears when audio returns. Tapping the message opens the details sheet. Home no longer mounts any capture banner. The Activity bell's amber dot now also lights for an acute link episode, and Needs attention lists it as a row that reconnects in place (an exhausted ingress recovery explains instead). The storage and upload rows become plain settings-style rows with a chevron into Offline Sync; amber stays in the row icon only. Removes the now-unused Manage, Dismiss and "What's going on?" strings. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): a pendant stall outranks an open storage episode; short Activity row copy visiblePrompt and acuteEpisode walked devices in map order, so an open storage episode on the local WAL hid a pendant stall: the Activity row and the bell dot went missing, and the live page's Reconnect retried the storage transfer. The acute episode now wins. The link-stall row's subtitle becomes "Still recording on your Omi" (one line, 49 locales); the exhausted-ingress row keeps no saved-audio claim. The failure-class record goes back to its registry wording (a registry-only PR owns that change), and the live-page test keeps the path the record names. Replaces the PR's UI evidence with before/after real-app renders. Co-Authored-By: Claude Opus 5.5 <[email protected]> * style(app): dart format the capture status tests Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(app): drop the unused ui.dart import from the Ask Anything button test origin/main's analyzer ratchet fails on it (unused_import 1 > baseline 0) since #21393, so every PR merged with main fails Dart Analyze & Tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): header holds Reconnecting through a retry; no still-recording claim for a silent link From the ZCode review of #22119: - The live header now tracks any open acute link episode (linkStalled), so it keeps reading Reconnecting while the reader's retry is in flight instead of reverting to Listening with no audio arriving. The header widget is public (CaptureWedgeAppBar) and has widget tests for the stall, the in-flight retry, recovery, and storage. - The Activity link row says "Still recording on your Omi" only when the pendant is off the link; connected_no_bytes and ingress failures make no retention claim. - The activity-capture-attention audit asserts the link row. - Removes captureLinkStalledTranscribesLater, which no longer has a production user. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: David Zhang <[email protected]> Co-authored-by: David Zhang <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Description
Resolves #19854.
Cleans up the Home bottom chat bar by introducing a centered, dedicated
HomeAskAnythingButtonpill while preserving bottom bar height (kHomeChatBarHeight = 62.0), container borders, background styling, and the adjacentHomeRecordButton.Key Changes
app/lib/widgets/home_bottom_bar.dart: Created reusableHomeAskAnythingButtoncomponent displaying centered localized text (context.l10n.askAnything), removing the voice circle icon and speech bubble icon from the Home bottom bar. Tapping triggers the existing chat sheet callback (openChatSheet). Voice input remains accessible inside the opened chat sheet / composer.app/lib/pages/home/page.dart: Replaced inline_buildChatBarbutton layout withHomeAskAnythingButton.app/integration_test/visual_audit/scenarios/capture.dart: Replaced custom_AskOmiBarwith sharedHomeAskAnythingButtonto keep test harness and production UI unified.app/test/widgets/home_ask_anything_button_test.dart: Hermetic widget tests verifying:app/changelog/unreleased/20261013-home-bottom-bar-ask-anything.json: Added unreleased changelog fragment.Testing
flutter test test/widgets/home_ask_anything_button_test.dartUI-Evidence: none