Repository navigation
feat(app): share a whole Offline Sync recording as one audio file - #22088
Conversation
A recording on Offline Sync can be hundreds of 10 s files, and the only way to get its audio off the phone was to open each file and share it on its own. A user with a stuck processing backlog spent hours doing that to get one meeting transcribed elsewhere. The recording's file sheet now offers Share Recording when its files have audio on the phone. It decodes each file with the existing single-file share path, joins them oldest first with the existing WavCombiner (which streams each part's PCM), and opens the share sheet with one WAV. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Solid, well-scoped feature — the production change looks correct and I'd like a human maintainer's product sign-off before merge; no blocking issues found. What I verified (all 10 changed files):
Two disclosed limitations worth a maintainer decision (not blockers):
USER IMPACT: Offline Sync users can now share an entire recording as one audio file instead of sharing dozens of 10-second files one at a time; the button only appears when the phone actually holds the audio. What I'd still want as a reviewer: nothing blocking — a device smoke test of a long (1h+) mixed Opus/PCM recording on a mid-range Android phone would confirm the UI-isolate freeze stays acceptable, and an issue tracking the isolate follow-up would keep it from being forgotten. Leaving for human maintainer review for the product call on whole-recording export behavior. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks for the review. I filed the isolate follow-up as #22126. Gap padding stays off on purpose: the shared file is for transcription elsewhere, and padding hours of silence would only make it bigger. No code change for this round. |
kodjima33
left a comment
There was a problem hiding this comment.
Feature (share a whole Offline Sync recording as one audio file), not a bug fix -> approve-only per policy.
Summary
A recording on Offline Sync can be hundreds of 10 s files. The only way to get its audio off the phone was to open each file and share it on its own. A Discord user with a stuck processing backlog spent hours doing that to get one meeting transcribed elsewhere.
The recording's file sheet (tap a recording on Offline Sync) now has a Share Recording row when its files have audio on the phone. Tapping it:
_getOrCreateAudioFile, Opus or PCM);WavCombiner, which streams each part's PCM after its header and skips unreadable parts;The new code is small:
writeRecordingWav/shareRecordingAsAudioinAudioPlayerUtils, a one-lineSyncProviderdelegate, and the row inAutoSyncPage. The existing "Share Recording" string is reused, so there is no new l10n.Files whose audio is still on the device (SD card) are left out. Gaps between files are not padded with silence. Decoding runs on the UI isolate, as single-file share already does, so a recording of several hours pauses the UI while it builds. Moving it to an isolate is the follow-up if that proves to be a problem.
Testing
test/unit/audio_player_utils_test.dart: two PCM16 files given out of order, plus one still on the SD card, produce one WAV whose data is the two files oldest first (8 bytes, nothing from the device). A recording with no phone audio returns null. Removing the oldest-first sort fails the test.test/pages/conversations/offline_sync_recording_blocks_test.dart: Share Recording on a recording hands every file to the provider once; a recording with no phone audio shows no row. 24/24 pass in the two files.conversations-offline-sync-recording-files(screenshot above).flutter analyzeon the touched files reports only the two pre-existingShare.shareXFilesdeprecations inshareAsAudio; the new call usesSharePlus.instance.share.Product invariants affected
none
UI-Evidence: https://raw.githubusercontent.com/aryanorastar/omi/7dc5e797981b60f37e2a51af11e21e4b111a9de0/.agent-artifacts/ui-evidence/app-share-recording/001-mobile-ios-recording-share-row.png
🤖 Generated with Claude Code