Add music-assistant-controls extension#21249
Conversation
- v2 (#8) - fix(deps): update dependency @raycast/api to v1.102.6 (#35) - chore(deps): update dependency @types/react to v19.1.12 (#34) - chore(deps): update dependency @types/node to v22.18.0 (#33) - chore(deps): update dependency eslint to v9.34.0 (#32) - chore(deps): update dependency @types/react to v19.1.11 (#31) - fix(deps): update dependency @raycast/api to v1.102.5 (#30) - chore(deps): update dependency @types/node to v22.17.2 (#29) - fix(deps): update dependency @raycast/api to v1.102.4 (#28) - chore(deps): update dependency @types/react to v19.1.10 (#27) - chore(deps): update dependency eslint to v9.33.0 (#24) - chore(deps): update dependency @types/node to v22.17.1 (#23) - fix(deps): update dependency @raycast/api to v1.102.3 (#22) - chore(deps): update dependency @types/react to v19.1.9 (#19) - chore(deps): update dependency typescript to v5.9.2 (#21) - chore(deps): update dependency @types/node to v22.17.0 (#20) - chore(deps): update dependency eslint to v9.32.0 (#18) - chore(deps): update dependency @types/node to v22.16.5 (#17) - fix(deps): update dependency @raycast/api to v1.101.1 (#16) - fix(deps): update dependency @raycast/api to v1.101.0 (#15) - chore(deps): update dependency @types/node to v22.16.4 (#14) - chore(deps): update dependency eslint to v9.31.0 (#13) - chore(deps): update dependency @types/node to v22.16.3 (#12) - chore(deps): update dependency @types/node to v22.16.2 (#11) - chore(deps): update dependency @types/node to v22.16.1 (#10) - chore(deps): update dependency @types/node to v22.16.0 (#3) - chore(deps): update dependency @types/react to v19.1.8 (#5) - chore(deps): update dependency eslint to v9.30.1 (#6) - chore(deps): update dependency prettier to v3.6.2 (#2) - Create node.js.yml - refactor: update renovate configuration to include package rules for minor and patch updates - Merge pull request #1 from YoeriVD/renovate/configure - Add renovate.json
|
Congratulations on your new Raycast extension! 🚀 You can expect an initial review within five business days. Once the PR is approved and merged, the extension will be available on our Store. |
|
New and improved version of #20087 |
There was a problem hiding this comment.
Greptile Summary
This PR introduces a new music-assistant-controls extension that allows users to control Music Assistant (a multi-room audio server or Home Assistant add-on) directly from Raycast. The extension provides several key features:
Core Functionality:
- Player Controls: No-view commands for play/pause and next track navigation
- Menu Bar Integration: Displays currently playing track information with 10-second refresh intervals
- Dynamic Player Selection: Users can choose which Music Assistant player to control from a list of active players
- WebSocket Communication: Connects to Music Assistant via WebSocket on port 8095
Architecture & Integration:
The extension follows established Raycast patterns similar to other music control extensions like Spotify Player. It uses a clean client-server architecture with:
MusicAssistantClientclass that abstracts API interactions and UI state managementexecuteApiCommandwrapper function for proper WebSocket connection handling and cleanup- Local storage persistence for selected player preferences
- Comprehensive error handling with user-friendly toast notifications
External Code Integration:
The extension includes adapted TypeScript interfaces and API client code from the upstream Music Assistant frontend project (located in src/external-code/), ensuring compatibility with the existing Music Assistant ecosystem while maintaining type safety.
Testing & Quality:
The extension demonstrates strong engineering practices with comprehensive Jest test coverage, proper TypeScript configuration, and follows Raycast's formatting standards.
Important Files Changed
Click to expand file ratings table
| Filename | Score | Overview |
|---|---|---|
| extensions/music-assistant-controls/package.json | 4/5 | Main extension configuration with menu bar mode, no-view commands, and WebSocket dependencies |
| extensions/music-assistant-controls/src/music-assistant-client.ts | 5/5 | Comprehensive client class with excellent documentation and error handling |
| extensions/music-assistant-controls/src/external-code/music-assistant-api.ts | 5/5 | Large external API wrapper adapted from upstream Music Assistant project |
| extensions/music-assistant-controls/src/external-code/interfaces.ts | 5/5 | Extensive TypeScript type definitions for Music Assistant API structures |
| extensions/music-assistant-controls/src/api-command.ts | 4/5 | WebSocket connection wrapper with proper error handling and resource cleanup |
| extensions/music-assistant-controls/src/menu-bar.tsx | 4/5 | Menu bar component displaying current tracks and player controls |
| extensions/music-assistant-controls/src/set-active-player.tsx | 4/5 | Player selection interface with dynamic queue listing |
| extensions/music-assistant-controls/src/use-selected-player-id.ts | 4/5 | Local storage utilities for player selection with error handling |
| extensions/music-assistant-controls/src/next-song.tsx | 5/5 | Simple no-view command for skipping tracks |
| extensions/music-assistant-controls/src/preferences.ts | 5/5 | Clean TypeScript interface for extension preferences |
| extensions/music-assistant-controls/CHANGELOG.md | 3/5 | Changelog with correct format but confusing version structure for initial extension |
| extensions/music-assistant-controls/tests/ (all test files) | 5/5 | Comprehensive test suite with excellent coverage and mocking patterns |
| extensions/music-assistant-controls/.prettierrc | 5/5 | Standard Raycast formatting configuration |
| extensions/music-assistant-controls/tsconfig.json | 4/5 | TypeScript configuration using ES2023 target (newer than typical) |
| extensions/music-assistant-controls/.gitignore | 5/5 | Standard ignore file following Raycast conventions |
| extensions/music-assistant-controls/jest.config.js | 5/5 | Comprehensive Jest configuration with proper test setup |
| extensions/music-assistant-controls/renovate.json | 5/5 | Dependency management configuration with automerge for stable versions |
Confidence score: 4/5
- This PR is generally safe to merge with well-structured code and comprehensive testing
- Score reflects solid architecture and testing practices, with minor concerns about CHANGELOG structure and ECMAScript target version choice
- Pay attention to the CHANGELOG.md file which describes multiple versions for what appears to be an initial extension submission
23 files reviewed, 6 comments
pernielsentikaer
left a comment
There was a problem hiding this comment.
Could you add at least one screenshot of the extension and add them to a folder called metadata - you need to use our tool to get the right padding on the images
|
Is that the only thing preventing this PR from merging or do you have other feedback as well? |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Greptile feedback and metadata images should be the last 😊
|
Brilliant, that is good news! The Greptile feedback is straightforward, I'll process that as soon as I have a moment. In case of the screenshots, I am a bit confused. |
|
Could you add at least one metadata of the extension and add them to a folder called |
|
It has the wrong format 😊 |
|
@pernielsentikaer done! |
…new image location. Enhance error handling in use-selected-player-id.ts by adding failure toast notifications for command launch failures.
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
This extension lets you control Music Assistant (stand-alone server or Home-Assistant add-on) straight from Raycast and shows the current track in the macOS menu bar.
Why it’s useful
Dependencies
ws://HOST:8095/ws(for HA users: expose 8095 in the add-on’s settings)
No extra API tokens required.
Credits
Inspired by Matti S’s Spotify Player extension.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder