Skip to content

fix(wrapper): update Color.CSSFormat module check - #3907

Merged
rxri merged 1 commit into
spicetify:mainfrom
Konsl:patch-1
Aug 26, 2026
Merged

fix(wrapper): update Color.CSSFormat module check#3907
rxri merged 1 commit into
spicetify:mainfrom
Konsl:patch-1

Conversation

@Konsl

@Konsl Konsl commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The current filter matches two modules (and selects the first, wrong, one):
image

The other module is a Proxy object with a get handler that returns some value for whatever property you try to access on it.
Therefore, you can't just test more entries of the CSSFormat enum, but since the Proxy object always returns some sort of React component, we can just check for the type of the returned value.

In my testing (Spotify version 1.2.95.453.g0eeebbed), this correctly identified the CSSFormat module:
image

Summary by CodeRabbit

  • Bug Fixes
    • Improved color handling by reliably identifying valid color formatting data.
    • Prevented incorrect color module detection that could affect visual styling.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a424270d-f26a-46ba-9d65-5e19b266171a

📥 Commits

Reviewing files that changed from the base of the PR and between c9571cd and e2c225d.

📒 Files selected for processing (1)
  • src/jsHelper/spicetifyWrapper/webpack/runtime-resolvers.js

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The runtime resolver now assigns Spicetify.Color.CSSFormat only from a module whose RGBA property is a number.

Changes

Runtime resolver update

Layer / File(s) Summary
Color module selection
src/jsHelper/spicetifyWrapper/webpack/runtime-resolvers.js
The resolver changes the RGBA check from a truthy-value check to a strict numeric-type check.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to e2c22

This is a localized module-detection fix with no actionable merge-blocking risk remaining; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the functional change: updating the module check for Color.CSSFormat.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rxri

rxri commented Aug 25, 2026

Copy link
Copy Markdown
Member

Was this tested on older versions of spotify?

@Konsl

Konsl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

I tested it on 1.2.96.518, 1.2.95.453 and 1.2.92.147.

@rxri

rxri commented Aug 25, 2026

Copy link
Copy Markdown
Member

I meant 1.2.14 etc...

@Konsl

Konsl commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

It works on 1.2.47.364.

On 1.2.18.999, 1.2.13.661 and 1.2.9.743 the filter matches the same (correct) module twice, which is fine or at least not worse than the old implementation.

I couldn't get 1.1.84.716 working with spicetify applied, sry.

@rxri rxri changed the title fix(wrapper): update Spicetify.Color.CSSFormat module check fix(wrapper): update Color.CSSFormat module check Aug 26, 2026
@rxri
rxri merged commit 1f13f73 into spicetify:main Aug 26, 2026
7 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.

2 participants