hoangsonww / hoangsonww/MetaWave-MP3-App
Feature: Advanced Library Search, Filters, and Saved Views
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Add a first-class discovery toolbar on the library page so users can quickly find tracks in large collections using search, composable filters, sort options, and reusable saved views.
## Problem
The current dashboard (`/dashboard`) renders a grid of tracks but has no search/filter/sort controls. As libraries grow, users have to manually scan cards, which slows down curation and batch operations.
## Proposed Solution
Implement a library query + UI layer with:
- Debounced search across `title`, `artist`, and `tags`
- Composable filters (visibility, tags, date range, has/without cover, duration range)
- Sort options (updated date, release date, title, duration, file size)
- Optional saved views (e.g., "Public tracks missing cover", "Recent demos")
- URL state sync for shareable/reload-safe filter state
## Scope
- **UI**: Add a filter/search toolbar in `web/pages/dashboard/index.tsx`
- **Query layer**: Extend `getTracksByUser` (or add a new query function) in `web/supabase/queries/tracks.ts`
- **Persistence**: Optional `saved_library_views` table keyed by user for saved presets
- **UX**: Keep existing selection, batch cover, and zip export workflows working with filtered subsets
## Acceptance Criteria
- Search returns expected matches by title/artist/tag within 300ms perceived latency on typical libraries
- Users can combine multiple filters at once (AND semantics)
- Sort order can be changed without losing active filters
- Filter/search state survives refresh and back/forward navigation (query params)
- Saved views can be created, applied, renamed, and deleted
- Existing batch actions only affect currently selected items and are not broken by filtering
## Out of Scope (v1)
- AI/semantic search
- Full-text indexing service outside Supabase/Postgres
- Real-time collaborative filtering sessions
## Implementation Notes
- Prefer server-side filtering in Supabase queries instead of filtering everything client-side
- Add unit tests for query-building and integration tests for the toolbar/filter state
- Include sensible defaults and empty-state messaging when no tracks match
Contributor guide
Assessment
This issue has not been assessed yet.