docs: web comments say what the app does, not how it came to be (#6277)

Rewrites the web app's comments to rule 32. Task, milestone, rule and
spec ids are gone; regression stories are restated as the trap they
guard (public auth routes, the menu's stopPropagation, universal loads
under adapter-static, metric deltas with their margin). Flutter and
Tauri mentions now name the Android app or a native shell, operator
quotes and dates are dropped, and one library's counts no longer
appear outside test fixtures. Verified with a TypeScript-scanner token
comparison (template literals and regex literals re-scanned): only
comment text changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 12:42:12 -04:00
co-authored by Claude Opus 5.5
parent 6028d78844
commit 10d50dccbd
164 changed files with 602 additions and 624 deletions
+6 -7
View File
@@ -5,13 +5,12 @@
// Tab bar for the Library section. Mirrors Android's LibraryScreen
// (artists / albums / liked / history / playlists) — Playlists lives
// here so the operator can find their personal collection in one
// place rather than tracking a separate top-level route.
// here so a listener finds their personal collection in one place rather
// than tracking a separate top-level route.
// Genres and Years sit next to Albums — all three are ways of walking the
// same collection — rather than at the end beside the personal tabs (Liked,
// History, Playlists). NOTE: these two are web-only for now; Android's
// LibraryScreen has no equivalent, so the "mirrors Android" claim above is
// currently aspirational for this pair. Parity is an open call (#367).
// History, Playlists). These two are web-only: Android's LibraryScreen has
// no equivalent.
const tabs = [
{ href: '/library/artists', label: 'Artists' },
{ href: '/library/albums', label: 'Albums' },
@@ -20,8 +19,8 @@
{ href: '/library/liked', label: 'Liked' },
{ href: '/library/history', label: 'History' },
{ href: '/library/playlists', label: 'Playlists' },
// Moved out of Settings (#5597): a report on your listening, and the
// tracks you've hidden, belong with the rest of your library.
// A report on your listening, and the tracks you've hidden, belong with
// the rest of your library rather than in Settings.
{ href: '/library/listening', label: 'Your listening' },
{ href: '/library/hidden', label: 'Hidden' }
];
+3 -4
View File
@@ -5,10 +5,9 @@ import { redirect } from '@sveltejs/kit';
// (Artists, matching Android's LibraryScreen default). 308 = permanent
// + preserve method, so SPA navigations and direct loads behave the same.
//
// Drift #559: this was a +page.server.ts which DOES NOT run in
// production — the app is configured as adapter-static + ssr=false
// (see +layout.ts). +page.ts (universal load) runs client-side, which
// is what the SPA actually executes when a route is hit.
// A universal load (+page.ts), not +page.server.ts: the app is
// adapter-static with ssr=false (see +layout.ts), so a server load never
// runs.
export const load = () => {
throw redirect(308, '/library/artists');
};
+1 -1
View File
@@ -52,7 +52,7 @@
{:else if !query.isPending && total === 0}
<!-- Library folders are server config (library.scan_paths), not a
setting, so only an admin can act: they run a scan from Admin.
Everyone else is told whose job it is (#5604). -->
Everyone else is told whose job it is. -->
{#if user.value?.is_admin}
<EmptyState
title="No albums yet"
+2 -2
View File
@@ -27,8 +27,8 @@ afterEach(() => {
setUser(null);
});
// Library folders are server config, not a setting (#5604): the empty
// library no longer sends anyone to Settings.
// An empty library sends an admin to Admin to run a scan, and nobody to
// Settings.
describe('/library/albums with an empty library', () => {
test('an admin is sent to Admin to run a scan', () => {
setUser({ id: 'u1', username: 'root', is_admin: true } as User);
+1 -1
View File
@@ -50,7 +50,7 @@
{:else if !query.isPending && total === 0}
<!-- Library folders are server config (library.scan_paths), not a
setting, so only an admin can act: they run a scan from Admin.
Everyone else is told whose job it is (#5604). -->
Everyone else is told whose job it is. -->
{#if user.value?.is_admin}
<EmptyState
title="No artists yet"
+2 -2
View File
@@ -34,8 +34,8 @@
// Count-first by default because that's what the server returns and it's the
// right default: the head of this list is genuinely where you're going. But a
// real library runs to several hundred genres with a long tail of one-offs
// (391 / ~3.7 per track on the operator's), and at that size "I know roughly
// real library runs to several hundred genres with a long tail of
// one-offs, and at that size "I know roughly
// what it's called" needs A-Z as much as filtering does.
//
// View state only, not a query parameter — same as `filter` above. Neither is
+3 -3
View File
@@ -104,8 +104,8 @@ describe('/library/genres index', () => {
expect(screen.getByRole('link', { name: /^rock 2$/ })).toBeInTheDocument();
});
// #2468: the operator's real library is 391 genres at ~3.7 per track, so the
// count-first default buries anything you can already name. A–Z is the ask.
// A real library runs to hundreds of genres, so the count-first default
// buries anything you can already name.
test('A–Z sort reorders the list without mutating the source array', async () => {
const data = [
{ genre: 'Rock', track_count: 8974 },
@@ -207,7 +207,7 @@ describe('/library/genres drill-down', () => {
render(GenresPage);
await screen.findByText('One');
// No button (#5416): reaching the bottom of the grid loads the next page.
// No button: reaching the bottom of the grid loads the next page.
expect(screen.queryByRole('button', { name: /load more/i })).not.toBeInTheDocument();
await waitFor(() => {
io.scrollToEnd();
+1 -1
View File
@@ -95,7 +95,7 @@
{/if}
{#if !allEmpty}
<!-- One list at a time (#5416): stacked, a long Artists list that loads as
<!-- One list at a time: stacked, a long Artists list that loads as
you scroll would bury Albums and Tracks until every artist had loaded. -->
<TabStrip
bind:value={() => tab, (v) => (chosenTab = v)}
+1 -1
View File
@@ -66,7 +66,7 @@ function setup(opts: {
}
describe('liked library page', () => {
// #5416: one list at a time. Stacked, a long Artists list that loads as you
// One list at a time. Stacked, a long Artists list that loads as you
// scroll would bury Albums and Tracks.
test('tabs carry each count and show one list at a time', async () => {
setup({ artists: page([ar], 1), albums: page([al], 1), tracks: page([tr], 1) });
+1 -1
View File
@@ -166,7 +166,7 @@ describe('/library/years drill-down', () => {
render(YearsPage);
await screen.findByText('One');
// No button (#5416): reaching the bottom of the grid loads the next page.
// No button: reaching the bottom of the grid loads the next page.
expect(screen.queryByRole('button', { name: /load more/i })).not.toBeInTheDocument();
await waitFor(() => {
io.scrollToEnd();