# Implementation Plan

## Phase 1: Queue Management Enhancement

- [x] 1. Fix queue track drag handle implementation
  - Separate drag handle from long-press area
  - Position drag handle (⋮⋮) on the right side of each track
  - Implement proper touch event separation for drag vs context menu
  - _Requirements: 1.1, 1.2, 1.3_

- [x] 2. Enhance context menu with "Move to Top" functionality
  - Add handleMoveToTop function to DropdownContextProvider
  - Create move_to_top menu item in menuItems object
  - Integrate with queue track context menu calls
  - _Requirements: 1.3, 1.4_

- [ ] 3. Improve drag and drop visual feedback
  - Add CSS classes for dragging and drop-zone states
  - Implement visual indicators during drag operations
  - Style drag handle with proper hover and active states
  - _Requirements: 1.5_

## Phase 2: Download System Improvements

- [ ] 4. Fix download progress display
  - Replace code jargon with user-friendly messages
  - Create clean progress indicator component
  - Add proper error handling and user feedback
  - _Requirements: 2.1, 2.2_

- [ ] 5. Implement download history system
  - Create download history storage mechanism
  - Add download history view to Downloads page
  - Track download completion and failure states
  - _Requirements: 2.3, 2.5_

- [ ] 6. Add visual indicators for downloaded tracks
  - Create download status indicator component
  - Integrate indicators across all track lists
  - Ensure indicators work in light and dark modes
  - _Requirements: 2.4_

## Phase 3: Visual Styling Fixes

- [ ] 7. Fix mini player positioning at bottom of screen
  - Fix mini player footer to touch the home button indicator area
  - Remove empty gap between mini player and bottom of screen
  - Compare with working version in backup folder for reference
  - Ensure proper safe-area-inset handling for iPhone home indicator
  - _Requirements: 3.1, 3.2_

- [ ] 8. Fix any remaining visual styling issues
  - Remove any unwanted white border boxes from UI elements
  - Ensure consistent theming across all components
  - Test visual consistency in light and dark modes
  - _Requirements: 3.2, 3.3_

## Phase 4: Critical Context Menu Fixes

- [x] 9. Fix broken hold-to-menu functionality across all pages
  - Debug why context menus are greyed out/not appearing on Tracks, Albums, Artists pages
  - Compare working Now Playing implementation with broken pages
  - Fix touch event handling and menu positioning issues
  - _Requirements: 4.1, 4.2, 4.3_

- [ ] 10. Fix iPad context menu visibility and accessibility
  - Ensure context menus appear and are properly sized on iPad
  - Fix menu positioning to stay within screen bounds
  - Test all menu options are reachable on tablet displays
  - _Requirements: 4.2, 4.4_

- [ ] 11. Add swipe gestures for quick actions
  - Implement swipe right to add to queue functionality
  - Implement swipe left to favorite/unfavorite functionality
  - Add visual indicators when songs are added via swipe
  - _Requirements: 4.3_

- [ ] 12. Enhance queue display capacity
  - Increase queue display from 10 to 50 tracks (already implemented)
  - Optimize scrolling performance for larger lists
  - Update "more tracks" indicator accordingly
  - _Requirements: 5.1, 5.2, 5.3, 5.4_

## Phase 5: Testing and Polish

- [ ] 12. Test drag and drop functionality
  - Verify drag handle works independently of context menu
  - Test reordering across different queue sizes
  - Ensure proper visual feedback during operations
  - _Requirements: 1.1, 1.2, 1.5_

- [ ] 13. Test download system improvements
  - Verify progress indicators show user-friendly messages
  - Test download history persistence and display
  - Confirm visual indicators appear on downloaded tracks
  - _Requirements: 2.1, 2.2, 2.3, 2.4_

- [ ] 14. Test critical context menu fixes
  - Verify hold-to-menu works on ALL pages (Tracks, Albums, Artists, etc.)
  - Test context menus appear properly on iPhone and iPad
  - Ensure all menu options are accessible and functional
  - Test swipe gestures for queue and favorite actions
  - _Requirements: 4.1, 4.2, 4.3, 4.4_

- [ ] 15. Final visual consistency check
  - Verify no unwanted borders or boxes appear
  - Test theme switching across all components
  - Ensure consistent styling on all devices
  - _Requirements: 3.1, 3.2, 3.3_