Skip to content

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

Open
Konsl wants to merge 1 commit into
spicetify:mainfrom
Konsl:patch-1
Open

fix(wrapper): update Spicetify.Color.CSSFormat module check#3907
Konsl wants to merge 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the update to the Spicetify.Color.CSSFormat module check.
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.
✨ 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.

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