Problem
Editing a record currently has significant limitations around changing the artist and genre (and label) fields.
Issues Found
1. Artist autocomplete only returns artists already in the collection
Api::ArtistsController scopes results to records: { user_id: COLLECTION_USER_ID } — so if you want to reassign a record to an artist not yet in your collection, the search returns nothing
- Same issue exists for labels (
Api::LabelsController)
2. No way to create new artists, labels, or genres inline
- If the correct artist/label/genre doesn't exist in the database at all, there's no create-on-the-fly option in the edit form
- The form partial even has a comment noting this as a future phase: "Phase 2: Will add searchable dropdowns with create-on-the-fly for artists/labels"
3. Admin editing UX is buried
- On the admin record show page, artist/genre/label/format editing is hidden inside a collapsed
<details> section ("Record associations") — easy to miss
Current State
The backend does permit these changes — record_params allows :artist_id, :label_id, :genre_id, :record_format_id — but the UI makes it impractical:
- Public edit form (
/records/:id/edit): Has all fields but artist/label autocomplete is limited to existing collection entries
- Admin show page (
/admin/records/:id): Has individual change buttons but hidden in collapsed section
Desired Behavior
Files Involved
app/controllers/api/artists_controller.rb — artist search scope
app/controllers/api/labels_controller.rb — label search scope
app/views/records/_form.html.erb — public edit form
app/views/admin/records/show.html.erb — admin edit UI
app/javascript/controllers/form_autocomplete_controller.js — autocomplete JS
Problem
Editing a record currently has significant limitations around changing the artist and genre (and label) fields.
Issues Found
1. Artist autocomplete only returns artists already in the collection
Api::ArtistsControllerscopes results torecords: { user_id: COLLECTION_USER_ID }— so if you want to reassign a record to an artist not yet in your collection, the search returns nothingApi::LabelsController)2. No way to create new artists, labels, or genres inline
3. Admin editing UX is buried
<details>section ("Record associations") — easy to missCurrent State
The backend does permit these changes —
record_paramsallows:artist_id, :label_id, :genre_id, :record_format_id— but the UI makes it impractical:/records/:id/edit): Has all fields but artist/label autocomplete is limited to existing collection entries/admin/records/:id): Has individual change buttons but hidden in collapsed sectionDesired Behavior
Files Involved
app/controllers/api/artists_controller.rb— artist search scopeapp/controllers/api/labels_controller.rb— label search scopeapp/views/records/_form.html.erb— public edit formapp/views/admin/records/show.html.erb— admin edit UIapp/javascript/controllers/form_autocomplete_controller.js— autocomplete JS