Repository navigation
feat(app): truthful transcription-outage status and pending-transcription counts while recordings drain - #18838
Merged
Merged
Conversation
… fails
The live-capture surfaces named a server-side STT failure 'Transcription
unavailable' and stopped there, leaving the reader to guess whether the
wearable/recording was still working. Audio keeps flowing into the WAL
regardless, so the status should say so.
captureStateLabel now resolves the transcription-unavailable state to the
full sentence ('Transcriptions are unavailable, recording continues on
device and will process later') with a compact variant
('Transcription unavailable - saving on device') for space-constrained
surfaces: the conversations list's in-progress card passes compact: true,
while the capturing page keeps the full sentence. The shared state header
wraps the sentence (smaller, up to three lines) instead of ellipsizing
away the 'recording continues' half. Settings and the phone-call page
keep the bare 'Transcription unavailable' key - different flows.
…drains After a transcription outage recovers, recorded audio uploads recording by recording, but neither the capturing page nor the conversations list said how much was left - just a duration that slowly shrank. The live-capture WAL indicator now adds a 'Transcriptions pending X/Y' count line once the session has a queue (two or more recordings), fed by LocalWalSyncImpl.getSessionWals - the same window and storage scope as getSessionUnsyncedWals, minus the status filter - surfaced through CaptureProvider.sessionTranscriptionBacklogCounts. The conversations list also gets a compact 'Transcriptions pending N' banner while phone-local recordings wait to upload (SyncProvider.pendingLocalTranscriptionWals: miss and uploaded-but-processing WALs on disk, not device-side files); tapping it opens the sync surface that drains them. The banner resolves SyncProvider optionally (the _maybeProvider idiom) so hermetic fixtures embedding the conversations page without one keep building, and the visual-audit inert stub implements the new getter.
With no transcript segments yet, the capturing page's empty state kept promising 'Listening... a transcript will appear here' even after the server said live transcription cannot run - waiting copy next to a state that can never resolve. The empty state now resolves the terminal-failure branch (after out-of-credits, before offline) to the same shared outage sentence the app bar names, so one moment still has one name. Adds the mobile changelog fragment for the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the server terminally fails live transcription (
stt_failed), the app kept showing a bare "Transcription unavailable" label and then said nothing about the recordings piling up afterwards. Audio keeps flowing into the WAL the whole time, so the capture surfaces should say that, and the recovery drain should be visible as a count.Changes
captureStateLabelresolves thetranscriptionUnavailablestate to the full sentence — "Transcriptions are unavailable, recording continues on device and will process later" — with acompactvariant ("Transcription unavailable · saving on device") used by the conversations list's in-progress card, where the full sentence cannot fit. The shared state header wraps the sentence (smaller, up to three lines) instead of ellipsizing away the "recording continues" half. Settings and the phone-call page keep the bare "Transcription unavailable" key (different flows).LocalWalSyncImpl.getSessionWals(same window/storage scope asgetSessionUnsyncedWals, minus the status filter) surfaced throughCaptureProvider.sessionTranscriptionBacklogCounts. The conversations list gets a compact "Transcriptions pending N" banner while phone-local recordings wait to upload (SyncProvider.pendingLocalTranscriptionWals: miss + uploaded-but-processing WALs on disk; device-side SD/flash files are a different drain); tapping opens the sync surface that drains them.Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 3124 -> 3137 | one 13-line read-only getter (sessionTranscriptionBacklogCounts) feeding the live-capture backlog chip; no behavior moved or split
Testing
app/test/unit/capture_state_labels_test.dart— full/compact outage labels; compact leaves other states untouched.app/test/widgets/conversation_detail_ux_test.dart— the outage sentence wraps in the shared state header on a phone-sized surface.app/test/widgets/transcription_paused_warning_test.dart— the in-progress card shows the compact variant until the backend is ready again.app/test/unit/session_wal_sync_test.dart,app/test/unit/capture_backlog_counts_test.dart—getSessionWalsscope and the pending/total counts getter.app/test/widgets/capturing_wal_backlog_test.dart— the chip renders "Transcriptions pending 3/9" while draining and stays hidden for a single queued recording.app/test/widgets/pending_transcriptions_banner_test.dart— banner count, scope (disk only, uploaded counts as pending) and self-hiding.app/test/widgets/capturing_empty_state_test.dart— the stale Listening placeholder is gone during a terminal outage and intact on a healthy session.app/test/spine/c3_conversation_test.dart(existing) — keeps guarding the conversations page embedded without aSyncProvider; the banner resolves it optionally (_maybeProvideridiom) and the visual-audit inert stubs implement the new getter.bash test.sh(hermetic unit/widget/spine) andOMI_PR_BODY_FILE=PR_BODY.md make preflight(22 checks) both pass.