Skip to content

refactor: optimize sound-controller (@fehmer)#7884

Merged
Miodec merged 18 commits intomasterfrom
feature/refactor-soundcontroller
May 5, 2026
Merged

refactor: optimize sound-controller (@fehmer)#7884
Miodec merged 18 commits intomasterfrom
feature/refactor-soundcontroller

Conversation

@fehmer
Copy link
Copy Markdown
Member

@fehmer fehmer commented Apr 28, 2026

  • extract and simplify config
  • add sounds to check-assets validation
  • only load the selected click sound bundle, not all

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Apr 28, 2026
@fehmer fehmer added force-ci Force CI to run on draft PRs assets Languages, themes, layouts, etc. labels Apr 28, 2026
@fehmer fehmer marked this pull request as ready for review April 29, 2026 10:28
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Apr 29, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 30, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

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

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.ts as the single source of truth for click/oscillator/scale sound config + derived click file lists.
  • Rework sound-controller to cache the Howler module + Howl instances and preload only the active click bundle (plus error sounds).
  • Extend check-assets to validate click sound files vs config and add new click6/click7 _2 wav 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).

Comment thread .github/workflows/monkey-ci.yml
Comment thread frontend/scripts/check-assets.ts Outdated
Comment thread frontend/scripts/check-assets.ts Outdated
@Miodec Miodec merged commit d77d15e into master May 5, 2026
15 checks passed
@Miodec Miodec deleted the feature/refactor-soundcontroller branch May 5, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assets Languages, themes, layouts, etc. force-ci Force CI to run on draft PRs frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants