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
This commit is contained in:
vicrodh committed 2026-01-27 12:07:08 -06:00
1 parent 1560cd4e3d
commit 541c93f06d
2 files changed
+23 -3

No files matched your search

@@ -22,6 +22,7 @@ use super::store::ArtistVectorStore;
/// Configuration for suggestion generation
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct SuggestionConfig {
/// Maximum number of artists to consider for suggestions
pub max_artists: usize,