[Hue] Windows support
Description
Add support for Windows, fix some bugs and improve wording.
Checklist
- [x] I read the extension guidelines
- [x] I read the documentation about publishing
- [x] I ran
npm run buildand tested this distribution build in Raycast - [x] I checked that files in the
assetsfolder are used by the extension itself - [x] I checked that assets used in the
READMEare located outside the metadata folder if they were not generated with our metadata tool
Thank you for the update! :tada:
Due to our current reduced availability, the initial review may take up to 10-15 business days.
Greptile Summary
This PR adds Windows support to the Hue extension by adding Windows keyboard shortcuts across all commands and updating the platform configuration. The PR also includes important dependency upgrades (XState v4→v5, Jimp upgrade, @raycast/api and @raycast/utils updates) and fixes a NaN bug in color helpers.
Key Changes:
- Added
"platforms": ["macOS", "Windows"]topackage.json - Added Windows shortcuts (Ctrl+Shift+...) alongside existing macOS shortcuts (Cmd+Shift+...) in
controlLights.tsxandcontrolGroups.tsx - Fixed NaN error by adding null coalescing operators in
colors.tsbrightness calculations - Refactored Jimp usage to use modern async/await API instead of deprecated callback-based API
- Migrated XState from v4 to v5 with updated API patterns (
fromPromise, new action/guard syntax) - Added
optimisticGroupUpdatehelper to coordinate state updates across groups and lights
Confidence Score: 4/5
- This PR is safe to merge with one minor correction needed
- The code changes are well-structured and follow best practices. The only issue is the CHANGELOG date format which uses an actual date instead of the required placeholder. The dependency upgrades are appropriate, the Windows support implementation is consistent, and the bug fixes are correct.
- extensions/hue/CHANGELOG.md requires correction to use {PR_MERGE_DATE} placeholder
Important Files Changed
| Filename | Overview |
|---|---|
| extensions/hue/CHANGELOG.md | Added new changelog entry but used actual date instead of placeholder |
| extensions/hue/package.json | Added Windows platform support and updated dependencies |
| extensions/hue/src/helpers/colors.ts | Fixed NaN bug by adding null coalescing for brightness values |
| extensions/hue/src/helpers/createLightIconPngUri.ts | Refactored to use modern Jimp API with async/await |
| extensions/hue/src/lib/hueBridgeMachine.ts | Updated XState v4 to v5 with modern API patterns |
| extensions/hue/src/controlGroups.tsx | Added Windows shortcut support and optimistic updates for groups |
| extensions/hue/src/controlLights.tsx | Added Windows shortcut support for all light control actions |
| extensions/hue/src/helpers/raycast.ts | Added optimisticGroupUpdate helper for coordinated state updates |
Published to the Raycast Store: https://raycast.com/pindab0ter/hue
:tada: :tada: :tada:
We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.