Skip to content

Add Previous Song command#9

Merged
YoeriVD merged 4 commits intodevfrom
copilot/add-previous-song-command
Feb 24, 2026
Merged

Add Previous Song command#9
YoeriVD merged 4 commits intodevfrom
copilot/add-previous-song-command

Conversation

Copy link

Copilot AI commented Feb 24, 2026

Description

Adds previous-song command for backward queue navigation. Mirrors existing next-song implementation using playerCommandPrevious() API method.

Changes:

  • Added MusicAssistantClient.previous() method wrapping API call
  • Created src/previous-song.tsx command with error handling and visual feedback
  • Added comprehensive test coverage (command + client unit tests)
  • Registered command in package.json as no-view mode
  • Updated CHANGELOG.md by merging into existing "Menu Bar Performance & Stability" pending entry

Screencast

Checklist

Original prompt

This section details on the original issue you should resolve

<issue_title>Previous Song Command</issue_title>
<issue_description>## Description
Add a "Previous Song" command to the Music Assistant Raycast extension. This command mirrors the existing "Next Song" functionality but navigates backward through the queue.

Priority

P1 - Tier 1

Story Points

3

Effort Estimate

1-2 hours

Acceptance Criteria

  • Command mirrors existing "Next Song" command structure
  • Displays current track title on execution (optional, for visual feedback)
  • Uses playerCommandPrevious() API wrapper method
  • Integrates with existing player selection logic
  • Works with all player types and queue states
  • Includes error handling for API failures
  • Command added to extension manifest (package.json)
  • No-view command (executes without displaying UI)

Implementation Notes

  • Base Implementation: Mirror src/next-song.tsx structure
  • API Method: playerCommandPrevious() from src/music-assistant-client.ts
  • Files to Modify:
    • Create src/previous-song.tsx (new file)
    • Update package.json to add command entry for previous-song

Acceptance Criteria Detail

The command should:

  1. Execute the previous track command on the active player in the active queue
  2. Handle cases where there is no previous track (error handling)
  3. Support all player types (physical players, virtual players, multi-room groups)
  4. Provide visual feedback to the user on execution status

Testing

  • Test with different player types (physical, virtual, grouped)
  • Test with various queue states (first track, middle queue, last track)
  • Test error scenarios (no active queue, API failure)
  • Test integration with player selection logic

Labels

feature, playback-control, tier-1</issue_description>

<agent_instructions>Only work on the extension music assistant controls. Read agents.md in that folder for full context. </agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 24, 2026 18:34
Co-authored-by: YoeriVD <2865793+YoeriVD@users.noreply.github.com>
Co-authored-by: YoeriVD <2865793+YoeriVD@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Previous Song command to Music Assistant extension Add Previous Song command Feb 24, 2026
@YoeriVD YoeriVD marked this pull request as ready for review February 24, 2026 19:36
@YoeriVD YoeriVD self-requested a review as a code owner February 24, 2026 19:36
@@ -1,5 +1,11 @@
# Music Assistant Controls Changelog

## [Previous Song Command] - {PR_MERGE_DATE}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot update the existing pending changelog entry, do not create a new one

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 313c89f - merged the Previous Song feature into the existing "Menu Bar Performance & Stability" changelog entry under a new "✨ New Features" section.

Co-authored-by: YoeriVD <2865793+YoeriVD@users.noreply.github.com>
@YoeriVD YoeriVD merged commit d2b72e0 into dev Feb 24, 2026
@YoeriVD YoeriVD deleted the copilot/add-previous-song-command branch February 24, 2026 21:37
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.

Previous Song Command

2 participants