Commit Graph
1266 Commits
Author SHA1 Message Date
vicrodh fab1ff3003 fix(suggestions): wrap artist_id in Some for Option type 2026-01-27 17:13:03 -06:00
vicrodh 79c68d292e feat(suggestions): improve vector store and add cache management
- Add get_all_related_artists for direct relationship lookup
- Add get_related_artists helper method
- Add clear_all method to vector store for cache management
- Add clear_vector_store Tauri command
- Add Artist Vectors cache section to Settings view
- Use artist_info tuples (mbid, name) for better track searching
2026-01-27 16:54:11 -06:00
vicrodh 9a89074b5f feat(suggestions): add interactive navigation and track info modal
- Add artist_id field to SuggestedTrack for navigation
- Make artist names clickable to navigate to artist view
- Make album names clickable to navigate to album view
- Add TrackInfo button (info icon) to view track credits
- Integrate TrackInfoModal component with suggestions
- Update PlaylistDetailView to pass navigation callbacks
2026-01-27 16:53:56 -06:00
vicrodh 54315c2e4e fix(suggestions): fix deadlock in build_vector
The build_vector function was calling build_from_musicbrainz and
build_from_qobuz while holding the store lock. These functions also
try to acquire the store lock, causing a deadlock.

Fixed by saving the vectors from the first call and reusing them
for storage, instead of calling the functions again.
2026-01-27 14:42:10 -06:00
vicrodh 7e76fd6925 debug: add info-level logging to build_from_musicbrainz 2026-01-27 14:22:40 -06:00
vicrodh d90edc4feb debug(suggestions): add more logging to find deadlock 2026-01-27 13:40:17 -06:00
vicrodh 5f13617ae7 debug(suggestions): add logging to vector building
Added info-level logs to track:
- ensure_vector start/success/failure
- build_from_musicbrainz cache hit/API fetch
2026-01-27 13:35:18 -06:00
vicrodh 12d3c6b654 style: remove emojis from log messages 2026-01-27 13:26:57 -06:00
vicrodh b551df71c0 perf(suggestions): limit to top 5 artists and reduce rate limiting
Major optimizations:
- Extract only top 5 artists by track frequency instead of all artists
- Use faster rate limiter (200ms) when using MusicBrainz proxy
- Remove skip_vector_build since we now have manageable artist count

Expected load time: ~5-8 seconds for first load with 5 artists
vs previous: 50+ seconds with 50 artists
2026-01-27 13:20:16 -06:00
vicrodh 7506d69e53 fix(suggestions): hide section entirely when no suggestions available
Instead of showing 'No suggestions available' message, the entire
suggestions section is now hidden when there are no results.
Better UX - less frustrating for users.
2026-01-27 12:47:36 -06:00
vicrodh a49cdf483a perf(suggestions): skip MusicBrainz API calls when skip_vector_build=true
When skip_vector_build is enabled, also skip network calls for MBID
resolution of uncached artists. This prevents rate limiting (429) errors
that were causing 55+ second delays on initial load.

Tradeoff: First load with empty cache may have no results, but
subsequent loads will be instant using cached data.
2026-01-27 12:31:51 -06:00
vicrodh ff9e11db5c perf(suggestions): add skip_vector_build option for faster initial load
- Add skip_vector_build config option to SuggestionConfig
- When true, skips ensure_vector calls (which can be very slow)
- Uses only cached/existing vectors for similarity search
- Frontend now uses skip_vector_build=true for initial load

- Add timestamped logging helper in frontend component
2026-01-27 12:23:05 -06:00
vicrodh ba5ca133f4 fix(suggestions): simplify effect to prevent re-render issues
Replace cleanup-based effect with simpler lastLoadedPlaylistId tracking.
Avoids setting state in cleanup function which could cause render issues.
2026-01-27 12:18:03 -06:00
vicrodh 541c93f06d fix(suggestions): fix config deserialization and effect loop
- Add #[serde(default)] to SuggestionConfig to allow partial config
  from frontend (fixes "missing field max_artists" error)

- Fix effect loop in PlaylistSuggestions.svelte:
  - Add loadingInitiated flag to prevent re-triggering
  - Add cleanup effect when playlistId changes
  - Prevent concurrent loading attempts
2026-01-27 12:07:08 -06:00
vicrodh 1560cd4e3d debug(suggestions): add detailed timing logs for debugging
Frontend logging:
- Log when effect triggers with artist count
- Log when backend call starts/finishes with timing
- Log result details (tracks, artists counts)

Backend logging (playlist_suggestions.rs):
- Log MBID resolution with cache hits/misses/failures
- Log config values
- Log engine call timing

Engine logging (suggestions.rs):
- Step 1: ensure_vector timing per artist
- Step 2: playlist vector computation
- Step 3: find_nearest timing
- Step 4: track search timing per artist
- Early exit when pool size reached
2026-01-27 12:02:31 -06:00
vicrodh e9a5dfcb80 perf(suggestions): optimize loading with backend MBID resolution
- Move MBID resolution from frontend to backend
  - Eliminates multiple sequential IPC calls
  - Uses MusicBrainz cache for faster resolution
  - Logs resolution progress for debugging

- Implement progressive loading in UI
  - Initial load: 18 tracks (3 pages)
  - "Load more" expands to 60 tracks on demand
  - Better feedback during loading states

- Fix refresh button styling
  - Remove background while spinning
  - Update title based on available actions

- Add "Load more" link in pagination area
2026-01-27 11:58:54 -06:00
vicrodh f0aa539849 feat(ui): add playlist suggestions component and service
- Create PlaylistSuggestions.svelte component with:
  - Pool management (60 tracks, show 6 at a time)
  - Pagination/rotation on refresh
  - Loading, empty, and error states
  - Add (+) and dismiss (-) track actions
  - Album art display
  - Reason tooltip support (dev mode)

- Create playlistSuggestionsService.ts with:
  - MBID resolution from artist names (batched)
  - TypeScript types for SuggestedTrack, SuggestionResult
  - localStorage helpers for dismissed tracks
  - Qobuz album art URL generation

- Integrate into PlaylistDetailView:
  - Show suggestions at bottom of playlist track list
  - Extract unique artists from playlist for suggestions
  - Add track to playlist via add_tracks_to_playlist command
  - Hide when searching
2026-01-27 11:48:48 -06:00
vicrodh cadb346e32 feat(suggestions): add vector-based playlist suggestions engine
- Add suggestions.rs with SuggestionsEngine for generating suggestions
- Add SuggestionConfig with configurable parameters
- Add SuggestedTrack and SuggestionResult types
- Integrate with MusicBrainz relationships and Qobuz track search
- Add Tauri commands: get_playlist_suggestions_v2, get_vector_store_stats
- Add cleanup_vector_store command for maintenance
- Add Serialize to StoreStats for IPC
- Register ArtistVectorStoreState in app initialization
- 23 tests passing
2026-01-27 11:38:56 -06:00
vicrodh f3dcb6ebf2 feat(vectors): add vector builder with MB and Qobuz sources
- Add weights.rs with configurable RelationshipWeights
- Add builder.rs with ArtistVectorBuilder for constructing vectors
- Integrate MusicBrainz relationships (members, groups, collaborators)
- Integrate Qobuz similar artists API
- Add ensure_vector() with TTL for lazy building
- Add resolve_qobuz_to_mbid() for ID resolution via name search
- 21 tests passing (sparse_vector, store, weights, builder)
2026-01-27 11:30:06 -06:00
vicrodh 1d2e28c1a8 feat(vectors): add sparse vector foundation for playlist suggestions
Phase 1 of playlist-suggestions feature:
- SparseVector: memory-efficient vector with math operations
  - set/get with sorted indices for O(log n) access
  - add, sub, scale, dot product, magnitude
  - normalize, cosine_similarity, top_k_similar
- ArtistVectorStore: SQLite persistence
  - artist_index table: MBID to integer index mapping
  - vector_entries table: sparse representation (one row per non-zero)
  - vector_metadata table: track freshness with TTL
  - find_nearest: cosine similarity search with exclusion
- 17 unit tests all passing
2026-01-27 11:19:55 -06:00
vicrodh c1aaa87f8e Update README with v1.1.7 features: MusicBrainz, ListenBrainz, tag editor, musician pages 2026-01-27 05:45:11 -06:00
vicrodh 2121c910d1 Fix ARM64 workflow: only trigger on tags, not on push to main 2026-01-27 05:04:30 -06:00
vicrodh 4f3f57f424 Release v1.1.7 2026-01-27 04:58:49 -06:00
vicrodh b3117cc7c2 Bump version to 1.1.7 2026-01-27 04:58:28 -06:00
Victor RH 16c5f62cdc Merge branch 'updates/uiux-1.1.7' into pre-release 2026-01-27 04:55:05 -06:00
vicrodh c5c6ddc721 Fix ArtistNetwork sidebar height to fit content area
- Use top/bottom positioning instead of calculated height
- top: 32px (below title bar), bottom: 104px (above player)
- Add adjustment for when title bar is hidden (top: 0)
- Sidebar now always fits within visible content area
2026-01-27 04:54:18 -06:00
vicrodh 81ffc120ad Improve PlaylistModal layout and dropdown visibility
- Make "Adding n tracks" inline with "Choose playlist" label
- Add min-height 400px for addTrack mode modal
- Fix dropdown being clipped by modal: overflow visible + z-index 10001
- Dropdown can now extend outside modal boundaries
2026-01-27 04:49:20 -06:00
vicrodh c190fe79b0 Add searchable playlist dropdown and fix button text contrast
PlaylistModal changes:
- Replace native select with custom searchable dropdown
- Show max 8 playlists at a time with scroll indicator
- Add search/autocomplete functionality
- Support keyboard navigation (arrows, enter, escape)

Button contrast fix:
- Add --btn-primary-text CSS variable per theme
- Use dark text on light accent colors (Warm, Nord, Dracula, etc.)
- Use light text on dark accent colors (Adwaita, default)
2026-01-27 04:46:10 -06:00
vicrodh 561f7487d0 Add Flatpak welcome modal and sequential modal priority system
- Add FlatpakWelcomeModal component shown once for Flatpak users
- Add persistence for Flatpak welcome shown state (updates.db)
- Implement sequential modal priority: Flatpak > What's new > Update available
- Add Flatpak section to Settings navigation (only when running in Flatpak)
- Clean up duplicate Flatpak section and invalid style block in SettingsView
- Add copyable command styling for Flatpak section
2026-01-27 04:37:17 -06:00
vicrodh 4ff21312b2 Add TOC navigation to WhatsNewModal for large changelogs 2026-01-27 04:00:09 -06:00
vicrodh b664a5afd0 Change defaults: streaming ON, check for updates OFF 2026-01-27 03:59:32 -06:00
Victor RH 6df4f8ea2e Merge branch 'updates/uiux-1.1.7' into pre-release 2026-01-27 03:21:36 -06:00
vicrodh 9621814555 Fix WhatsNewModal: reduce section headings to 14px, add extra padding top/bottom 2026-01-27 03:19:18 -06:00
vicrodh 5f78b7deb2 Reduce WhatsNewModal font sizes: main items 14px to 12px, nested 13px to 11px 2026-01-27 03:14:04 -06:00
vicrodh e7887d9d73 Fix WhatsNewModal: use whats-new-content class with !important overrides, adjust modal size 2026-01-27 03:11:44 -06:00
vicrodh 411cdaedaf Fix WhatsNewModal styling: darker secondary items and proper bullet indentation 2026-01-27 03:06:57 -06:00
vicrodh 54740ee225 feat(updates): add update checks and what's new modal
cx
2026-01-27 02:59:46 -06:00
vicrodh f84c27b5ee feat(ui): implement global FloatingMenu system for menu exclusivity
- Add floatingMenuStore.ts with global menu state management
- Only one floating menu can be open at a time across the entire app
- Standardize inactivity timeout to 2 seconds for all menus

Updated components:
- TrackMenu: integrate with global store, reduce timeout from 5s to 2s
- AlbumMenu: integrate with global store, add inactivity timeout
- Sidebar: integrate dropdown, context menu, and folder popover
- PlaylistManagerView: integrate filter and sort dropdowns
- Dropdown.svelte: integrate generic dropdown component

The global store ensures that opening any menu (context menu,
dropdown, popover) automatically closes all other open menus.
2026-01-27 00:10:13 -06:00
vicrodh 19756092a4 fix(buttons): use text-primary for btn-primary foreground color 2026-01-26 23:43:20 -06:00
vicrodh 15c0258937 fix(modals): add missing btn base class and update acknowledgments
- Fix modal footer buttons missing 'btn' base class in:
  - PlaylistModal (New/Edit playlist, Add to playlist)
  - PlaylistImportModal (Import playlist)
  - FolderSettingsModal (Library folder settings)
  - Sidebar (New folder inline modal)
- Remove incorrect QobuzLegalNotice from PlaylistImportModal
- Add MusicBrainz and lyrics providers to AboutModal acknowledgments:
  - MusicBrainz (music metadata)
  - LRCLIB (synced lyrics)
  - lyrics.ovh (lyrics API)
2026-01-26 22:16:31 -06:00
Victor RH 53060ebd4d Merge branch 'pre-release' into updates/uiux-1.1.7 2026-01-26 22:01:42 -06:00
vicrodh e1ea1671d2 fix(playlist): correct playing indicator and homologate reorder UI
- Fix playing indicator to consider isPlaybackActive (not just activeTrackId)
- Track now shows as playing only when actually playing, not when paused
- Change reorder controls from vertical to horizontal layout
- Homologate UI with PlaylistManagerView (buttons beside drag handle)

cc
2026-01-26 21:53:05 -06:00
vicrodh f918fd2b01 feat(playlist): add batch selection and move for custom order
- Add checkbox selection for tracks in custom order mode
- Add batch controls bar with Select All, Clear, Move Up/Down
- Implement moveSelectedUp/Down to move multiple tracks as group
- Refactor PlaylistManagerView to use savePlaylistOrder helper
- Add CSS styles for batch controls and checkboxes

cc
2026-01-26 21:41:43 -06:00
vicrodh 5b80d639e0 feat(playlists): add arrow buttons for reordering in playlist manager
- Add ChevronUp/ChevronDown buttons alongside drag handle in custom mode
- Implement movePlaylistUp/movePlaylistDown functions
- Extract savePlaylistOrder helper for code reuse
- Support both grid and list view layouts
- Add CSS styles for reorder controls

cc
2026-01-26 21:36:00 -06:00
vicrodh 892d2e2b68 feat(playlist): add drag and drop for custom track reordering
- Add drag state tracking (draggedTrackIdx, dragOverIdx)
- Implement drag event handlers (start, over, leave, end, drop)
- Make track rows draggable in custom order mode
- Add visual feedback styles for dragging

cc
2026-01-26 21:33:40 -06:00
vicrodh 53b8605c3b feat(playlist): implement custom order UI with move controls
- Add custom order state management in PlaylistDetailView
- Load custom order when entering custom sort mode
- Initialize custom order from current tracks if not exists
- Add move up/down buttons for track reordering
- Update sorting logic to use customOrderMap
- Add CSS styles for reorder controls

cc
2026-01-26 21:28:24 -06:00
vicrodh 426584aa59 feat(backend): add custom track order persistence for playlists
- Create playlist_track_custom_order table for storing user-defined track positions
- Add database functions: get, init, set, move track, has, clear custom order
- Add Tauri commands for frontend access
- Migration-safe for existing databases

cc
2026-01-26 21:25:25 -06:00
vicrodh ee2fbedb6e feat(playlist): add Label, Added Recently, and Custom Order sort options
- Extend DisplayTrack interface with label, addedIndex, customPosition fields
- Add PlaylistTrack.album.label type for record label data
- Add three new sort options: Added Recently, Label, Custom Order
- Implement sorting logic for new options
- Label sorting places tracks without label (local) at the end
- Added Recently uses original index as proxy for date added

cc
2026-01-26 21:22:26 -06:00
Victor RH 49bb0cf349 Merge branch 'feature/local-library-tag-editor' into pre-release 2026-01-26 21:06:21 -06:00
vicrodh 0f2c47ff92 feat(AlbumCard): add showGenre prop to hide genre overlay
- Add showGenre prop (default true) to AlbumCard
- Make genre prop optional
- Hide genre and favorite button in LocalLibrary albums
- VirtualizedAlbumList passes showGenre={false}, showFavorite={false}
- Add spacer to keep Play button centered when favorite is hidden
2026-01-26 21:00:28 -06:00