fix: improve pause behavior to interrupt audio and handle transitions#30
Merged
Conversation
- Stop currently playing audio when pausing from running state - Handle pause during transition period correctly: confirm next mode but stay paused - Suppress start sound when pause is used to skip transition - Add comprehensive tests for new pause behaviors Fixes two issues: 1. Audio continues playing after pause 2. Pause during transition advances to next mode but stays running
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 83.67% 84.08% +0.40%
==========================================
Files 9 9
Lines 674 685 +11
Branches 173 176 +3
==========================================
+ Hits 564 576 +12
+ Misses 110 109 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Switch main model from GPT-5.1-Codex to Claude Sonnet 4 for build mode - Enables thinking mode capabilities for improved code reasoning
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves pauseResume handling in DoroApp so pausing reliably interrupts audio and behaves correctly when used during the end-of-mode transition prompt.
Changes:
- Stop any currently playing audio when pausing from a running state.
- Add a
switchPromptspecial-case forpauseResumethat confirms the transition but immediately pauses (and suppresses the start sound). - Add unit tests covering the new pause/audio/transition behaviors.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/app.ts | Updates pauseResume behavior to stop playback on pause and handle switchPrompt transitions correctly. |
| src/tests/app.test.ts | Adds tests for stopping audio on pause and for pause behavior during switchPrompt. |
| opencode/plans/fix-pause-audio.md | Documents the completed implementation plan and checklist for the fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+192
to
+194
| const beforeState = this.machine.getState(); | ||
| this.machine.togglePause(); | ||
| const afterState = this.machine.getState(); |
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.
Fixes two issues: