- Reduce modal width from 920px to 736px (80% of original)
- Center modal with 140px left offset (half sidebar width)
- Reduce color swatches from 40px to 30px
- Reduce color-grid gap from 8px to 4px
- Fix icon-preset button justify-content typo
- Swatches now properly fill single row
cp
- Changed modal columns from 50/50 to 65/35 split
- Reduced color picker grid gaps and increased density (8 columns)
- Adjusted color swatch border radius for consistency
cp
- Remove filter from backend selector dropdown
- Remove auto-switch logic from ALSA Direct to Auto
- Allow user to test if CPAL can actually open hw: devices
- If this works, we can skip alsa-rs implementation
- If it fails, we'll need to implement direct alsa-rs approach
- Add alsa 0.9 as Linux-only dependency
- Will replace CPAL-based ALSA backend with direct alsa-rs implementation
- Required to properly access hw:X,Y devices for bit-perfect playback
- Create FavoritesEditModal with preset icon grid
- Add custom image upload button
- Add tab reorder UI with up/down buttons
- Integrate edit button in Favorites page header (top-right)
- Add i18n keys for EN and ES
- Wire modal save handler to backend
cc
- Create favorites_preferences.rs with FavoritesPreferences struct
- Add database table (custom_icon_path, custom_icon_preset, tab_order)
- Implement State wrapper and Tauri commands
- Register state and commands in lib.rs
- Default preset: heart, default order: tracks/albums/artists/playlists
cc
- Replace native title with custom tooltip similar to DAC/EXC badges
- Add hover state and styled tooltip with context info
- Add debug logs to investigate onClick callback issue
cp
- Added $effect to reload preferences each time SettingsView is visible
- Fixes autoplay mode not persisting when navigating away and back
- Settings view doesn't unmount, so onMount only runs once per session
cp
- Implemented custom tooltip for StackIcon (similar to AudioOutputBadges)
- Shows 'Playing from', context name, and 'Click to navigate' hint
- Added onContextClick={handleContextNavigation} to ExpandedPlayer
- Fixed onClick prop not being passed, enabling navigation
cp
Added translations for:
- Autoplay behavior setting
- Continue within source / Play only selected track options
- Show context icon setting and tooltip
Both English and Spanish translations added.
Changed StackIcon tooltip to use native browser title (matches QualityBadge style).
Removed arrow indicator from context icon (cursor change is sufficient).
cp
Problem:
- Users updating from previous versions would crash on startup
- Table created with new column caused "no column named show_context_icon" error
- Existing users had old schema without the column
Solution:
- Step 1: Create table with old schema (backwards compatible)
- Step 2: Check if show_context_icon column exists using pragma_table_info
- Step 3: Add column ONLY if it doesn't exist (safe migration)
- Step 4: Insert default row
This ensures:
✅ New installs work (table created fresh)
✅ Existing users migrate seamlessly (column added, settings preserved)
✅ No data loss
✅ Idempotent (can run multiple times safely)
Tested scenarios:
- Fresh install (no DB) → creates table, adds column, inserts defaults
Result: id=1, autoplay_mode='continue', show_context_icon=1
- Existing DB without column → adds column, preserves user settings
Result: id=1, autoplay_mode='track_only' (preserved), show_context_icon=1
- Existing DB with column → no changes (idempotent)
Migration logs added for debugging.
cp
StackIcon Component:
- Now accepts onClick prop
- Changed from div to button element
- Added arrow (→) that appears on hover
- Tooltip text changed to "Click to go to: {source}"
- Visual feedback: hover background + active scale
Navigation Logic (+page.svelte):
- Added handleContextNavigation function
- Switch based on context_type:
- album → handleAlbumClick
- playlist → navigate + set selectedPlaylistId
- artist_top → handleArtistClick
- favorites → navigate to favorites
- home_list → navigate to home
- search → navigate to search
- Import getCurrentContext from playbackContextStore
UI Integration:
- ExpandedPlayer: Added onContextClick prop, passed to StackIcon
- FocusMode: Added onContextClick prop, passed to StackIcon
- Both receive handleContextNavigation callback
Phase 3.7 COMPLETE ✅
cp
Frontend:
- Add show_context_icon to PlaybackPreferences interface
- Add setShowContextIcon function to store
- StackIcon now subscribes to preferences and checks show_context_icon
- Icon hidden when setting is false (context still tracked)
UI (Settings → Playback):
- Add toggle: "Show track playing context in player"
- Tooltip with bilingual explanation (EN/ES)
- Default: enabled (true)
- Persists across restarts
Context tracking ALWAYS active regardless of icon visibility.
Phase 3.6 COMPLETE ✅
cp
Context creation:
- Creates 'home_list' context for Continue Listening section
- Uses 'continue_listening' as ID and 'Continue Listening' as label
- Tracks user's listening history in a context
- Stack icon will show "Playing from: Continue Listening"
Home view now fully integrated with context system.
cp
Context creation:
- Creates 'search' context when playing track from results
- Uses search query as ID and 'Search: {query}' as label
- Applies to both All tab (first 6) and Tracks tab (full list)
- Stack icon will show "Playing from: Search · {query}"
Search view now fully integrated with context system.
cp
Context creation:
- Creates 'favorites' context when playing track
- Uses 'favorites' as ID and 'Favorites' as label
- Uses filteredTracks for context (respects search/filter)
- Stack icon will show "Playing from: Favorites"
Favorites view now fully integrated with context system.
cp
Context creation:
- Creates 'artist_top' context when playing from Top Tracks
- Uses artist ID and name
- Passes track index from UI loop
- Stack icon will show "Playing from: Artist · {name}"
Artist view now fully integrated with context system.
cp
Context creation:
- Creates 'playlist' context when playing track
- Uses playlist ID and name
- Filters out local tracks (Qobuz tracks only in context)
- Finds track index in Qobuz tracks list
- Stack icon will show "Playing from: Playlist · {name}"
Playlist view now fully integrated with context system.
cp
Added createContextAndPlayDisplayTrack helper that:
- Creates playback context with provided type/id/label/tracks
- Calls handleDisplayTrackPlay to start playback
- Will be used by Playlist, Artist, Favorites, Home views
Next: Implement context creation in each view component internally
(following AlbumDetailView pattern but keeping logic in views)
cp
Stack icon now appears in artist/album area across all players:
- FocusMode: icon before artist (size 12px)
- MiniPlayer: icon at start of artist-album row (size 12px)
- Consistent sizing: 12px (compact players), 16px (expanded player)
- Visual hierarchy: Title → [icon] Artist · Album
All 4 players updated and consistent.
cp
Icon now appears before artist/album metadata instead of title.
Changes:
- NowPlayingBar: icon in song-meta row (size 12px)
- ExpandedPlayer: icon in new artist-album-row with separator (size 16px)
- Removed song-title-row wrapper (not needed)
- Icon placement: [icon] Artist · Album
Remaining: FocusMode and MiniPlayer (next commit)
cp
CRITICAL LOGIC FIX:
The autoplay setting was misunderstood. Corrected behavior:
BEFORE (wrong):
- Setting controls whether context is created
- 'continue' = create context
- 'track_only' = clear context
AFTER (correct):
- Context is ALWAYS created when playing from a source (album/playlist)
- Stack icon ALWAYS appears
- Setting only affects what happens at END of track:
- 'continue' = play next track in context
- 'track_only' = stop after current track
Why this makes sense:
- You're playing from an album = that's the context
- Stack icon shows the origin (informative)
- Setting controls continuation behavior (not context existence)
Also:
- Added logging to handleAutoplayModeChange
- Will investigate why setting doesn't persist
cp
UI Fix:
- Add :has(.radio-group) rule to allow flexible height
- Set align-items: flex-start for radio group rows
- Prevents radio buttons from being squashed
Logging Enhancement:
- Log autoplay_mode preference value
- Log track index and total tracks
- Log when no album tracks found
- Will help diagnose why context isn't being created
cp
CRITICAL FIX: Context was being cleared instead of created.
Root cause:
- AlbumDetailView had internal handlers but used parent's onTrackPlay
- Parent's handleAlbumTrackPlay had no context logic
- Result: context always cleared (default behavior)
Solution:
- Moved context creation logic to handleAlbumTrackPlay in +page.svelte
- Checks autoplay_mode preference
- Creates context if 'continue', clears if 'track_only'
- Removed duplicate logic from AlbumDetailView (was never executed)
Now when clicking a track:
1. handleAlbumTrackPlay checks preference
2. Creates/clears context accordingly
3. Stack icon should appear/disappear correctly
Test with default setting ('continue'):
- Click any track → should see context creation logs
- Stack icon should appear immediately
cp
- Replace onMount/onDestroy with $effect rune for better reactivity
- Add console logging to trace context changes
- Log when setPlaybackContext/clearPlaybackContext are called
- Log when StackIcon receives context updates
This will help debug why stack icon might not appear immediately.
To test:
1. Open browser console
2. Click a track in an album
3. Check logs for '[PlaybackContext]' and '[StackIcon]'
4. Verify context is being set and icon is receiving updates
cp
- Call initPlaybackContextStore() on app mount
- Call initPlaybackPreferences() on app mount
- Load backend state into frontend stores
- Phase 3 backend + UI complete
- Wiring for track actions pending (will be done per-page)
cp
- Add radio buttons: Continue within source / Play only selected track
- Load preference on settings mount
- Save changes immediately via handleAutoplayModeChange
- Styled with hover states and proper spacing
cp
- Add 'Play track only' option (clears context, single track)
- Add 'Play from here' option (sets context from current position)
- Update TrackMenu component with new actions
- Update TrackRow to pass new menu actions
- Backend integration ready for Phase 3 (settings + wiring)
cp
- Create StackIcon component with reactive context subscription
- Display Layers icon before track title when context exists
- Show tooltip with origin info on hover
- Add to: NowPlayingBar, ExpandedPlayer, FocusMode, MiniPlayer
- Icon hidden when no playback context (single track)
- Responsive sizing per player (14px-18px)
cp
- Add PlaybackContext module with ContextManager
- Context tracks semantic origin (album, playlist, artist top, etc.)
- Separate from queue - defines what 'next' means
- Backend: Rust struct with track IDs and position tracking
- Frontend: Svelte store with reactive subscriptions
- Tauri commands for context CRUD operations
- Context is nullable (single track playback has no context)
cp
ALSA Direct is currently non-functional due to CPAL limitations:
- CPAL cannot enumerate or open hw:X,Y devices required for bit-perfect playback
- Only named devices (front:, iec958:, sysdefault:) work, but they all use ALSA plugins with resampling
- User's DAC cannot achieve bit-perfect playback (stuck at 44.1kHz regardless of track sample rate)
Changes:
- Filter out ALSA Direct from backend selector dropdown
- Auto-switch users from ALSA Direct to Auto on settings load
- Add comments indicating this is temporary until alsa-rs rewrite
This prevents user frustration with a broken backend while we evaluate implementing
direct ALSA support via alsa-rs (bypassing CPAL entirely).
Critical Fix:
- CPAL only enumerates named ALSA devices (front:, sysdefault:, etc.)
- CPAL does NOT enumerate hw:X,Y or plughw:X,Y devices
- These must be created manually from aplay -l card list
Solution:
- Parse aplay -l to get card numbers and descriptions
- Manually create hw:X,0 and plughw:X,0 for each card
- Assume max_sample_rate: 384000 (devices are capable)
- Description: "Cambridge Audio USB Audio 2.0 (Direct Hardware - Bit-perfect)"
For user's system (based on aplay -l):
- hw:0,0 → CS201 (Direct Hardware - Bit-perfect)
- hw:2,0 → HDA NVidia (Direct Hardware - Bit-perfect)
- hw:3,0 → sof-hda-dsp (Direct Hardware - Bit-perfect)
- hw:4,0 → Cambridge Audio USB Audio 2.0 (Direct Hardware - Bit-perfect) ← USER NEEDS THIS
- Plus plughw: variants for each
These devices will now appear in the dropdown and can be selected for
true bit-perfect playback without resampling.
UX Problem:
- 4 devices all showed "Cambridge Audio USB Audio 2.0"
- Selecting one would select all (Map key collision)
- User couldn't distinguish between hw:4,0, front:CARD=C20, iec958:CARD=C20
Solution:
- Detect duplicate display names in deviceOptions
- Append [device_id] to duplicates for uniqueness
- Example: "Cambridge Audio USB Audio 2.0 (Direct Hardware - Bit-perfect) [hw:4,0]"
Now User Sees:
- Cambridge Audio USB Audio 2.0 (Direct Hardware - Bit-perfect) [hw:4,0] ← TRUE bit-perfect
- Cambridge Audio USB Audio 2.0 [front:CARD=C20,DEV=0] ← Front output with plugins
- Cambridge Audio USB Audio 2.0 [iec958:CARD=C20,DEV=0] ← S/PDIF with plugins
- Cambridge Audio USB Audio 2.0 [sysdefault:CARD=C20] ← System default with dmix
Each option is now unique and selectable. The hw:4,0 option is clearly
marked as "Direct Hardware - Bit-perfect" for audiophiles.