Skip to content

fix(app): compose live-capture copy and states from active capabilities (#14473) - #14510

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/live-capture-copy-capability-gating
Sep 18, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/live-capture-copy-capability-gating

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Resolves #14473. Also renders the missing status-feedback states for voice-training onboarding (#14472).

Why

The live-capture screen named features the user's setup couldn't produce, and described degraded pipelines as healthy waiting — the exact class #14473 filed after the SCA-486 physical run, where an offline-harness transcription failure left the UI on "Waiting for transcript or photos…" forever next to a "45s audio saved locally" toast with an unlabeled spinner.

The fix follows the issue's method: compose copy from the capability signals already available at the call site, and give waiting states terminal variants.

Live-capture empty state (waitingForTranscriptOrPhotos)

conversation_capturing/page.dart now picks the empty-state line from the session's actual state:

  • Audio-only (no Ray-Ban Meta / OpenGlass source — the phone-mic default): listeningTranscriptWillAppear — "Listening… a transcript will appear here." instead of promising photos.
  • Photo-capable source connected: keeps "Waiting for transcript or photos…".
  • Out of transcription credits (UsageProvider.isOutOfCredits, force-flagged by the STT socket's 4002 close): transcriptionUnavailableRecordingSaved — a waiting state could never resolve, so it no longer claims to wait.
  • Offline (ConnectivityProvider.isConnected): recordingOfflineTranscriptWillCatchUp.
  • Transcription socket dropped (RecordingState.interrupted): reuses the existing transcriptionPausedReconnecting copy as a persistent state line instead of only a 3-second snackbar. The title also shows "Reconnecting…" instead of "Listening" while interrupted.

Title

The hardcoded English 'Capturing' literal is replaced with localized capturing / capturingPhotos (photos-only vs. audio+photos).

WAL indicator

The WAL model already had a full user-facing state machine (WalSyncDisplayState) that the sync pages render; the live indicator ignored it and always painted a green "saved locally" dot. It now derives the worst outcome across the session's WALs via a new pure helper worstSessionSyncState() (wal.dart) and renders:

  • uploading → "Uploading {duration} of audio for transcription…" — the spinner now has meaning
  • retrying → amber "Retrying upload… {duration} of audio kept on your phone"
  • failed (auto-retries exhausted) → red "Upload failed — {duration} of audio kept on your phone. Tap to retry." — tappable, wired to the new CaptureController.retryFailedSessionWalUploads(), which reuses the sync pages' deliberate single-recording retry (syncWal, resetting the auto-retry budget)
  • corrupted / outside recovery window → the same terminal copy without a retry affordance, since a retry cannot succeed (isRetryableSyncState is failed only)

Speech-profile onboarding (#14472)

The provider already walks uploading → memorizing → personalizing → allSet; the strings existed in the ARB but nothing rendered them. The recording view now shows "Uploading your voice profile…" / "Memorizing your voice..." / "Personalizing your experience..." during the post-recording wait, so it no longer reads as stuck. (Also fixed the "profile...." typo.)

Copy fixes

  • v2UndetectedMessage no longer asserts "We see that you either have a V1 device or your device is not connected" (false for users with no V1 at all); it states the capability requirement. Title "V2 undetected" → "Offline Sync unavailable".
  • transcribeLaterNote: "the phone microphone, Omi, and Limitless devices" → "the phone microphone and Omi or Limitless wearables".
  • Deleted five dead strings — defined and translated but never rendered, promising states nothing wired: transcriptionFailed, startCapturingConversations, clickTheButtonToCaptureAudio, startRecordingToSeeTranscript, capturingAudioAndGeneratingTranscript. The new state keys supersede them with next-step copy.

Not in this PR (follow-ups)

  • The chat "Syncing messages with server…" banner has no failure variant — MessageProvider tracks no error state, so that needs provider work first.
  • consentDataMessage tells every user their audio goes to "Deepgram for transcription", including free-tier on-device STT users — legal copy, flagged for review rather than reworded here.
  • The 10 new keys fall back to English until translated; the 5 deleted keys remain inert in the non-template ARB files.

Verification

  • flutter gen-l10n regenerated (HEAD generated files verified current for the pinned 3.44.5 before this change, so the diff is exactly this change).
  • flutter analyze on all changed Dart files: clean (two pre-existing info lints in untouched wal.dart code).
  • New tests: worstSessionSyncState / isRetryableSyncState ranking cases in wal_sync_display_state_test.dart; status-line rendering through all three uploading phases in speech_profile_onboarding_test.dart.
  • bash app/test.sh (hermetic suite): 2,150 passed / 5 skipped / 0 failed on this branch, including the pre-existing suites for the touched pages.

Failure-Class

Failure-Class: new

Review in cubic

The live-capture screen named features the user's setup may not have
('Waiting for transcript or photos…' on audio-only capture) and described
degraded pipelines as healthy waiting (green 'audio saved locally' dot next
to a spinner that never resolves; a 3-second reconnect snackbar then silence).

Compose the empty state, title, and WAL indicator from the capability
signals already at the call site: photo-capable source (Ray-Ban Meta /
OpenGlass), UsageProvider.isOutOfCredits, ConnectivityProvider, and
RecordingState.interrupted. The WAL indicator now renders the worst
WalSyncDisplayState across the session's WALs, with a tap-to-retry for
failed uploads reusing the sync pages' deliberate single-recording retry.
Voice-training onboarding renders its uploading/memorizing/personalizing
states, which existed in the ARB but were never wired.

Rewords v2UndetectedMessage (no more 'we see you have a V1 device') and
transcribeLaterNote; deletes five dead never-rendered strings; replaces
the hardcoded 'Capturing' title with localized keys.

Resolves #14473; renders the missing status states for #14472.
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.

Copy audit: user-facing strings that name features the user may not have (key example: 'Waiting for transcript or photos…')

1 participant