Skip to content

fix(sound): lower default sound volume to 30% - #24

Merged
leochiu-a merged 1 commit into
mainfrom
claude/lower-default-volume-52c5df
Jul 29, 2026
Merged

leochiu-a merged 1 commit into
mainfrom
claude/lower-default-volume-52c5df

Conversation

@leochiu-a

@leochiu-a leochiu-a commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Why

The default soundVolume was 1 (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 1 default was duplicated across 4 files, so it's now a single shared constant DEFAULT_SOUND_VOLUME — one place to change it from here on:

  • src/types/settings.ts — add DEFAULT_SOUND_VOLUME = 0.3
  • src/popup/useSettings.ts — popup default + storage fallback
  • src/content/showSettings.ts — defaultState, storage read, onChanged fallback
  • src/content/content.ts — orchestrator initial value
  • src/content/banner.ts — soundVolume ?? DEFAULT_SOUND_VOLUME
  • src/content/banner.test.ts — assert against the constant instead of a hardcoded 1

Scope

Only affects users who have not adjusted the volume. Anyone with a stored soundVolume in chrome.storage.sync is unchanged.

Verification

  • oxlint and oxfmt --check pass
  • 8 tests fail and tsc --noEmit reports 3 tsconfig errors (baseUrl was 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

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>
@leochiu-a
leochiu-a merged commit 4d77b5d into main Jul 29, 2026
3 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.

1 participant