fix(wrapper): update Color.CSSFormat module check - #3907
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe runtime resolver now assigns ChangesRuntime resolver update
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to 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)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Was this tested on older versions of spotify? |
|
I tested it on 1.2.96.518, 1.2.95.453 and 1.2.92.147. |
|
I meant 1.2.14 etc... |
|
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. |
Color.CSSFormat module check
The current filter matches two modules (and selects the first, wrong, one):

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:

Summary by CodeRabbit