Add navigation, browse views, overlays, and update roadmap
This commit is contained in:
parent
ad543d67b7
commit
ab7bc36714
4 changed files with 1862 additions and 35 deletions
46
AGENTS.md
46
AGENTS.md
|
@ -213,62 +213,62 @@ Shared Tasks
|
|||
- [ ] Add loading/empty-state helpers for lists.
|
||||
|
||||
Primary Navigation (Hub)
|
||||
- [ ] `tpl-nav` (base): Landing hub to choose "Search", "Browse Artists", "Browse Albums", "Browse Years", "Browse Genres", "Stats".
|
||||
- [ ] `createNavView(db)`: Buttons/cards trigger `UX.replace(...)` to corresponding base views.
|
||||
- [ ] Accessibility: initial focus on first action; arrow-key navigation across items; visible focus states.
|
||||
- [x] `tpl-nav` (base): Landing hub to choose "Search", "Browse Artists", "Browse Albums", "Browse Years", "Browse Genres", "Stats".
|
||||
- [x] `createNavView(db)`: Buttons/cards trigger `UX.replace(...)` to corresponding base views.
|
||||
- [x] Accessibility: initial focus on first action; arrow-key navigation across items; visible focus states.
|
||||
|
||||
Search (Existing)
|
||||
- [x] `tpl-search` (base): Input is focusable; shows results area.
|
||||
- [x] Implement query execution with FTS join; debounce 250 ms; paginate results. Wired into the new table + pagination helpers.
|
||||
- SQL: `SELECT t.id, a.name AS artist, t.title, IFNULL(al.title,'') AS album, t.year, t.genre FROM fts_tracks f JOIN tracks t ON t.id=f.rowid JOIN artists a ON a.id=t.artist_id LEFT JOIN albums al ON al.id=t.album_id WHERE f MATCH ? ORDER BY rank LIMIT ? OFFSET ?`.
|
||||
- [ ] Column sorts (toggle rank vs artist,title,year).
|
||||
- [ ] Row activation opens Track overlay.
|
||||
- [x] Column sorts (toggle rank vs artist,title,year).
|
||||
- [x] Row activation opens Track overlay.
|
||||
|
||||
Browse Artists
|
||||
- [ ] `tpl-browse-artists` (base): Alphabetical list, A–Z quick jump, mini filter box; paginated.
|
||||
- [ ] `createBrowseArtistsView(db)`: Loads pages; clicking row opens Artist overlay.
|
||||
- [x] `tpl-browse-artists` (base): Alphabetical list, A–Z quick jump, mini filter box; paginated.
|
||||
- [x] `createBrowseArtistsView(db)`: Loads pages; clicking row opens Artist overlay.
|
||||
- SQL: `SELECT id, name FROM artists ORDER BY name LIMIT ? OFFSET ?`.
|
||||
- [ ] Optional prefix search using FTS prefix (`WHERE f MATCH 'artist:abc*'`) to accelerate filter.
|
||||
|
||||
Browse Albums
|
||||
- [ ] `tpl-browse-albums` (base): List or grid with title, artist badge, year; paginated and sortable by artist/year/title.
|
||||
- [ ] `createBrowseAlbumsView(db)`: Clicking item opens Album overlay.
|
||||
- [x] `tpl-browse-albums` (base): List or grid with title, artist badge, year; paginated and sortable by artist/year/title.
|
||||
- [x] `createBrowseAlbumsView(db)`: Clicking item opens Album overlay.
|
||||
- SQL: `SELECT al.id, al.title, al.year, a.name AS artist FROM albums al JOIN artists a ON a.id=al.artist_id ORDER BY a.name, al.year, al.title LIMIT ? OFFSET ?`.
|
||||
|
||||
Browse Years
|
||||
- [ ] `tpl-browse-years` (base): Year histogram (counts) with list of tracks/albums when a year is selected; paginated.
|
||||
- [ ] `createBrowseYearsView(db)`: Selecting a year shows tracks; rows open Album/Track overlays.
|
||||
- [x] `tpl-browse-years` (base): Year histogram (counts) with list of tracks/albums when a year is selected; paginated.
|
||||
- [x] `createBrowseYearsView(db)`: Selecting a year shows tracks; rows open Album/Track overlays.
|
||||
- SQL (counts): `SELECT year, COUNT(*) AS cnt FROM tracks WHERE year IS NOT NULL GROUP BY year ORDER BY year`.
|
||||
- SQL (tracks by year): `SELECT t.id, t.title, a.name AS artist, IFNULL(al.title,'') AS album, t.genre FROM tracks t JOIN artists a ON a.id=t.artist_id LEFT JOIN albums al ON al.id=t.album_id WHERE t.year=? ORDER BY a.name, t.title LIMIT ? OFFSET ?`.
|
||||
|
||||
Browse Genres
|
||||
- [ ] `tpl-browse-genres` (base): Genre chips with counts → selecting shows paginated tracks.
|
||||
- [ ] `createBrowseGenresView(db)`: Genre list with counts; selecting lists tracks; rows open Track overlay.
|
||||
- [x] `tpl-browse-genres` (base): Genre chips with counts → selecting shows paginated tracks.
|
||||
- [x] `createBrowseGenresView(db)`: Genre list with counts; selecting lists tracks; rows open Track overlay.
|
||||
- SQL (counts): `SELECT genre, COUNT(*) AS cnt FROM tracks WHERE genre IS NOT NULL AND genre!='' GROUP BY genre ORDER BY cnt DESC, genre`.
|
||||
- SQL (tracks by genre): `SELECT t.id, t.title, a.name AS artist, IFNULL(al.title,'') AS album, t.year FROM tracks t JOIN artists a ON a.id=t.artist_id LEFT JOIN albums al ON al.id=t.album_id WHERE t.genre=? ORDER BY a.name, t.title LIMIT ? OFFSET ?`.
|
||||
|
||||
Stats
|
||||
- [ ] `tpl-stats` (base): Lightweight metrics (totals, top artists, year distribution) linking into browse views.
|
||||
- [ ] `createStatsView(db)`: Render summary cards; links navigate via `UX.replace(...)` with preselected filters.
|
||||
- [x] `tpl-stats` (base): Lightweight metrics (totals, top artists, year distribution) linking into browse views.
|
||||
- [x] `createStatsView(db)`: Render summary cards; links navigate via `UX.replace(...)` with preselected filters.
|
||||
- SQL (examples): totals from `COUNT(*)` on artists/albums/tracks; top artists via `SELECT a.name, COUNT(*) cnt FROM tracks t JOIN artists a ON a.id=t.artist_id GROUP BY a.id ORDER BY cnt DESC LIMIT 20`.
|
||||
|
||||
Artist Overlay
|
||||
- [ ] `tpl-artist` (overlay): Header: name + counts; tabs: Albums | Top Tracks.
|
||||
- [ ] `createArtistOverlay(db, artistId)`: Load artist name, counts, then tab content.
|
||||
- [x] `tpl-artist` (overlay): Header: name + counts; tabs: Albums | Top Tracks.
|
||||
- [x] `createArtistOverlay(db, artistId)`: Load artist name, counts, then tab content.
|
||||
- SQL (albums): `SELECT id, title, year FROM albums WHERE artist_id=? ORDER BY year, title`.
|
||||
- SQL (top tracks): `SELECT id, title, year, genre FROM tracks WHERE artist_id=? ORDER BY year, title LIMIT 100`.
|
||||
- [ ] Actions: clicking album opens Album overlay; clicking track opens Track overlay.
|
||||
- [x] Actions: clicking album opens Album overlay; clicking track opens Track overlay.
|
||||
|
||||
Album Overlay
|
||||
- [ ] `tpl-album` (overlay): Header with album title, artist, year; tracklist table with `track_no`, `title`, `duration_sec`, `bitrate_kbps`.
|
||||
- [ ] `createAlbumOverlay(db, albumId)`: Load album+artist header; then tracklist.
|
||||
- [x] `tpl-album` (overlay): Header with album title, artist, year; tracklist table with `track_no`, `title`, `duration_sec`, `bitrate_kbps`.
|
||||
- [x] `createAlbumOverlay(db, albumId)`: Load album+artist header; then tracklist.
|
||||
- SQL (header): `SELECT al.title, al.year, a.name AS artist FROM albums al JOIN artists a ON a.id=al.artist_id WHERE al.id=?`.
|
||||
- SQL (tracks): `SELECT id, track_no, title, duration_sec, bitrate_kbps FROM tracks WHERE album_id=? ORDER BY track_no, title`.
|
||||
- [ ] Row activation opens Track overlay.
|
||||
- [x] Row activation opens Track overlay.
|
||||
|
||||
Track Overlay
|
||||
- [ ] `tpl-track` (overlay): Show title, artist, album, year, genre, duration, bitrate, samplerate, channels, filesize, sha1 (if present), and `relpath` with a Copy button.
|
||||
- [ ] `createTrackOverlay(db, trackId)`: Load detail from join; add Copy action for `relpath`.
|
||||
- [x] `tpl-track` (overlay): Show title, artist, album, year, genre, duration, bitrate, samplerate, channels, filesize, sha1 (if present), and `relpath` with a Copy button.
|
||||
- [x] `createTrackOverlay(db, trackId)`: Load detail from join; add Copy action for `relpath`.
|
||||
- SQL: `SELECT t.*, a.name AS artist, al.title AS album FROM tracks t JOIN artists a ON a.id=t.artist_id LEFT JOIN albums al ON al.id=t.album_id WHERE t.id=?`.
|
||||
|
||||
Filters (Optional)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue