Jump the Review list to an artist by letter

An A–Z/# bar above the Songs and Albums lists jumps to the first artist
starting with that letter. Songs come from a new /letters endpoint giving
each leading character's offset; the song list now sorts case-insensitively
like the album list so each letter stays together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-10-01 14:28:27 -07:00
1 parent 095e294f4b
commit 00147aaa9e
5 files changed
+160 -16

No files matched your search

+12
View File
@@ -93,6 +93,7 @@ func (s *Server) Handler() http.Handler {
r.Get("/job", s.handleJob)
r.Post("/job/cancel", s.handleCancelJob)
r.Get("/matches", s.handleMatches)
r.Get("/letters", s.handleLetters)
r.Get("/export.csv", s.handleExport)
r.Get("/groups", s.handleGroups)
r.Post("/bulk/preview", s.handleBulkPreview)
@@ -474,6 +475,17 @@ func (s *Server) handleMatches(w http.ResponseWriter, r *http.Request) {
writeJSON(w, 200, map[string]any{"items": ms, "total": total})
}
func (s *Server) handleLetters(w http.ResponseWriter, r *http.Request) {
id, _ := idParam(r)
q := r.URL.Query()
ls, err := s.st.MatchLetters(r.Context(), id, store.MatchFilter{Status: q.Get("status"), Query: q.Get("q")})
if err != nil {
writeErr(w, 500, err)
return
}
writeJSON(w, 200, ls)
}
func (s *Server) handleLinkIdentical(w http.ResponseWriter, r *http.Request) {
id, _ := idParam(r)
if !s.preAction(w, r, id, "link identical") {