Merged
Conversation
- Added `QueueDisplayMode` enum to manage queue display modes (popup and side panel). - Integrated queue display mode into `PlayerService` with persistence in UserDefaults. - Implemented toggle functionality for switching between display modes. - Enhanced `QueueView` and `QueueSidePanelView` to support the new display modes. - Added `reorderQueue(from:to:)` method in `PlayerService` for drag-and-drop reordering of queue items. - Updated tests to cover new reordering functionality and queue display mode changes.
…anelView - Updated the logic for determining the destination row during drag-and-drop operations to use the row directly, as the move API handles index adjustments. - Removed unnecessary calculations for moving items up or down in the queue.
- Replaced GlassEffectContainer with a regular material background to improve drag-and-drop performance. - Increased the width of the QueueSidePanelView and its table column to accommodate layout changes. - Introduced a custom DraggableTableView to provide visual feedback during drag-and-drop operations. - Updated QueueTableCellView to refine layout and improve accessibility features.
…o queue - Added functionality to save and restore the current song queue using UserDefaults, allowing for persistence across application launches. - Implemented `AddToQueueContextMenu` for adding songs to the queue from various views, enhancing user experience. - Updated multiple views (ArtistDetailView, HomeView, LikedMusicView, PlaylistDetailView, SearchView, TopSongsView, FavoritesSection) to include the new context menu for queue management.
- Integrated new buttons in HomeView and PlaylistDetailView for playing albums and adding songs to the queue (Play, Play Next, Add to Queue). - Updated tracksView and trackRow methods to support fallback album and artist information for better handling of song metadata. - Improved queue clearing functionality in QueueSidePanelView to ensure playback stops before clearing the queue. - Enhanced SongActionsHelper to include fallback options for artists and albums when adding songs to the queue.
- Implemented new buttons for playing albums, adding albums to the queue next, and adding albums to the end of the queue. - Enhanced user interaction with album management through the SongActionsHelper for improved playback control.
…ement - Added in-memory undo/redo history for the song queue, allowing users to revert and reapply changes to the queue state. - Introduced methods for recording queue states before modifications, enabling better management of queue actions. - Enhanced queue management methods to support undo/redo operations, improving user experience during playback adjustments. - Updated context menu in QueueSidePanelView to include a "Start Radio" option for enhanced song playback options.
- Reset row view properties after removal animation to prevent misalignment issues. - Simplified swipe removal logic by removing unnecessary logging and checks. - Enhanced layout consistency in QueueTableCellView by ensuring row views fill their frames and adjusting content hugging/compression priorities.
- Implemented real-time row sliding feedback during two-finger horizontal swipes for improved user interaction. - Introduced thresholds for swipe commit and removal to refine the swipe-to-remove experience. - Added logic to animate row return on cancellation and handle removal with visual feedback. - Updated swipe handling to ensure smoother transitions and prevent misalignment after removal.
- Added a background service to periodically enrich song metadata in the queue, ensuring complete information is displayed without additional API calls. - Enhanced queue management by updating songs with missing metadata and persisting changes. - Increased the undo/redo history capacity from 3 to 10 states for improved user experience in queue management.
…hensive tests for PlayerService queue operations - Changed the visibility of the identifySongsNeedingEnrichment method from private to public to allow external access for metadata enrichment. - Introduced a new test suite for PlayerService queue operations, covering reordering, undo/redo functionality, and queue persistence. - Enhanced MockYTMusicClient to track song retrieval calls, improving test reliability and coverage.
|
Was just going to submit a similar PR for "Play next" context menu option, but found this |
- Split SearchView contextMenuItems into per-type helper methods (function_body_length) - Extract scrollWheel phases into helper methods (cyclomatic_complexity, function_body_length) - Move QueueTableCellView and WaveformView to separate file (file_length) - Remove unused favoritesManager param, reduce param count (function_parameter_count) - Extract PlaylistDetailView header buttons into helper (function_body_length) - Use Data(_:) initializer in tests (non_optional_string_data_conversion) - Apply swiftformat auto-formatting
sozercan
added a commit
that referenced
this pull request
Feb 23, 2026
NotificationService was stored as @State in KasetApp but never referenced in the view body. After the WindowGroup → Window change in v0.7.0 (#97), SwiftUI stopped retaining the unused @State, causing the observation task to be cancelled on dealloc. Fix: reference notificationService in the body so SwiftUI tracks it. Add NotificationServiceTests with 8 tests for observation lifecycle, track change detection, and deduplication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Queue Enhancement Features
Description
This PR introduces a comprehensive queue enhancement system for Kaset, transforming the basic queue popup into a full-featured playlist management interface with drag-and-drop, undo/redo, persistence, and intelligent metadata enrichment.
Type of Change
Changes Made
Core Queue Features
QueueDisplayModeenum with popup/sidepanel modesQueueSidePanelViewwith header, scrollable queue, and footer actionsDraggableTableViewfor drag-and-drop reorderingQueue Metadata Enrichment
fetchSongMetadata()hookUI Enhancements
Technical Improvements
PlayerService+Queue.swiftwith queue management methodsenrichQueueMetadata()for background metadata updatesPlayerService+Library.swiftto update queue during playbackSongActionsHelperwith queue management utilitiesTesting
xcodebuild test -only-testing:KasetTests)Checklist
swiftlint --strict && swiftformat .Additional Notes
Summary of Features Implemented
1. Queue Display Mode Toggle
QueueDisplayModeenum (popup vs edit/side panel)2. Queue Side Panel View (
QueueSidePanelView.swift)MainWindowoverlay system3. Drag & Drop Reordering
DraggableTableViewimplementationreorderQueue(from:to:)4. Swipe to Remove
5. Queue Undo/Redo System
6. Queue Metadata Enrichment
7. Enhanced Context Menus (
SongActionsHelper.swift)8. Queue Persistence
9. Album Playback Controls
10. Additional Improvements
PlayerService+Queue.swiftwith queue managementStatistics
cacus-new-featuresKey Files Added/Modified
Core/Models/QueueDisplayMode.swift(NEW)Core/Services/Player/PlayerService+Queue.swift(+200 lines)Core/Services/Player/PlayerService.swift(+15 lines)Core/Services/Player/PlayerService+Library.swift(+20 lines)Views/macOS/QueueSidePanelView.swift(NEW)Views/macOS/SharedViews/SongActionsHelper.swift(+500 lines)Views/macOS/QueueView.swift(+13 lines)Views/macOS/HomeView.swift(+39 lines)Views/macOS/SearchView.swift(+39 lines)Views/macOS/PlaylistDetailView.swift(+137 lines)docs/new_features_queue_enhancement.md(NEW)