NEXT: dictation keeps recordings of any length and sends long ones as their file

Merged
TE
8d ago
+1331-143

Leo: "Attachments take arbitrarily large files of any type; there is no size cap."

Dictation previously discarded recordings after two minutes and dropped audio larger than the inline prompt budget. Recordings now stream into an owner-only WAV/RF64 file with no duration or file-size cap. Clips up to 4 MiB still travel inline; larger clips attach as saved original files in local chats. Remote chats receive the transcript and an explicit notice that the original remains on this Mac; remote upload is covered by the separate followup stack (#26953, #26966, #27012).

The serial writer keeps file I/O off the audio callback and main actor, closes before delivering the final update, and removes cancelled or superseded recordings. Finished large files remain in the chat upload folder and follow its cleanup policy. The writer queue can retain pending chunks if storage stalls; it does not read a large recording back into memory. WAV sizes above 4 GiB use RF64.

Each update carries the chat captured when recording started. Navigating while the writer closes cannot attach, splice, or auto-send the previous chat's audio or transcript, including when saving fails. Save failures and omitted remote audio have localized notices.

Risk: high. This changes audio persistence, cleanup, and chat ownership. The 17-file diff stays together because recording lifecycle, native/page serialization, attachment delivery, localization, and regression coverage form one feature.

Verification

Reviewed head: 1c5be308dfcf79096be1ac77d4e93dba701091d0. Merged base: bb8aa8bfaa38dc1ada05da1a2ea93e36a4110b5d.

  • Independent Codex gpt-6-astra high whole-diff review: SHIP at this head. Both cross-chat privacy findings were repaired and re-reviewed.
  • Remote web check: PASS. Focused dictation regression plus full formatting, lint, type checking, structural checks, and protocol verification. Snapshot 0791e9d1d72e14c959f4dd2ad1db344846d648d3 has exactly the final tree 573c21681ef9d54424caa35d7dcb7c34e0945919.
  • Exact-head app compile: PASS, job 48025556a660129f7612eac9, 55 seconds.
  • Native suites: PASS, job 25b6a5aef00c48f8fe6a0f5d. AgentPaneDictationAudioTests: 18 tests, including both successful and failed-write chat-switch cases. AgentChatUploadsTests and AgentChatUploadsPurgeTests: 4 tests. Source 0191d6874f2b307039a540779cb1320e4f32c143; native source/tests are byte-identical to final head, whose only subsequent changes format/type the web regression.
  • Chat-switch red/green: old hook fails the regression; repaired hook passes. That earlier combined run subsequently failed formatting, corrected in the final green run.
  • Earlier native red/green proved >2-minute recording, >4-GiB RF64, cancellation during close, and finish/discard ordering (jobs e27a3ef4666af26bcaf65e3e, 8bb04ad698a6f4183d4c6e77, c50bc8a40d0759c55fd3dd46, dade3dd2769ca64400e093ba, 20d159ec5ab4dc4ae07e9699).

No live microphone session was exercised; native tests feed samples directly.

No capture: the visible changes are notice strings, with no layout or styling changes.

Changelog: Dictation keeps voice recordings of any length for chats whose model takes audio, instead of dropping recordings over two minutes.

Agent session: agent session