feat(M002): smart playlists — rule engine, editor UI, sidebar integration

Recovered from orphaned worktree commits (complete-milestone failed to merge).

Backend:
- Migration 9: is_smart + smart_rules columns on playlists table
- smartplaylist package: parameterized WHERE clause builder, field whitelist, genre subquery
- playlist.Service: Create/Update/Evaluate/Preview/GetRules smart playlist methods
- 65 tests (49 rule engine + 15 service + 1 migration)

Frontend:
- yj-combobox: reusable typeable dropdown with keyboard nav, ARIA, blur-race fix
- smart-playlist-editor: row-based rule builder with live preview
- smart-playlist-details: evaluate, refresh, play, shuffle, edit rules
- Sidebar: filter icon, Smart badge, create button, routing
- Queue snapshot on play/shuffle
This commit is contained in:
2026-03-21 12:53:00 -04:00
parent e974bd2a22
commit 477b7ff6a2
17 changed files with 5342 additions and 26 deletions
+15
View File
@@ -11,6 +11,8 @@ import '@components/artist-details/artist-details.ts';
import '@components/genres-view/genres-view.ts';
import '@components/genre-details/genre-details.ts';
import '@components/playlist-details/playlist-details.ts';
import '@components/smart-playlist-details/smart-playlist-details.ts';
import '@components/smart-playlist-editor/smart-playlist-editor.ts';
import '@components/search-bar/search-bar.ts';
import '@components/library-filter/library-filter.ts';
import '@components/track-details/track-details.ts';
@@ -139,6 +141,19 @@ document.addEventListener('navigate', (e: Event) => {
currentDetailEl = plEl;
break;
}
case 'smart-playlist-details': {
const { playlistId, playlistName } = detail;
const spEl = document.createElement('smart-playlist-details');
spEl.setAttribute('playlist-id', String(playlistId));
spEl.setAttribute('playlist-name', playlistName);
if (detail.autoEdit) {
spEl.setAttribute('auto-edit', '');
}
mainContent.appendChild(spEl);
currentDetailEl = spEl;
break;
}
case 'genre-details': {
const { genreName } = detail;
const genreEl = document.createElement('genre-details');