Skip to content

Prevent alert bursts after Mac sleep - #23

Merged
masonasons merged 1 commit into
masonasons:mainfrom
johanntan:fix/macos-wake-sound-burst
Sep 24, 2026
Merged

masonasons merged 1 commit into
masonasons:mainfrom
johanntan:fix/macos-wake-sound-burst

Conversation

@johanntan

Copy link
Copy Markdown
Contributor

Summary

Waking a Mac could play overlapping timeline and notification sounds together, producing a loud burst. The Mac client now stops sounds for system sleep, rebuilds audio on wake, and discards background chimes for five seconds while timelines catch up.

  • Power commands block new sounds immediately, even with timeline callbacks already queued; audio engine changes remain on the core thread.
  • Across front ends, automatic timeline and notification chimes play one at a time, at least one second apart. Extra chimes are discarded rather than queued.
  • Action sounds remain independent: a boost sound and an incoming-post chime can still overlap. The background cooldown does not block boosting, liking, or posting feedback.
  • Includes regression tests and a changelog entry under 0.5.9.

Validation

  • macOS Debug app build succeeded.
  • Shared core build succeeded.
  • Full core test suite: 1,439 checks, 0 failures, including wake recovery, repeated power transitions, background bursts, and long soundpack clips.
  • git diff --check passed.

A real sleep/wake cycle with live accounts and an audio device still needs manual verification. Other front ends were not built locally.

Observe macOS system sleep and wake events. Stop active sounds before
sleep, rebuild the audio engine on wake, and discard background chimes
for five seconds while timelines catch up.

Block new sounds immediately when power commands arrive, including while
older timeline callbacks are still queued. Keep engine access on the core
loop and keep the gate closed until all pending power commands finish.

Route automatic timeline and notification chimes through a shared policy
that allows one background chime at a time, at least one second apart.
Action sounds such as boosting, liking, and posting remain independent
and can still overlap incoming-post chimes after wake recovery.

Add regression coverage for wake suppression, repeated power transitions,
short notification bursts, and long soundpack clips. Register the tests
in the test runner and Windows build, and add the 0.5.9 changelog entry.

Validation: macOS app and core builds succeeded; 1,439 checks passed.
Actual sleep/wake behavior with live accounts still needs a manual run.

Co-Authored-By: Codex <noreply@openai.com>
@masonasons
masonasons merged commit 06969c7 into masonasons:main Sep 24, 2026
5 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