Skip to content

fix(mobile): retain attachments and prepare imported AAC recordings - #9328

Draft
creepyblues wants to merge 2 commits into
block:mainfrom
creepyblues:neo/mobile-attachment-import
Draft

creepyblues wants to merge 2 commits into
block:mainfrom
creepyblues:neo/mobile-attachment-import

Conversation

@creepyblues

@creepyblues creepyblues commented Nov 10, 2026 •

Copy link
Copy Markdown

Problem and resulting behavior

Mobile document attachments can fail after an iOS picker Inbox file disappears. Imported M4A/AAC recordings also bypass the canonical voice-note packager, so the relay rejects otherwise playable Voice Memos for their container layout.

Keep a bounded, composer-owned disk copy at selection time. Route imported M4A/AAC files through the existing native voice-note packager before upload, with input/output size checks, cancellation handling, and generated-file cleanup. Preparation failures propagate without sending raw fallback bytes; retained originals remain available for retry. Imported duration comes from relay metadata rather than an invented zero. Other generic files keep their current path.

Validation

  • Independent agent review completed for retention and imported-audio changes; no remaining blocking findings.
  • just mobile-install mobile-check mobile-test: analysis/format pass; 4,657 app tests pass (68 skipped), 4 crypto Flutter tests and 27 crypto Dart tests pass.
  • Regressions exercise actual picker retention and upload service seams: missing original, preparation failure, cancel, retry, metadata classification, source/output bounds, and cleanup. Disabling imported-audio routing fails both new tests; restored source is byte-identical to the full-suite-tested implementation.
  • Existing AVFoundation packager exercised in a temporary macOS harness, substituting only Flutter callback/error types: 120-second and 3,300-second synthetic AAC inputs succeed. Large input: 53,507,866 bytes; output: 53,521,230 bytes, AAC + H.264, moov before mdat, duration preserved at 3,300 seconds. This is not an iPhone or live-relay acceptance test.

Required device validation — still draft

This host has Command Line Tools but no iOS simulator SDK. Native iPhone workflow and human acceptance remain pending. The existing iOS packager re-encodes and uses a 30-second export timeout; long recordings need testing on the target device.

On a build containing this branch:

  1. Export a short Voice Memo to Files; attach it through Buzz's file picker, wait, then send. Expect a playable audio card without missing-file/fast-start rejection.
  2. Repeat with a long recording around 52 MB; confirm duration and playback.
  3. Cancel during preparation/upload, retry, and confirm the original survives and the retry succeeds.
  4. Attach an ordinary document and record an in-app voice note; confirm both still work.

No release is installed on users' phones by this PR. The separately reported intermittent HTTP 401 is not claimed fixed here. Related image-preparation work: #9022.

Originating conversation: buzz://message?channel=2808d388-5656-4295-8208-be4d9aa2276f&id=197c3a679eb1e5bfd94e939295a254d922e997ec94140dc3078a0cfdbcc6fdc0

Signed-off-by: Neo <506363b4e2da4029b16646e18649d4e7244dccb36b0dedf283edb09e9f979a43@sungholee.communities.buzz.xyz>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 30e1fa47fb9a67cbc408cfcee83dcf280ab49595...4a63ee86578bb88a5c1f998a86819c51e6e2ae2a.
A new review must complete for this exact range. When manual authorization
is required, a user with write access must comment exactly
@buzz-security-review 4a63ee86578bb88a5c1f998a86819c51e6e2ae2a to authorize a new review.
Any previous review applies only to its recorded range.

Signed-off-by: Neo <506363b4e2da4029b16646e18649d4e7244dccb36b0dedf283edb09e9f979a43@sungholee.communities.buzz.xyz>
@creepyblues creepyblues changed the title fix(mobile): retain document attachments before deferred upload fix(mobile): retain attachments and prepare imported AAC recordings Nov 10, 2026

This branch has not been deployed

No deployments
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