docs: api comments say what the endpoints do, not how they came to be (#6277)
Rewrites the internal/api comment blocks to rule 32: task, milestone and rule ids gone, the stories behind them restated as the constraint they left, stale references corrected (the stream secret is wired from config, the timezone handler already refreshes the scheduler, the Android app is the native client, the design docs cited are not in the repo). Also rewraps comment lines over 80 columns left by the earlier batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -83,10 +83,9 @@ func TestParseYearFilter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The crux of #367: a track tagged "Rock;Pop" must be reachable from BOTH
|
||||
// genres. An exact-string match — which is what ListAlbumsByGenre did before
|
||||
// this task — makes every multi-genre track invisible from either of its
|
||||
// genres, so the index would list a genre whose page is empty.
|
||||
// A track tagged "Rock;Pop" must be reachable from BOTH genres. An
|
||||
// exact-string match makes every multi-genre track invisible from either of
|
||||
// its genres, so the index would list a genre whose page is empty.
|
||||
func TestListGenres_SplitsMultiGenreTags(t *testing.T) {
|
||||
h, pool := testHandlers(t)
|
||||
artist := seedArtist(t, pool, "Genre Splitter")
|
||||
@@ -121,7 +120,7 @@ func TestListGenres_SplitsMultiGenreTags(t *testing.T) {
|
||||
|
||||
// Splitting produces leading spaces on every fragment after the first, and
|
||||
// showing " Pop" as a genre distinct from "Pop" would be a bug. Trimming is a
|
||||
// repair for our own splitting, not normalisation of the operator's tags.
|
||||
// repair for our own splitting, not normalisation of the library's tags.
|
||||
func TestListGenres_TrimsFragmentWhitespace(t *testing.T) {
|
||||
h, pool := testHandlers(t)
|
||||
artist := seedArtist(t, pool, "Spacey Tags")
|
||||
@@ -223,8 +222,8 @@ func TestListLibraryAlbums_GenreWithSlashSurvives(t *testing.T) {
|
||||
func TestListLibraryAlbums_YearRangeFilter(t *testing.T) {
|
||||
h, pool := testHandlers(t)
|
||||
artist := seedArtist(t, pool, "Chronology")
|
||||
// Each album needs a playable track: since #2702 the year axis lists only
|
||||
// albums with something to play, matching what the genre axis already did.
|
||||
// Each album needs a playable track: the year axis, like the genre axis,
|
||||
// lists only albums with something to play.
|
||||
for _, a := range []struct {
|
||||
title string
|
||||
year int
|
||||
@@ -341,10 +340,9 @@ func keysOf(m map[string]bool) []string {
|
||||
return out
|
||||
}
|
||||
|
||||
// #2702: an album whose every file has gone leaves the year axis, matching
|
||||
// what the genre axis already did. Before this the two disagreed — the same
|
||||
// album was absent from genre and still listed under its year, where opening
|
||||
// it found nothing playable.
|
||||
// An album whose every file has gone leaves the year axis, as it leaves the
|
||||
// genre axis: otherwise the same album would be absent from its genre and
|
||||
// still listed under its year, where opening it finds nothing playable.
|
||||
func TestListAlbumYears_ExcludesFullyMissingAlbums(t *testing.T) {
|
||||
h, pool := testHandlers(t)
|
||||
q := dbq.New(pool)
|
||||
@@ -387,8 +385,8 @@ func TestListAlbumYears_ExcludesFullyMissingAlbums(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The index, the list and the count must agree. #367 needed care for exactly
|
||||
// this reason at the genre level: if they diverge, a year leads to an empty
|
||||
// The index, the list and the count must agree, as at the genre level: if
|
||||
// they diverge, a year leads to an empty
|
||||
// page or "Load more" promises rows that never arrive.
|
||||
func TestListLibraryAlbums_YearFilterAndCountAgreeOnMissing(t *testing.T) {
|
||||
h, pool := testHandlers(t)
|
||||
|
||||
Reference in New Issue
Block a user