Merge feature/ux-improvements-180226: UX improvements and playback context

Major UX improvements:
- Playback context tracking from albums/playlists/artists/favorites/home/search
- Stack icon showing context origin with clickable navigation
- Autoplay behavior setting with persistence
- Context menu actions (Play track only, Play from here)
- Track row pause on hover across all views
- Volume indicators while dragging (all 4 players)
- Favorites customization (custom icon, background, sticky nav, search)
- Theme expansion (Nord, Dracula, Tokyo Night, Catppuccin, Rosé Pine, Breeze, Adwaita)
- Layout fix: NowPlayingBar moved outside app-body flex row

Database migrations (safe for existing users 1.1.5+):
- playback_preferences table (autoplay + show_context_icon)
- favorites_preferences table (custom_icon_path, preset, icon_background, tab_order)
- Favorites icon now stored in cache dir with auto-migration

Audio backend: ✅ UNTOUCHED (bit-perfect playback preserved)

Known gaps (to fix in next branch):
- Track focus on context navigation not implemented
- Volume indicator in FocusMode/MiniPlayer not confirmed tested

# Conflicts:
#	src/lib/components/AlbumCard.svelte
This commit is contained in:
vicrodh committed 2026-01-19 15:04:12 -06:00
commit e2afc25175
36 files changed
+4116 -436

No files matched your search

@@ -1,9 +1,10 @@
<script lang="ts">
import { onMount } from 'svelte';
import { onMount, tick } from 'svelte';
import { ArrowLeft, Play, Shuffle, Heart } from 'lucide-svelte';
import TrackRow from '../TrackRow.svelte';
import AlbumMenu from '../AlbumMenu.svelte';
import { getDownloadState, type DownloadStatus, isAlbumFullyDownloaded } from '$lib/stores/downloadState';
import { consumeContextTrackFocus } from '$lib/stores/playbackContextStore';
import {
subscribe as subscribeAlbumFavorites,
isAlbumFavorite,
@@ -101,6 +102,7 @@
let isFavorite = $state(false);
let isFavoriteLoading = $state(false);
let playBtnHovered = $state(false);
let scrollContainer: HTMLDivElement | null = $state(null);
const albumFullyDownloaded = $derived(
isAlbumFullyDownloaded(album.tracks.map(t => t.id))
@@ -110,6 +112,12 @@
album.artist?.trim().toLowerCase() === 'various artists'
);
async function scrollToTrack(trackId: number) {
await tick();
const target = scrollContainer?.querySelector<HTMLElement>(`[data-track-id="${trackId}"]`);
target?.scrollIntoView({ block: 'center' });
}
// Check if album is in favorites on mount
onMount(() => {
let unsubscribe: (() => void) | null = null;
@@ -130,6 +138,14 @@
};
});
$effect(() => {
if (!album.tracks?.length) return;
const targetId = consumeContextTrackFocus('album', album.id);
if (targetId !== null) {
void scrollToTrack(targetId);
}
});
async function toggleFavorite() {
if (isFavoriteLoading) return;
@@ -144,7 +160,7 @@
}
</script>
<div class="album-detail">
<div class="album-detail" bind:this={scrollContainer}>
<!-- Back Navigation -->
<button class="back-btn" onclick={onBack}>
<ArrowLeft size={16} />
@@ -224,7 +240,7 @@
<!-- Track Rows -->
<div class="tracks">
{#each album.tracks as track (`${track.id}-${downloadStateVersion}`)}
{#each album.tracks as track, trackIndex (`${track.id}-${downloadStateVersion}`)}
{@const downloadInfo = getTrackDownloadStatus?.(track.id) ?? { status: 'none' as const, progress: 0 }}
<TrackRow
trackId={track.id}