refactor: optimize sound-controller (@fehmer)#7884
Merged
Conversation
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors frontend sound handling to reduce upfront audio loading by centralizing sound config, caching Howler/Howl instances, and only preloading the selected click-sound bundle; also adds click sound asset validation and introduces new click6/click7 _2 variants.
Changes:
- Add
frontend/src/ts/constants/sounds.tsas the single source of truth for click/oscillator/scale sound config + derived click file lists. - Rework
sound-controllerto cache the Howler module + Howl instances and preload only the active click bundle (plus error sounds). - Extend
check-assetsto validate click sound files vs config and add new click6/click7_2wav assets.
Reviewed changes
Copilot reviewed 4 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/static/sound/click7/click7_1_2.wav | New click7 variant asset. |
| frontend/static/sound/click7/click7_2_2.wav | New click7 variant asset. |
| frontend/static/sound/click7/click7_3_2.wav | New click7 variant asset. |
| frontend/static/sound/click6/click6_1_2.wav | New click6 variant asset. |
| frontend/static/sound/click6/click6_2_2.wav | New click6 variant asset. |
| frontend/static/sound/click6/click6_3_2.wav | New click6 variant asset. |
| frontend/src/ts/controllers/sound-controller.ts | Lazy-load Howler + cache Howls; preload only selected click bundle; simplify click/scale handling using shared config. |
| frontend/src/ts/constants/sounds.ts | New centralized sound config + derived click file list generation. |
| frontend/scripts/check-assets.ts | Add click-sound asset validation against clickSoundConfig. |
| .github/workflows/monkey-ci.yml | Update assets path filter to include sound assets (currently uses wrong directory name). |
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.
Uh oh!
There was an error while loading. Please reload this page.