Skip to content

fix(control): preserve topmost visualizer layer solid color under dynamic theme - #740

Merged
CaYatur merged 2 commits into
mainfrom
fix/layer-stack-topmost-solid-color
Oct 11, 2026
Merged

CaYatur merged 2 commits into
mainfrom
fix/layer-stack-topmost-solid-color

Conversation

@CaYatur

@CaYatur CaYatur commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  1. Preserve Solid Color in Dynamic Theme: When dynamic theme from Windows SMTC album art is applied, visualizer layers configured with solid color (\custom) are preserved without having their colors overwritten by the album art.
  2. Immediate Cover Photo Preview Redraw: When a song or album artwork changes in Windows Dynamic Theme, the cover photo thumbnail preview in the panel and the live preview canvas are immediately updated and redrawn without lag or needing page interaction.

Changes

  • Guarded \setEffective(cfg, 'visualizer.color', ...)\ in admin.js to only execute if the topmost visualizer layer's \colorMode\ is 'theme'.
  • Added \syncDynamicThemePreview\ in admin.js to dynamically update the cover photo thumbnail preview (.dynamic-theme-art-thumb) and track details immediately upon receiving \onNowPlaying\ and resolving dynamic theme.
  • Fixed \�rtworkKey\ computation in admin.js to be collision-free across JPEG headers.
  • Added \drawOnce()\ in preview.js and hooked image loading events in nowplaying.js and layers.js to immediately repaint the preview canvas upon config changes or cover image load.
  • Added behavioral unit tests in tests/dynamic-theme-preview-update.test.js.
  • Updated documentation test counts to 2986.

Co-authored-by: caganturgut 271973834+caganturgut@users.noreply.github.com

…amic theme

In layer stack mode, setEffective was blindly overwriting the topmost visualizer
layer's color whenever dynamic theme ran. Guard setEffective so it only runs if the
topmost visualizer layer's colorMode is 'theme'. When any visualizer layer (topmost
or lower) is set to solid ('custom'), its colors are preserved.

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
@cayadraft

cayadraft Bot commented Oct 11, 2026

Copy link
Copy Markdown

@CaYatur

CaYaDraft — pull request

Summary
This pull request fixes an issue where dynamic theme colors from Windows SMTC album art were incorrectly overwriting the solid colors of topmost visualizer layers. It adds logic to check the colorMode property before applying theme colors, ensuring that layers set to 'solid' retain their original colors while only layers set to 'theme' receive updates.

Files

  • src/admin/admin.js (logic changes and comments)
  • tests/stack-global-controls.test.js (new test case for stacked solid/theme layers)
  • README.md, README.tr.md, ROADMAP.md (documentation and test count updates)

Note
Nothing blocking is visible from the text.


Stopping here. I will not merge, push, or change this pull request until you ask.

/caya explain describes the diff. /caya plan previews the next edit. /caya revise adds a commit.

…review

When the track or cover photo changes in Windows SMTC, immediately update the cover artwork preview thumbnail and song info in the dynamic theme panel without requiring a full page re-render. Compute collision-free artwork keys to prevent dropping new covers that share identical JPEG headers. Also ensure the live preview canvas immediately redraws when config changes or new artwork loads.

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
@CaYatur
CaYatur merged commit 4359e6d into main Oct 11, 2026
5 checks passed
@CaYatur
CaYatur deleted the fix/layer-stack-topmost-solid-color branch October 11, 2026 20:13
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