fix(sound): lower default sound volume to 30% - #24
Merged
Merged
Conversation
The banner sound played at full volume for anyone who had not touched the slider, which is jarring on first install. Extract the default into a shared DEFAULT_SOUND_VOLUME constant so popup, content orchestrator, settings sync and banner playback all agree on one value. Users with a stored soundVolume are unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
The default
soundVolumewas1(100%), so anyone who never touched the slider got a full-volume "YOU DIED" sting the first time they merged a PR. This lowers the default to 30%.What changed
The
1default was duplicated across 4 files, so it's now a single shared constantDEFAULT_SOUND_VOLUME— one place to change it from here on:src/types/settings.ts— addDEFAULT_SOUND_VOLUME = 0.3src/popup/useSettings.ts— popup default + storage fallbacksrc/content/showSettings.ts—defaultState, storage read,onChangedfallbacksrc/content/content.ts— orchestrator initial valuesrc/content/banner.ts—soundVolume ?? DEFAULT_SOUND_VOLUMEsrc/content/banner.test.ts— assert against the constant instead of a hardcoded1Scope
Only affects users who have not adjusted the volume. Anyone with a stored
soundVolumeinchrome.storage.syncis unchanged.Verification
oxlintandoxfmt --checkpasstsc --noEmitreports 3 tsconfig errors (baseUrlwas removed in newer TS), but stashing these changes and running on a clean tree produces the exact same failures — pre-existing and unrelated to this change🤖 Generated with Claude Code