Skip to content

fix: improve pause behavior to interrupt audio and handle transitions#30

Merged
dnim merged 3 commits into
mainfrom
fix/pause-audio-transition
Apr 30, 2026
Merged

fix: improve pause behavior to interrupt audio and handle transitions#30
dnim merged 3 commits into
mainfrom
fix/pause-audio-transition

Conversation

@dnim
Copy link
Copy Markdown
Owner

@dnim dnim commented Apr 30, 2026

  • 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

- 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
Copilot AI review requested due to automatic review settings April 30, 2026 05:52
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.08%. Comparing base (2f54c2b) to head (6494c23).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Switch main model from GPT-5.1-Codex to Claude Sonnet 4 for build mode
- Enables thinking mode capabilities for improved code reasoning
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 switchPrompt special-case for pauseResume that 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 thread src/app.ts
Comment on lines +192 to +194
const beforeState = this.machine.getState();
this.machine.togglePause();
const afterState = this.machine.getState();
@dnim dnim merged commit 8723c7a into main Apr 30, 2026
7 checks passed
@dnim dnim deleted the fix/pause-audio-transition branch April 30, 2026 05:59
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