Skip to content

Add discard recording feature to stop and delete without saving - #2

Merged
dschuld merged 1 commit into
mainfrom
claude/audio-discard-option-s9fpno
Jul 21, 2026
Merged

Add discard recording feature to stop and delete without saving#2
dschuld merged 1 commit into
mainfrom
claude/audio-discard-option-s9fpno

Conversation

@dschuld

@dschuld dschuld commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds a new "discard" feature that allows users to stop a recording and delete it without saving. This complements the existing "stop" action which saves the recording.

Key Changes

  • RecordingEngine: Added discard() method that stops the current recording and deletes its file. The method is a no-op when idle and gracefully handles finalize failures since the file is being discarded anyway.
  • RecorderScreen UI:
    • Added a new "Discard" button (red delete icon) that appears alongside pause/resume and stop buttons during recording/paused states
    • Implemented a confirmation dialog to prevent accidental discards with "Discard" and "Keep recording" options
  • RecorderViewModel: Added discardRecording() method to dispatch the discard action
  • RecordingService: Added ACTION_DISCARD handling to call the engine's discard method and clean up the foreground service
  • Strings: Added UI text for the discard button, dialog title, dialog message, and keep recording option

Notable Implementation Details

  • The discard operation ignores recorder finalization failures since the file is being deleted anyway
  • Previously saved recordings are preserved when discarding a new recording attempt
  • The feature can be used while recording or paused
  • Comprehensive test coverage includes scenarios for discarding while recording, while paused, when idle, after previous saves, with finalize failures, and ability to record again after discarding

https://claude.ai/code/session_01Ex7jFXCfdXG2EUuJ2yR5ej

While recording or paused, a discard button next to the stop button
deletes the current recording after a confirmation dialog, instead of
saving and queueing it for upload.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ex7jFXCfdXG2EUuJ2yR5ej
@dschuld
dschuld merged commit 554dd66 into main Jul 21, 2026
2 checks passed
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.

2 participants