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:
@@ -7,7 +7,7 @@
|
||||
|
||||
let { children } = $props<{ children: import('svelte').Snippet }>();
|
||||
|
||||
// The Collection (M502, #5572): what the library holds and wants, and what
|
||||
// The Collection: what the library holds and wants, and what
|
||||
// Minstrel is fetching for it. Web-only and admin-only. The catalogue of
|
||||
// artists is the main section, and the sections down the left show state. The
|
||||
// catalogue's first page carries every section's count; the Catalogue
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
const parts = [plural(counts.wanted, 'album wanted', 'albums wanted')];
|
||||
if (counts.activity) parts.push(`${counts.activity} downloading`);
|
||||
// Library albums no MusicBrainz album matched wait on a person too (#5579).
|
||||
// Library albums no MusicBrainz album matched wait on a person too.
|
||||
if (counts.unmatched) {
|
||||
const n = plural(counts.unmatched, 'album in your library needs', 'albums in your library need');
|
||||
return parts.join(', ') + `. ${n} matching.`;
|
||||
@@ -32,7 +32,7 @@
|
||||
});
|
||||
const needsYou = $derived(!!counts?.attention || !!counts?.unmatched);
|
||||
|
||||
// The library's health queues (M504) count from the admin summary, the
|
||||
// The library's health queues count from the admin summary, the
|
||||
// same read Admin's Overview makes. The line under the verdict names the
|
||||
// ones with something in them; each links to its page.
|
||||
const summaryStore = createAdminSummaryQuery();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { redirect } from '@sveltejs/kit';
|
||||
import { user } from '#lib/auth/store.svelte.js';
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
// Hard route gate: the Wanted view is an admin's (M502). Runs before the
|
||||
// Hard route gate: the Wanted view is an admin's. Runs before the
|
||||
// layout renders; auth is bootstrapped by the root +layout.ts, so user.value is
|
||||
// either a settled User object or null.
|
||||
export const load: LayoutLoad = () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { pageTitle } from '#lib/branding.js';
|
||||
import WantList from '#lib/components/wanted/WantList.svelte';
|
||||
|
||||
// One artist in the Collection's catalogue (#5572): every album of theirs
|
||||
// One artist in the Collection's catalogue: every album of theirs
|
||||
// on the list, held or not, with its tracks a click away.
|
||||
const mbid = $derived(page.params.mbid ?? '');
|
||||
</script>
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('/collection layout', () => {
|
||||
expect(screen.getByRole('link', { name: /see unmatched/i }).getAttribute('href')).toBe('/collection/unmatched');
|
||||
});
|
||||
|
||||
// The library's health queues moved here from Admin (M504): their counts
|
||||
// The library's health queues moved here from Admin: their counts
|
||||
// come from the admin summary, accented, and a line names the ones waiting.
|
||||
test('the library health queues carry what waits on you, and a line links to each', () => {
|
||||
setup(counts, '/collection', {
|
||||
|
||||
@@ -27,26 +27,26 @@
|
||||
import ListContinuation from '#lib/components/ListContinuation.svelte';
|
||||
import TabStrip from '#lib/components/TabStrip.svelte';
|
||||
|
||||
// Tracks the duplicate sweep believes hold one recording (#3912). The
|
||||
// resolver (M498, M502) settles what is safe on its own: a song held twice on
|
||||
// Tracks the duplicate sweep believes hold one recording. The
|
||||
// resolver settles what is safe on its own: a song held twice on
|
||||
// one album, and a video rip with a clean copy elsewhere. What is left comes
|
||||
// in two tabs: groups that need the operator, and the same song on different
|
||||
// in two tabs: groups that need an admin, and the same song on different
|
||||
// releases, which is kept on purpose. A third tab lists what the resolver
|
||||
// did.
|
||||
//
|
||||
// Dismissing a group says "these are not duplicates", and the sweep will not
|
||||
// propose that set again. On the cross-release tab it reads "Not the same
|
||||
// song" and also undoes the link that made the copies one song (#5438). Merging (#3911) keeps one copy, moves the others'
|
||||
// likes, plays and playlist entries onto it, and deletes their files, so it
|
||||
// asks twice.
|
||||
// song" and also undoes the link that made the copies one song. Merging
|
||||
// keeps one copy, moves the others' likes, plays and playlist entries onto
|
||||
// it, and deletes their files, so it asks twice.
|
||||
//
|
||||
// Except for one recording filling several of an album's slots (class
|
||||
// mismatch, #6184), where a merge is the wrong answer: it keeps one copy's
|
||||
// title whether or not it is the audio's, and fetches nothing. There the
|
||||
// operator says which song the recording is, or that they can't tell, and the
|
||||
// mismatch), where a merge is the wrong answer: it keeps one copy's
|
||||
// title whether or not it is the audio's, and fetches nothing. There an
|
||||
// admin says which song the recording is, or that they can't tell, and the
|
||||
// group settles as the resolver would have: copies in other songs' slots are
|
||||
// removed, the release they came from is set aside, and the album is fetched
|
||||
// again. Operator, 2026-10-21: "for some of these I don't have any idea".
|
||||
// again.
|
||||
|
||||
type Tab = DuplicatesView | 'resolved';
|
||||
const fromUrl = page.url.searchParams.get('view');
|
||||
@@ -63,7 +63,7 @@
|
||||
let confirmingMerge = $state<string | null>(null);
|
||||
let merging = $state<string | null>(null);
|
||||
// Per wrong-slot group: the copy whose title the recording is, absent when
|
||||
// the operator can't tell, and the same two-click confirm.
|
||||
// an admin can't tell, and the same two-click confirm.
|
||||
let slotPick = $state<Record<string, string>>({});
|
||||
let confirmingRefetch = $state<string | null>(null);
|
||||
let refetching = $state<string | null>(null);
|
||||
@@ -153,7 +153,7 @@
|
||||
return title.toLowerCase().replace(/&/g, 'and').replace(/[^\p{L}\p{N}]/gu, '');
|
||||
}
|
||||
|
||||
// The copies that go: every one when the operator can't tell, else those
|
||||
// The copies that go: every one when an admin can't tell, else those
|
||||
// under another title. A copy under the picked title is the song held twice,
|
||||
// and the next sweep merges it.
|
||||
function refetchRemoves(g: AdminDuplicateGroup): AdminDuplicateMember[] {
|
||||
@@ -198,8 +198,8 @@
|
||||
}
|
||||
|
||||
// What the match rests on, said outright: the copies' sizes and lengths sit
|
||||
// beside them, and an operator reading only those took the match for a guess
|
||||
// made from them (2026-10-20, #6168).
|
||||
// beside them, and read alone they make the match look like a guess made
|
||||
// from them.
|
||||
function evidence(g: AdminDuplicateGroup): string {
|
||||
if (g.tier === 'exact') {
|
||||
return 'Matched on the audio itself: these files hold the same audio data, byte for byte, once their tags are set aside.';
|
||||
@@ -209,9 +209,10 @@
|
||||
|
||||
// The same audio under different titles means at least one file's tags are
|
||||
// wrong, and the recording the other title names may not be in the library at
|
||||
// all. #3885: "WWW" was a second copy of the instrumental, and the vocal was
|
||||
// missing with nothing to say so. Savant's Mortals held one recording as 16
|
||||
// of its tracks, each cut to its own song's length (#6169). An acoustic match
|
||||
// all: a file titled "WWW" can be a second copy of "WWW (instrumental)",
|
||||
// with the vocal missing and nothing to say so, and one recording can fill
|
||||
// many of an album's tracks, each cut to its own song's length. An acoustic
|
||||
// match
|
||||
// spans encodings, where a "Remastered" suffix is routine rather than a lie,
|
||||
// so there it is raised only when the resolver found different songs on one
|
||||
// album (class mismatch).
|
||||
@@ -248,7 +249,7 @@
|
||||
return path.slice(path.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
// Hearing the copies settles what the fingerprints claim (#6168).
|
||||
// Hearing the copies settles what the fingerprints claim.
|
||||
function play(m: AdminDuplicateMember) {
|
||||
const track: TrackRef = {
|
||||
id: m.track_id,
|
||||
@@ -592,8 +593,8 @@
|
||||
{/if}
|
||||
{#if keep}
|
||||
<!-- The copy the merge will keep: the proposed one with the
|
||||
rule that chose it, or the one the operator picked. The
|
||||
badge follows the pick, as the merge does (#5604). -->
|
||||
rule that chose it, or the one an admin picked. The
|
||||
badge follows the pick, as the merge does. -->
|
||||
<span
|
||||
class="shrink-0 rounded-full bg-accent-tint px-2 py-0.5 text-xs text-accent-fg"
|
||||
data-testid="survivor-badge"
|
||||
@@ -647,7 +648,7 @@
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<!-- Fingerprinting is set under Library (#5607); the line says where,
|
||||
<!-- Fingerprinting is set under Library; the line says where,
|
||||
since turning it back on is how an empty report gets out of that state. -->
|
||||
<p class="text-xs text-text-secondary" data-testid="fingerprint-settings-link">
|
||||
Fingerprinting is {prints?.enabled === false ? 'off' : 'on'}. It's set under
|
||||
|
||||
@@ -142,7 +142,7 @@ describe('admin duplicates', () => {
|
||||
expect(history).toEqual(['2 likes · 14 plays', 'no likes or plays']);
|
||||
});
|
||||
|
||||
// Size and length come from the shared formatters (M505).
|
||||
// Size and length come from the shared formatters.
|
||||
test('each copy shows its format, size and length', () => {
|
||||
const group = response().groups[0];
|
||||
group.members = [member('www-01'), member('www-02', { file_size: 812_000, duration_sec: 3665 })];
|
||||
@@ -177,7 +177,7 @@ describe('admin duplicates', () => {
|
||||
expect(text(screen.getByTestId('duplicate-tier'))).toBe('Same music · 96% match');
|
||||
});
|
||||
|
||||
// The operator took the match for a guess from size and length (#6168).
|
||||
// Read alone, size and length make the match look like a guess.
|
||||
test('each group says what the match rests on', () => {
|
||||
const r = response();
|
||||
r.groups.push({ ...r.groups[0], id: 'g-2', tier: 'acoustic', worst_bit_error_rate: 0.04 });
|
||||
@@ -200,7 +200,7 @@ describe('admin duplicates', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// #3885: identical audio titled "WWW" and "WWW (instrumental)". One file
|
||||
// Identical audio titled "WWW" and "WWW (instrumental)". One file
|
||||
// claimed to be the vocal and wasn't, and nothing said the vocal was missing.
|
||||
describe('identical audio under different titles', () => {
|
||||
function www() {
|
||||
@@ -255,7 +255,7 @@ describe('admin duplicates', () => {
|
||||
});
|
||||
|
||||
// Unless the resolver found different songs on one album: Savant's Mortals
|
||||
// held one recording as 16 tracks, each cut to its own song's length (#6169).
|
||||
// held one recording as 16 tracks, each cut to its own song's length.
|
||||
test('an acoustic group the resolver found to be different songs says so', () => {
|
||||
const r = www();
|
||||
r.groups[0] = { ...r.groups[0], tier: 'acoustic', worst_bit_error_rate: 0, class: 'mismatch' };
|
||||
@@ -266,9 +266,9 @@ describe('admin duplicates', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// One recording in several of an album's slots (#6184). A merge would keep
|
||||
// One recording in several of an album's slots. A merge would keep
|
||||
// one title whether or not it is the audio's and fetch nothing, so it is not
|
||||
// offered: the operator says which song it is, or that they can't tell.
|
||||
// offered: an admin says which song it is, or that they can't tell.
|
||||
describe('one recording in several slots', () => {
|
||||
function slots() {
|
||||
const r = response();
|
||||
@@ -336,7 +336,7 @@ describe('admin duplicates', () => {
|
||||
});
|
||||
|
||||
// Switched off, the backlog never shrinks. "Still being fingerprinted" would
|
||||
// promise work nothing is doing (#3913).
|
||||
// promise work nothing is doing.
|
||||
test('with fingerprinting off the page says so instead of promising progress', () => {
|
||||
renderWith(
|
||||
response({
|
||||
@@ -416,7 +416,7 @@ describe('admin duplicates', () => {
|
||||
expect(screen.getByRole('button', { name: 'Merge…' })).toBeTruthy();
|
||||
});
|
||||
|
||||
// M498: the resolver's three outcomes are three tabs, each with its size.
|
||||
// The resolver's three outcomes are three tabs, each with its size.
|
||||
describe('tabs', () => {
|
||||
test('each tab shows its count, and Across releases asks for that view', async () => {
|
||||
renderWith(response());
|
||||
|
||||
@@ -21,11 +21,10 @@
|
||||
import type { AdminMissingGroup, Want } from '#lib/api/types.js';
|
||||
|
||||
// Files the scan looked for and could not find, by folder, with where each
|
||||
// folder's album stands on the wanted list (M504: this page and the
|
||||
// Collection's list of missing wants were one subject on two pages). A
|
||||
// folder's album stands on the wanted list. A
|
||||
// missing file keeps its track row, its play history and its likes,
|
||||
// because the file may come back: the scanner clears the mark by itself,
|
||||
// and adopts the row if it returns under a new name (#2528). Nothing on
|
||||
// and adopts the row if it returns under a new name. Nothing on
|
||||
// this page deletes a track; its actions are the wanted list's own.
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
@@ -41,7 +40,7 @@
|
||||
const shown = $derived(groups.reduce((n, g) => n + g.tracks.length, 0));
|
||||
const hasMore = $derived(offset + shown < total);
|
||||
|
||||
// What happens to these is set under Acquisition (#5607); the line above
|
||||
// What happens to these is set under Acquisition; the line above
|
||||
// the list says what it is now, since this is where the question comes up.
|
||||
let policy = $state<ReacquisitionSettings | null>(null);
|
||||
onMount(async () => {
|
||||
|
||||
@@ -14,7 +14,7 @@ vi.mock('#lib/api/admin.js', () => ({
|
||||
unnameable_albums: 0
|
||||
})
|
||||
}));
|
||||
// A folder's want is acted on here as on the wanted list (M504).
|
||||
// A folder's want is acted on here as on the wanted list.
|
||||
vi.mock('#lib/api/wanted.js', () => ({
|
||||
removeWant: vi.fn().mockResolvedValue(undefined),
|
||||
searchWant: vi.fn().mockResolvedValue({
|
||||
@@ -148,7 +148,7 @@ describe('/collection/missing', () => {
|
||||
|
||||
// The deciding fact for whether a missing file is worth chasing.
|
||||
// The page's lengths come from the shared formatter: an hour-long track
|
||||
// reads 1:01:05, not 61:05 (M505).
|
||||
// reads 1:01:05, not 61:05.
|
||||
test('each track shows its length, hours and all', () => {
|
||||
const long = structuredClone(response);
|
||||
long.groups[1].tracks[0].duration_sec = 3665;
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
} from '#lib/admin/reports.js';
|
||||
import type { QuarantineReason } from '#lib/api/types.js';
|
||||
|
||||
// Admin › Reports (#5606): every broken track in one queue, whether a
|
||||
// Admin › Reports: every broken track in one queue, whether a
|
||||
// listener flagged it or it failed to play on a client, one row per track
|
||||
// with one set of actions. Before, the two were separate pages with their
|
||||
// own delete paths and counts that disagreed with the rail.
|
||||
// with one set of actions, so the delete path and the count agree with the
|
||||
// rail.
|
||||
|
||||
const client = useQueryClient();
|
||||
|
||||
|
||||
@@ -11,16 +11,15 @@
|
||||
import ListContinuation from '#lib/components/ListContinuation.svelte';
|
||||
import type { AdminSuspectGroup, AdminSuspectTrack, SuspectVerdict } from '#lib/api/types.js';
|
||||
|
||||
// Files whose names say they were ripped from a video (#5410): "(Official
|
||||
// Video)", "[Audio]", "Visualizer", a reaction. Humanz was 62 of them in one
|
||||
// folder, with junk disc numbers and a reaction video filed as a song.
|
||||
// Files whose names say they were ripped from a video: "(Official
|
||||
// Video)", "[Audio]", "Visualizer", a reaction.
|
||||
//
|
||||
// The duplicate resolver holds each one back from radio and the mixes, and
|
||||
// merges it away where the library has a clean copy (M498 #5439). A marker
|
||||
// merges it away where the library has a clean copy. A marker
|
||||
// is a reason to look, not proof, so each row says what was done and offers
|
||||
// the undo: "This one is fine" lets the track back for good. A rip's album
|
||||
// stays wanted for a clean copy, searched for weekly and filed over the rip
|
||||
// when it comes (#5524).
|
||||
// when it comes.
|
||||
|
||||
const queryStore = createSuspectSourcesQuery();
|
||||
const query = $derived($queryStore);
|
||||
@@ -43,7 +42,7 @@
|
||||
return out;
|
||||
});
|
||||
|
||||
// The verdict the operator just set, shown at once while the list refetches.
|
||||
// The verdict an admin just set, shown at once while the list refetches.
|
||||
let changed = $state<Record<string, SuspectVerdict>>({});
|
||||
let saving = $state<string | null>(null);
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ describe('Suspect sources page', () => {
|
||||
expect(screen.queryByRole('button', { name: /more/i })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
// M498 #5439: a flagged track is held back from radio and the mixes, and the
|
||||
// A flagged track is held back from radio and the mixes, and the
|
||||
// operator can let it back.
|
||||
test('This one is fine lets a held-back track back in', async () => {
|
||||
mocked.mockReturnValue(
|
||||
@@ -139,7 +139,7 @@ describe('Suspect sources page', () => {
|
||||
expect(screen.getByRole('button', { name: 'Hold back again' })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// #5524: a rip's album is wanted for a clean copy, and the row says when
|
||||
// A rip's album is wanted for a clean copy, and the row says when
|
||||
// one was last looked for.
|
||||
test('shows that a clean copy is wanted, and when it was looked for', () => {
|
||||
const t = track('Strobelite', 'Gorillaz - Strobelite (Official Video).mp3', ['music video']);
|
||||
|
||||
Reference in New Issue
Block a user