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:
@@ -13,9 +13,10 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// AcoustID recording-id lookup (M401): fills the MusicBrainz ids that
|
||||
// untagged tracks lack, so the similarity arms can see them. Off until the
|
||||
// operator adds their own key (rule 26), and it never gates anything else:
|
||||
// AcoustID recording-id lookup: fills the MusicBrainz ids that untagged
|
||||
// tracks lack, so the similarity arms can see them. Off until an admin adds
|
||||
// their own key — a third-party account is never on by default — and it
|
||||
// never gates anything else:
|
||||
// when AcoustID is unreachable the card says so and nothing else notices.
|
||||
|
||||
let overview = $state<AcoustIDOverview | null>(null);
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
import AcquisitionServiceRow from './AcquisitionServiceRow.svelte';
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
|
||||
// Where Minstrel looks for music and what downloads it (M502 #5518),
|
||||
// Fabled Librarian's model: two lists of connections the operator adds and
|
||||
// configures. Nothing is seeded or copied. A FabledExchange is
|
||||
// one entry under download clients, with a switch for each of its jobs.
|
||||
// Where Minstrel looks for music and what downloads it: two lists of
|
||||
// connections an admin adds and configures. Nothing is seeded or copied. A
|
||||
// FabledExchange is one entry under download clients, with a switch for each
|
||||
// of its jobs.
|
||||
|
||||
let services = $state<AcquisitionService[] | null>(null);
|
||||
let loadError = $state(false);
|
||||
@@ -125,7 +125,7 @@
|
||||
{:else if services === null}
|
||||
<p class="text-sm text-text-secondary">Loading indexers and download clients…</p>
|
||||
{:else}
|
||||
<!-- The verdict first (#189): can music be found and downloaded at all. -->
|
||||
<!-- The verdict first: can music be found and downloaded at all. -->
|
||||
<p class="text-sm" data-testid="acquisition-health">
|
||||
{#if !canFetch}
|
||||
<span class="text-error-fg">No download client is switched on, so nothing can be downloaded.</span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { errCode, errMessage } from '#lib/api/errors.js';
|
||||
import { pushToast } from '#lib/stores/toast.svelte.js';
|
||||
|
||||
// One indexer or download client (M502 #5518). The form is a copy of the
|
||||
// One indexer or download client. The form is a copy of the
|
||||
// saved row, so Save is only offered when something changed. Secrets are
|
||||
// write-only: the server says whether one is set and never what it is.
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Settings › Account's last group (#5595), styled as SettingsGroup is. -->
|
||||
<!-- Settings › Account's last group, styled as SettingsGroup is. -->
|
||||
<section class="space-y-3 rounded-lg border border-border bg-surface px-4 pt-3 pb-4">
|
||||
<header>
|
||||
<h2 class="text-base font-medium text-text-primary">Signed-in devices</h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
// The header of every page that is one collection of tracks, album and
|
||||
// playlist (milestone 494): cover, title, a line or two of facts, then
|
||||
// playlist: cover, title, a line or two of facts, then
|
||||
// Play and Shuffle (PlayActions).
|
||||
import type { Snippet } from 'svelte';
|
||||
import PlayActions from './PlayActions.svelte';
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
// CoverTile/ServerImage: one place that owns the loading placeholder and
|
||||
// the error fallback so no card sits blank while art loads or 404s (the
|
||||
// "You might like" row surfaces unplayed items whose art is often not yet
|
||||
// backfilled). Replaces the three hand-rolled <img> tags that previously
|
||||
// disagreed on fallback handling.
|
||||
// backfilled).
|
||||
let {
|
||||
src,
|
||||
alt = '',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
export type DiscoverCardKind = 'artist' | 'album' | 'track';
|
||||
// 'snoozed' is a transient state the card flips to in place after the user
|
||||
// parks it, so the disappearance is legible and undoable rather than a card
|
||||
// silently vanishing from under the cursor (rule #24). The row is gone on
|
||||
// silently vanishing from under the cursor. The row is gone on
|
||||
// the next refetch; the persistent way back is the snoozed list.
|
||||
export type DiscoverCardState = 'requestable' | 'kept' | 'requested' | 'snoozed';
|
||||
</script>
|
||||
@@ -37,7 +37,7 @@
|
||||
} = $props();
|
||||
|
||||
// Art comes from Minstrel's catalogue endpoint, which answers 404 when no
|
||||
// source has an image (M502 #5519): show the icon then, not a broken image.
|
||||
// source has an image: show the icon then, not a broken image.
|
||||
// Reset when the card is reused for another result.
|
||||
let imageFailed = $state(false);
|
||||
$effect(() => {
|
||||
@@ -118,7 +118,7 @@
|
||||
Icon-only to keep Request unambiguously the primary action, with
|
||||
the intent carried by the accessible name. "Not right now" is the
|
||||
whole point of the wording: this parks a suggestion, it does not
|
||||
record an opinion about the artist (rule #101).
|
||||
record an opinion about the artist.
|
||||
-->
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -34,7 +34,8 @@ describe('DiscoverResultCard', () => {
|
||||
},
|
||||
});
|
||||
expect(screen.getByRole('button', { name: /in library/i })).toBeDisabled();
|
||||
// Kept pill is exposed as a status region so SR users hear it when it appears.
|
||||
// Kept pill is exposed as a status region so SR users hear it when it
|
||||
// appears.
|
||||
const status = screen.getByRole('status');
|
||||
expect(status).toBeInTheDocument();
|
||||
expect(status.textContent).toMatch(/kept/i);
|
||||
@@ -62,14 +63,15 @@ describe('DiscoverResultCard', () => {
|
||||
},
|
||||
});
|
||||
// Button is disabled — the test still verifies onRequest isn't called even
|
||||
// if a click slips through (jsdom does not enforce :disabled at fireEvent level).
|
||||
// if a click slips through (jsdom does not enforce :disabled at fireEvent
|
||||
// level).
|
||||
const btn = screen.getByRole('button');
|
||||
await fireEvent.click(btn);
|
||||
expect(onRequest).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// NOTE: previous versions of this file asserted .badge-row { min-height: 22px }
|
||||
// and .actions { margin-top: auto } via getComputedStyle, which only worked
|
||||
// NOTE: previous versions of this file asserted .badge-row { min-height: 22px
|
||||
// } and .actions { margin-top: auto } via getComputedStyle, which only worked
|
||||
// because the component shipped inline style="" attributes — a layering
|
||||
// violation. Stylesheet introspection (document.styleSheets) was tried as a
|
||||
// replacement, but vitest's @testing-library/svelte renderer does not inject
|
||||
@@ -101,7 +103,8 @@ describe('DiscoverResultCard', () => {
|
||||
},
|
||||
});
|
||||
expect(container.querySelector('img')).not.toBeInTheDocument();
|
||||
// Lucide renders an inline <svg>; verify its presence as a proxy for "fallback rendered"
|
||||
// Lucide renders an inline <svg>; verify its presence as a proxy for
|
||||
// "fallback rendered"
|
||||
expect(container.querySelector('svg')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -126,7 +129,7 @@ describe('DiscoverResultCard', () => {
|
||||
expect(screen.queryByTestId('attribution')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
// --- snooze affordance (#2375) ---
|
||||
// --- snooze affordance ---
|
||||
|
||||
test('snooze button appears only when onSnooze is supplied', () => {
|
||||
// The catalogue search results reuse this card and have nothing to park, so
|
||||
@@ -143,7 +146,8 @@ describe('DiscoverResultCard', () => {
|
||||
props: { kind: 'artist', title: 'Outsider', state: 'requestable', onSnooze }
|
||||
});
|
||||
const btn = screen.getByRole('button', { name: /not right now — hide outsider for a while/i });
|
||||
// Rule #101: the accessible name must carry no verdict on the music.
|
||||
// A snooze is not a dislike: the accessible name must carry no verdict on
|
||||
// the music.
|
||||
expect(btn.getAttribute('aria-label')).not.toMatch(/dislike|not for me|never|hate/i);
|
||||
await fireEvent.click(btn);
|
||||
expect(onSnooze).toHaveBeenCalledOnce();
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// How Minstrel fingerprints tracks and when it looks for duplicates (#3913).
|
||||
// On Admin › Library (#5607); Duplicates says whether it is on and links here.
|
||||
// How Minstrel fingerprints tracks and when it looks for duplicates.
|
||||
// On Admin › Library; Duplicates says whether it is on and links here.
|
||||
|
||||
let { libraryTotal = 0, onSaved }: { libraryTotal?: number; onSaved?: () => void } =
|
||||
$props();
|
||||
@@ -33,14 +33,14 @@
|
||||
form.acoustic_max_bit_error_rate = value === '' ? NaN : Math.round(100 - Number(value)) / 100;
|
||||
}
|
||||
|
||||
// The one setting with a cost the operator can't see from here: fingerprints
|
||||
// The one setting with a cost an admin can't see from here: fingerprints
|
||||
// taken at two lengths can't be compared, so a new length redoes the library.
|
||||
const lengthChanged = $derived(
|
||||
!!saved && !!form && form.chromaprint_length_sec !== saved.chromaprint_length_sec
|
||||
);
|
||||
|
||||
// Mirrors the server's ranges, so a bad value is named in the card's own terms
|
||||
// (a percentage, not a bit-error rate) before anything is sent.
|
||||
// Mirrors the server's ranges, so a bad value is named in the card's own
|
||||
// terms (a percentage, not a bit-error rate) before anything is sent.
|
||||
const between = (v: number, lo: number, hi: number) => Number.isInteger(v) && v >= lo && v <= hi;
|
||||
const problems = $derived.by(() => {
|
||||
if (!form) return [] as string[];
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('FingerprintSettingsCard', () => {
|
||||
});
|
||||
|
||||
// A new length re-fingerprints the whole library. Nothing else on the page
|
||||
// would say so before the operator commits to it.
|
||||
// would say so before an admin commits to it.
|
||||
test('changing the length warns that every track is re-fingerprinted', async () => {
|
||||
await renderCard({}, { libraryTotal: 18026 });
|
||||
expect(screen.queryByTestId('length-warning')).toBeNull();
|
||||
@@ -117,7 +117,7 @@ describe('FingerprintSettingsCard', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// M498, rule 25: the resolver acting on its own is the operator's to turn off.
|
||||
// The resolver acting on its own is an admin's to turn off.
|
||||
test('auto-resolve can be turned off and is saved with the rest', async () => {
|
||||
vi.mocked(updateFingerprintSettings).mockResolvedValue({ ...base, auto_resolve: false });
|
||||
await renderCard();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { pushToast } from '#lib/stores/toast.svelte.js';
|
||||
import Modal from './Modal.svelte';
|
||||
|
||||
// Follow an artist for the wanted list (M502 #5520): their new releases are
|
||||
// Follow an artist for the wanted list: their new releases are
|
||||
// wanted, filtered by a release-type profile. Admin-only; the artist page
|
||||
// shows it when the artist carries a MusicBrainz id.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import { plural } from '#lib/utils/plural.js';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// The library's folders (#6129), set here rather than only by
|
||||
// The library's folders, set here rather than only by
|
||||
// MINSTREL_LIBRARY_SCAN_PATHS. Editing a folder's path says its files moved
|
||||
// there: the server rewrites its tracks' paths, so plays, likes and
|
||||
// playlists stay with them. A folder removed is no longer read.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
// The bottom of every paged list (#5416, preference 172): the next page
|
||||
// loads on its own as the reader nears the end, with no "Load more"
|
||||
// button. What the button used to give for free is kept here:
|
||||
// The bottom of every paged list: the next page loads on its own as the
|
||||
// reader nears the end, with no "Load more" button. What a button gives
|
||||
// for free is kept here:
|
||||
//
|
||||
// - In flight: a "Loading more…" line, announced through aria-live, so the
|
||||
// list doesn't look finished while it isn't.
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// Loudness analysis (#4995): the background measurement that loudness
|
||||
// Loudness analysis: the background measurement that loudness
|
||||
// normalization levels playback from, its progress, and its knobs. The
|
||||
// cache size bounds the leveled copies rendered for speakers (#5001).
|
||||
// cache size bounds the leveled copies rendered for speakers.
|
||||
|
||||
let saved = $state<LoudnessSettings | null>(null);
|
||||
let form = $state<LoudnessSettings | null>(null);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// The Android app this server bundles, at the top of Settings › Account
|
||||
// (#5595). Polls /api/client/version once on mount. Renders nothing on
|
||||
// 404 (no bundled APK: dev and pre-CI images) or 401.
|
||||
// The Android app this server bundles, at the top of Settings › Account.
|
||||
// Polls /api/client/version once on mount. Renders nothing on
|
||||
// 404 (no bundled APK: a local build) or 401.
|
||||
//
|
||||
// The /api/client/* endpoints are auth-gated to prevent anonymous
|
||||
// bandwidth abuse on the APK stream, so this only shows to a signed-in
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
);
|
||||
// The operator can count their proxies from what actually arrived rather
|
||||
// An admin can count their proxies from what actually arrived rather
|
||||
// than guessing — one XFF entry per proxy in front of us.
|
||||
const suggested = $derived(chain.length);
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('NetworkSettingsCard', () => {
|
||||
expect(await screen.findByText('203.0.113.9')).toBeTruthy();
|
||||
});
|
||||
|
||||
// Counting proxies is the operator's job and the hint is how they do it
|
||||
// Counting proxies is an admin's job and the hint is how they do it
|
||||
// without guessing.
|
||||
test('hints the likely depth when it disagrees with the arriving chain', async () => {
|
||||
getNetworkSettings.mockResolvedValue(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
import Segmented from '#lib/components/settings/Segmented.svelte';
|
||||
|
||||
// Volume leveling (M464 #4998). The choice is the user's, stored on the
|
||||
// Volume leveling. The choice is the user's, stored on the
|
||||
// server, so it follows them to the Android app and to casts.
|
||||
onMount(() => {
|
||||
void loadNormalization();
|
||||
@@ -45,7 +45,7 @@
|
||||
const targets = NORMALIZATION_TARGETS.map((t) => ({ value: t, label: `${t} LUFS` }));
|
||||
</script>
|
||||
|
||||
<!-- Rows of the Playback group (#5595); the caller wraps them in it. -->
|
||||
<!-- Rows of the Playback group; the caller wraps them in it. -->
|
||||
<SettingRow label="Volume leveling" hint={modeHints[normalization.value.mode]}>
|
||||
<Segmented
|
||||
name="normalization-mode"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// When notification emails go out (M489 #5346). Nothing is emailed per
|
||||
// When notification emails go out. Nothing is emailed per
|
||||
// event: new music is a daily summary, everything else a batch.
|
||||
|
||||
const button =
|
||||
@@ -55,8 +55,8 @@
|
||||
form = { ...saved };
|
||||
pushToast('Notification email schedule saved.');
|
||||
} catch (e) {
|
||||
// The server names the field it refused (#3937: errMessage, not
|
||||
// e.message, because the client throws a plain object).
|
||||
// The server names the field it refused (errMessage, not e.message:
|
||||
// the client throws a plain object).
|
||||
pushToast(errMessage(e), 'error');
|
||||
} finally {
|
||||
saving = false;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { user } from '#lib/auth/store.svelte.js';
|
||||
import { pushToast } from '#lib/stores/toast.svelte.js';
|
||||
|
||||
// Per-user notification settings (M489): one row per kind, a toggle per
|
||||
// Per-user notification settings: one row per kind, a toggle per
|
||||
// channel. Toggles are optimistic; a failed save puts the switch back.
|
||||
|
||||
const client = useQueryClient();
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
// Bumped by every local change, so a save resolving after a newer toggle
|
||||
// does not overwrite it, and a failed save only reverts when nothing newer
|
||||
// happened (snippet #5106's generation counter).
|
||||
// happened.
|
||||
let generation = 0;
|
||||
|
||||
function commit(next: NotificationSettings) {
|
||||
@@ -96,8 +96,8 @@
|
||||
{/each}
|
||||
{/snippet}
|
||||
|
||||
<!-- Settings › Notifications (#5595): one table, its column labels once
|
||||
(#189), the admins' library-health kinds under their own heading in
|
||||
<!-- Settings › Notifications: one table, its column labels once
|
||||
, the admins' library-health kinds under their own heading in
|
||||
the same columns. -->
|
||||
<section id="notifications" class="rounded-lg border border-border bg-surface">
|
||||
<header class="px-4 pt-3 pb-2">
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts">
|
||||
// The centred column every track-list page sits in: album, playlist,
|
||||
// Liked, History and Search → Tracks (milestone 494). The playlist page
|
||||
// had it alone from May 2026; the operator picked it as the page shape
|
||||
// on 2026-10-08. Shelf and grid pages (Home, Library, Discover, Artist,
|
||||
// Search) stay full width, since a narrow column would cost them cards.
|
||||
// The centred column every track-list page sits in: album, playlist, Liked,
|
||||
// History and Search → Tracks. Shelf and grid pages (Home, Library, Discover,
|
||||
// Artist, Search) stay full width, since a narrow column would cost them
|
||||
// cards.
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
let { children }: { children: Snippet } = $props();
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts">
|
||||
// Play and Shuffle, the same on every page that has them: album,
|
||||
// playlist and artist (milestone 494). Play is filled and Shuffle
|
||||
// outlined. The fill is the accent: the operator's call on 2026-10-08,
|
||||
// made with the house rule against accent on action buttons stated to
|
||||
// them.
|
||||
// playlist and artist. Play is filled and Shuffle outlined. The fill is
|
||||
// the accent, a deliberate exception to the house rule against accent on
|
||||
// action buttons.
|
||||
import type { Snippet } from 'svelte';
|
||||
import { Play, Shuffle } from 'lucide-svelte';
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
(e.currentTarget as HTMLImageElement).src = FALLBACK_COVER;
|
||||
}
|
||||
|
||||
// #9 — dominant-color accent. Sample the current track's cover and
|
||||
// Dominant-color accent. Sample the current track's cover and
|
||||
// pipe it into a CSS custom property; a 2px strip above the bar
|
||||
// takes on the colour, so the page subtly tracks what's playing.
|
||||
// Cache-backed in dominantColorFromUrl so revisits are free.
|
||||
|
||||
@@ -69,7 +69,7 @@ function track(): TrackRef {
|
||||
// PlayerBar renders both a compact (mobile, md:hidden) and desktop
|
||||
// (hidden md:flex) block. jsdom doesn't apply CSS media queries, so
|
||||
// both DOM trees are present in tests. Scope every query to the
|
||||
// compact block — that's the user-facing change in #358; desktop
|
||||
// compact block — that's where the phone layout lives; desktop
|
||||
// behavior is covered structurally by the same store + handlers.
|
||||
function compact() {
|
||||
return within(screen.getByTestId('player-bar-compact'));
|
||||
@@ -209,8 +209,8 @@ describe('PlayerBar', () => {
|
||||
});
|
||||
|
||||
describe('"Up next" line (desktop only)', () => {
|
||||
// The "Next · …" copy was dropped from compact per #358; only the
|
||||
// desktop block surfaces it. Scope queries to desktop.
|
||||
// The compact block has no "Next · …" copy; only the desktop block
|
||||
// surfaces it. Scope queries to desktop.
|
||||
function desktop() {
|
||||
return within(screen.getByTestId('player-bar-desktop'));
|
||||
}
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
let { playlist }: { playlist: Playlist } = $props();
|
||||
|
||||
const isOwn = $derived(user.value?.id === playlist.user_id);
|
||||
// Server tells us which system playlists support by-kind refresh
|
||||
// (#411 R2) — no hardcoded kind list here.
|
||||
// Server tells us which system playlists support by-kind refresh — no
|
||||
// hardcoded kind list here.
|
||||
const refreshable = $derived(playlist.refreshable === true);
|
||||
|
||||
// #417: system playlists atomic-replace on rebuild, so created_at
|
||||
// System playlists atomic-replace on rebuild, so created_at
|
||||
// is the last-rotated time. Surface it so users know how fresh the
|
||||
// mix is. Friendly wording, not the HistoryRow "m/h ago" style.
|
||||
function refreshedLabel(iso: string): string {
|
||||
@@ -75,7 +75,7 @@
|
||||
// seed_artist_id which is non-null only for per-artist mixes.
|
||||
const isPerArtist = playlist.seed_artist_id != null;
|
||||
if (variant != null && !isPerArtist) {
|
||||
// #415: server returns the rotation-aware order (unplayed
|
||||
// Server returns the rotation-aware order (unplayed
|
||||
// this rotation first). Play it as-is — no client shuffle —
|
||||
// and tag the queue so play_started carries `source` and
|
||||
// the server advances the rotation.
|
||||
|
||||
@@ -253,7 +253,7 @@ describe('PlaylistCard', () => {
|
||||
await fireEvent.click(playButton);
|
||||
await new Promise(resolve => setTimeout(resolve, 10));
|
||||
|
||||
// #415/#411: system play hits the rotation-aware shuffle endpoint
|
||||
// System play hits the rotation-aware shuffle endpoint
|
||||
// (raw variant), not the cached detail GET, and never refreshes.
|
||||
expect(systemShuffle).toHaveBeenCalledWith('for_you');
|
||||
expect(getPlaylist).not.toHaveBeenCalled();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Two different ways a row can be dead, with the same behaviour and
|
||||
// deliberately different copy. A removed track is gone for good; a
|
||||
// missing file is a track we still have — history, likes and all —
|
||||
// whose bytes aren't on disk right now (#2527). Telling the user
|
||||
// whose bytes aren't on disk right now. Telling the user
|
||||
// "file missing" invites them to fix it; a strikethrough would say
|
||||
// "deleted", which is a lie about a file that may well come back.
|
||||
const isMissingFile = $derived(row.unavailable);
|
||||
|
||||
@@ -53,7 +53,7 @@ const removed: PlaylistTrack = {
|
||||
stream_url: null
|
||||
};
|
||||
|
||||
// Missing file (#2527): the track row still exists — ids intact, history
|
||||
// Missing file: the track row still exists — ids intact, history
|
||||
// intact — but the server withholds the stream URL because the bytes are
|
||||
// not on disk. Deliberately distinct from `removed` above.
|
||||
const missingFile: PlaylistTrack = {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// The address links in email point at (#4981), on Admin › Email & network.
|
||||
// The address links in email point at, on Admin › Email & network.
|
||||
const button =
|
||||
'rounded-md border border-border px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary disabled:opacity-50';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
const dirty = $derived(saved !== null && value.trim() !== saved);
|
||||
// The address this page was loaded from is almost always the right answer,
|
||||
// so offer it rather than making the operator type it.
|
||||
// so offer it rather than making an admin type it.
|
||||
const here = typeof window !== 'undefined' ? window.location.origin : '';
|
||||
|
||||
async function load() {
|
||||
|
||||
@@ -44,15 +44,15 @@
|
||||
{isCurrent ? 'border-l-2 border-l-accent bg-surface-hover' : 'bg-background'}"
|
||||
>
|
||||
<!--
|
||||
The album art is the grab surface (#2395). The grip used to occupy its own
|
||||
column in every row; it now sits OVER the art, so it costs no horizontal
|
||||
space at all. `use:reorderDrag` is on the row (above), so dragging already
|
||||
worked from anywhere — the grip's real jobs are being the visual cue and
|
||||
the keyboard target, and both survive here.
|
||||
The album art is the grab surface. The grip sits OVER the art rather than
|
||||
in a column of its own, so it costs no horizontal space at all.
|
||||
`use:reorderDrag` is on the row (above), so dragging works from anywhere —
|
||||
the grip's real jobs are being the visual cue and the keyboard target, and
|
||||
both survive here.
|
||||
|
||||
It stays VISIBLE at rest, just quiet — it is the only thing that says this
|
||||
list can be reordered at all, so hiding it until hover would trade the
|
||||
operator's space complaint for a discoverability one (rule #24), and would
|
||||
list can be reordered at all, so hiding it until hover would trade a
|
||||
space problem for a discoverability one, and would
|
||||
leave nothing for touch, which has no hover. The scrim only appears on
|
||||
hover/focus so the artwork stays legible the rest of the time; the drop
|
||||
shadow is what keeps the glyph readable over pale covers without one.
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('QueueTrackRow', () => {
|
||||
expect(moveQueueItem).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// --- handle placement (#2395) ---
|
||||
// --- handle placement ---
|
||||
|
||||
it('the reorder handle overlays the album art instead of taking its own column', () => {
|
||||
const { container } = render(QueueTrackRow, {
|
||||
@@ -106,7 +106,7 @@ describe('QueueTrackRow', () => {
|
||||
expect(art).not.toBeNull();
|
||||
// Sharing a parent is what "overlaid" means structurally. If someone moves
|
||||
// the grip back into its own flex slot, this fails — which is the point:
|
||||
// that slot cost horizontal space in every row and is why #2395 exists.
|
||||
// that slot costs horizontal space in every row.
|
||||
expect(handle.parentElement).toBe(art!.parentElement);
|
||||
});
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// Policy for putting an album whose files went missing back on the wanted
|
||||
// list (milestone #290, M502 #5520). On Admin › Acquisition with the rest
|
||||
// of how music is got (#5607); Missing files says what it is set to and
|
||||
// list. On Admin › Acquisition with the rest
|
||||
// of how music is got; Missing files says what it is set to and
|
||||
// links here. Searching for a want, and retrying, is the search
|
||||
// schedule's job, so there is no retry policy here.
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
// names the offending field, so surface its message rather than a
|
||||
// generic failure. errMessage, not `e.message`: the API client throws a
|
||||
// plain {code, message} object, never an Error, so an instanceof check
|
||||
// here silently discarded every reason the server gave (#3937).
|
||||
// here would silently discard every reason the server gives.
|
||||
pushToast(errMessage(e), 'error');
|
||||
} finally {
|
||||
saving = false;
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('ReacquisitionSettingsCard', () => {
|
||||
});
|
||||
|
||||
// Saving an unchanged form would be a pointless round-trip, and a live Save
|
||||
// button invites the operator to wonder whether anything happened.
|
||||
// button invites an admin to wonder whether anything happened.
|
||||
test('save is disabled until something changes', async () => {
|
||||
await renderCard();
|
||||
const save = await screen.findByRole('button', { name: /save/i });
|
||||
@@ -72,9 +72,9 @@ describe('ReacquisitionSettingsCard', () => {
|
||||
// generic "couldn't save" would throw that away.
|
||||
//
|
||||
// Rejects with what api.put actually throws — a plain {code, message, status}
|
||||
// object, not an Error. The old version of this test rejected with an Error,
|
||||
// which no code path produces, and so passed while the card was discarding
|
||||
// every server message it was handed (#3937).
|
||||
// object, not an Error. Rejecting with an Error, which no code path
|
||||
// produces, would let this pass while the card discarded every server
|
||||
// message.
|
||||
test('a rejected save surfaces the server message', async () => {
|
||||
const message = 'grace_hours must be 1-720';
|
||||
vi.mocked(updateReacquisitionSettings).mockRejectedValue({
|
||||
@@ -93,7 +93,7 @@ describe('ReacquisitionSettingsCard', () => {
|
||||
);
|
||||
});
|
||||
|
||||
// Without this the operator watches those albums never get wanted and
|
||||
// Without this an admin watches those albums never get wanted and
|
||||
// reasonably concludes the feature is broken.
|
||||
test('unnameable albums are called out with the reason', async () => {
|
||||
await renderCard({ unnameable_albums: 3 });
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
} from '#lib/api/metrics.js';
|
||||
|
||||
// How plays launched from each recommendation surface land against the
|
||||
// music you pick yourself. Library › Your listening (#5597): a report on
|
||||
// your own listening, so it moved out of Settings, which holds choices.
|
||||
// music you pick yourself. On Library › Your listening: a report on your
|
||||
// own listening, kept out of Settings, which holds choices.
|
||||
|
||||
const metrics = createRecommendationMetricsQuery() as CreateQueryResult<RecommendationMetrics>;
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
return `${(v * 100).toFixed(0)}%`;
|
||||
}
|
||||
|
||||
// Deltas come from the server with their margin of error (#2495). The client
|
||||
// no longer subtracts rates itself: the margin needs the sample sizes and
|
||||
// Deltas come from the server with their margin of error. The client does
|
||||
// not subtract rates itself: the margin needs the sample sizes and
|
||||
// variances, and having both clients re-derive it invites them to disagree.
|
||||
//
|
||||
// A delta that isn't distinguishable from zero is prefixed "≈" and dimmed.
|
||||
// That is the point of this whole change — the card used to render a −12 on
|
||||
// 59 plays exactly as boldly as a −6 on 400, and the first of those is noise.
|
||||
// A delta that isn't distinguishable from zero is prefixed "≈" and dimmed,
|
||||
// so a −12 on 59 plays, which is noise, does not read as boldly as a −6 on
|
||||
// 400.
|
||||
function deltaText(d: MetricDelta | undefined): string {
|
||||
if (!d) return '';
|
||||
const pts = Math.round(d.delta_pp);
|
||||
@@ -60,7 +60,7 @@
|
||||
return d.delta_pp < 0 ? 'text-danger' : 'text-text-secondary';
|
||||
}
|
||||
|
||||
// Pick-kind breakdowns are collapsed by default (#1270): with every
|
||||
// Pick-kind breakdowns are collapsed by default: with every
|
||||
// system mix stamping provenance, always-open sub-rows would triple
|
||||
// the table height and bury the surface-level comparison.
|
||||
let expandedBreakdowns = $state(new Set<string>());
|
||||
@@ -156,7 +156,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Pick-kind provenance sub-rows (#1249/#1270): each
|
||||
<!-- Pick-kind provenance sub-rows: each
|
||||
surface splits into the populations its builder
|
||||
stamped — For You's taste vs freshness injection,
|
||||
Discover's buckets, the tiered mixes' tiers — the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { afterEach, describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
|
||||
// Moved with the card from Settings to Library › Your listening (#5597).
|
||||
// The card lives on Library › Your listening.
|
||||
|
||||
// Mutable holder so individual tests can inject populated metrics;
|
||||
// vi.mock is hoisted, hence vi.hoisted for the shared reference.
|
||||
@@ -78,10 +78,9 @@ describe('RecommendationMetrics (Library › Your listening)', () => {
|
||||
expect(screen.queryByText(/Taste picks/)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
// #2495: the card used to render a delta computed client-side with no notion
|
||||
// of uncertainty, so a -12 on 59 plays looked exactly as solid as a -6 on 400.
|
||||
// Deltas now arrive from the server with a margin, and an indistinguishable
|
||||
// one is marked with "≈" and dimmed rather than coloured.
|
||||
// Deltas arrive from the server with a margin, and an indistinguishable one
|
||||
// is marked with "≈" and dimmed rather than coloured, so a -12 on 59 plays
|
||||
// does not look as solid as a -6 on 400.
|
||||
test('a delta smaller than its margin is marked as indistinguishable', async () => {
|
||||
metricsMock.data = {
|
||||
window_days: 30,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { pushToast } from '#lib/stores/toast.svelte.js';
|
||||
import type { ReleaseProfile, ReleaseProfileInput } from '#lib/api/types.js';
|
||||
|
||||
// Release-type profiles (M502 #5520): which kinds of release a followed
|
||||
// Release-type profiles: which kinds of release a followed
|
||||
// artist's new releases must be to be wanted. A release passes when its
|
||||
// primary type is ticked and so is every one of its secondary types, so a
|
||||
// profile with no secondary types wants studio releases only and leaves out
|
||||
|
||||
@@ -23,7 +23,7 @@ function req(over: Partial<MusicRequest> = {}): MusicRequest {
|
||||
|
||||
const text = (el: HTMLElement) => (el.textContent ?? '').replace(/\s+/g, ' ').trim();
|
||||
|
||||
// The row both Requests pages draw (#5651): the admin queue and the
|
||||
// The row both Requests pages draw: the admin queue and the
|
||||
// requester's own list read the same request the same way.
|
||||
describe('RequestRow', () => {
|
||||
test('says what was asked for, where it stands, and who or when', () => {
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// Searching and grabbing (M502 #5521): how often each want is searched
|
||||
// Searching and grabbing: how often each want is searched
|
||||
// for, whether the best release is taken without asking, and which
|
||||
// qualities are taken at all. The schedule wakes every ten minutes and
|
||||
// keeps to each indexer's searches-per-hour. A finished download is
|
||||
// checked and filed into one of the library's folders (#5522); it then
|
||||
// checked and filed into one of the library's folders; it then
|
||||
// seeds until the ratio or the days below, and a download nobody shares
|
||||
// is given up after the hours below (#5523). A held album below "Upgrade
|
||||
// until" is searched for weekly and replaced by a better copy (#5524).
|
||||
// is given up after the hours below. A held album below "Upgrade
|
||||
// until" is searched for weekly and replaced by a better copy.
|
||||
|
||||
const client = useQueryClient();
|
||||
const button =
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
|
||||
// A section's pages, down the left (#5572, #5595): Collection and Settings
|
||||
// A section's pages, down the left: Collection and Settings
|
||||
// both use it, so a section's navigation sits in the same place and looks
|
||||
// the same everywhere (#189, "stable chrome"). On a narrow screen the rail
|
||||
// the same everywhere (stable chrome). On a narrow screen the rail
|
||||
// runs across the top. An item can carry a count and, accented, how many
|
||||
// of those need a person.
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
// Reads /healthz on mount and surfaces the deployed server version
|
||||
// as understated text. Useful when verifying which image a container
|
||||
// is actually running (came up debugging the in-app update flow when
|
||||
// it wasn't obvious whether v2026.05.10.0 or .1 was deployed).
|
||||
// as understated text, for verifying which image a container is
|
||||
// actually running.
|
||||
//
|
||||
// This is now the ONLY place an operator can see which build they are on.
|
||||
// Image tags stopped carrying the version on 2026-09-10 — :latest and :dev
|
||||
// are rolling names and :<sha> answers "which commit", not "which build" —
|
||||
// so the server's self-report is the answer.
|
||||
// This is the ONLY place an admin can see which build they are on: image
|
||||
// tags do not carry the version — :latest and :dev are rolling names and
|
||||
// :<sha> answers "which commit", not "which build" — so the server's
|
||||
// self-report is the answer.
|
||||
//
|
||||
// The channel is shown BESIDE the version, never spliced into it: the same
|
||||
// commit built on both lanes reports an identical version and differs only
|
||||
@@ -42,7 +41,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- The value of Settings › About's "Server version" row (#5595). -->
|
||||
<!-- The value of Settings › About's "Server version" row. -->
|
||||
{#if version}
|
||||
<span class="text-sm tabular-nums text-text-secondary" data-testid="server-version">
|
||||
{version}{#if channel} · {channel}{/if}
|
||||
|
||||
@@ -17,13 +17,12 @@
|
||||
let menuButtonRef: HTMLElement | undefined = $state();
|
||||
|
||||
// Close the dropdown when the click was outside both the button and the menu.
|
||||
// The previous implementation used onclick={(e) => e.stopPropagation()} on the
|
||||
// menu container, which kept the window-level close-on-outside-click handler
|
||||
// from firing — but it also blocked SvelteKit's document-level link-click
|
||||
// interceptor, so clicking Admin/Settings inside the dropdown fell through
|
||||
// to the browser's native navigation (a full-page reload). On a hard reload,
|
||||
// /admin/+layout.ts's load function ran before bootstrap() settled the user
|
||||
// store, so the admin guard saw user.value === null and redirected to /.
|
||||
// Checked here, not with stopPropagation on the menu container: that would
|
||||
// also block SvelteKit's document-level link-click interceptor, so clicking
|
||||
// Admin/Settings in the dropdown would fall through to a full-page reload —
|
||||
// and on a hard reload /admin/+layout.ts's load runs before bootstrap()
|
||||
// settles the user store, so the admin guard sees user.value === null and
|
||||
// redirects to /.
|
||||
function handleWindowClick(e: MouseEvent) {
|
||||
if (!menuOpen) return;
|
||||
const target = e.target as Node | null;
|
||||
@@ -43,17 +42,15 @@
|
||||
return page.url.pathname.startsWith(prefix);
|
||||
}
|
||||
|
||||
// Primary nav. Sits centered in the top bar (replaces the prior left
|
||||
// sidebar). Mirrors the Android top-app-bar treatment: three first-class
|
||||
// destinations, plus Library acting as a parent for Artists / Albums /
|
||||
// Liked / History / Playlists (tabs at /library/+layout.svelte).
|
||||
// Search + user menu live on the right side of the header (unchanged).
|
||||
// Library targets the Artists tab directly so SPA navigation doesn't
|
||||
// bounce through the /library 308-redirect. isActive('/library')
|
||||
// still matches all sub-routes by prefix so the active state covers
|
||||
// every tab.
|
||||
// Collection (M502) is an admin's: the catalogue of what the library holds
|
||||
// and wants, and what Minstrel is fetching for it.
|
||||
// Primary nav. Sits centered in the top bar. Mirrors the Android top-app-bar
|
||||
// treatment: three first-class destinations, plus Library acting as a parent
|
||||
// for Artists / Albums / Liked / History / Playlists (tabs at
|
||||
// /library/+layout.svelte). Search + user menu live on the right side of the
|
||||
// header. Library targets the Artists tab directly so SPA navigation doesn't
|
||||
// bounce through the /library 308-redirect. isActive('/library') still
|
||||
// matches all sub-routes by prefix so the active state covers every tab.
|
||||
// Collection is an admin's: the catalogue of what the library holds and
|
||||
// wants, and what Minstrel is fetching for it.
|
||||
const navItems = $derived([
|
||||
{ href: '/', label: 'Home', icon: House, matchPrefix: '/' },
|
||||
{ href: '/library/artists', label: 'Library', icon: LibraryBig, matchPrefix: '/library' },
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
type StatusEntry = { label: string; tone: Tone };
|
||||
|
||||
// Voice-rule labels per spec §6 (and project_design_system.md). Pending requests
|
||||
// Labels in Minstrel's voice. Pending requests
|
||||
// are an "awaiting" moment, completed requests are "kept" (Minstrel-voice for
|
||||
// success), rejected is "set aside", failed is the error register.
|
||||
const STATUS_TABLE: Record<RequestStatus, StatusEntry> = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect, test } from 'vitest';
|
||||
import { render, screen } from '@testing-library/svelte';
|
||||
import StatusPill from './StatusPill.svelte';
|
||||
|
||||
// Voice-rule labels and semantic tones per spec §6 / project_design_system.md.
|
||||
// Labels in Minstrel's voice, and their semantic tones.
|
||||
// Each row is the contract: input status -> rendered label + data-tone attr.
|
||||
const CASES = [
|
||||
{ status: 'pending', label: 'Awaiting review', tone: 'warning' },
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
}
|
||||
|
||||
// "Matches your taste in shoegaze and dream pop." — the reason line when the
|
||||
// candidate's own tags overlap the taste profile (#2377). Preferred over seed
|
||||
// candidate's own tags overlap the taste profile. Preferred over seed
|
||||
// attribution because it describes the MUSIC ("sounds like what you like")
|
||||
// rather than the graph ("adjacent to something you played"), which is the
|
||||
// whole point of slice 6. Falls back when there are no matched tags, which is
|
||||
// the common case: coverage is partial by nature (#2376).
|
||||
// rather than the graph ("adjacent to something you played"). Falls back
|
||||
// when there are no matched tags, which is the common case: coverage is
|
||||
// partial by nature.
|
||||
function reasonText(s: ArtistSuggestion): string {
|
||||
const tags = s.matched_tags ?? [];
|
||||
if (tags.length === 0) return attributionText(s.attribution);
|
||||
@@ -148,9 +148,9 @@
|
||||
|
||||
{#if !query.isPending && suggestions.length === 0}
|
||||
<!--
|
||||
An empty deck used to mean one thing — no listening signal yet. With
|
||||
snoozing it can also mean "you parked them all", and telling that user to
|
||||
go listen to something would be wrong advice.
|
||||
An empty deck means no listening signal yet, or "you parked them all",
|
||||
and telling the second user to go listen to something would be wrong
|
||||
advice.
|
||||
-->
|
||||
<p class="text-text-secondary">
|
||||
{snoozes.length === 0
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('SuggestionFeed snooze (#2375)', () => {
|
||||
render(SuggestionFeed);
|
||||
await fireEvent.click(screen.getByRole('button', { name: /not right now/i }));
|
||||
// Still on screen — the disappearance happens on refetch, not under the
|
||||
// cursor (rule #24).
|
||||
// cursor.
|
||||
expect(screen.getByText('Outsider')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: /bring outsider back/i })).toBeInTheDocument();
|
||||
expect(screen.getByRole('status')).toHaveTextContent('Not right now');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" generics="Id extends string">
|
||||
// In-page tabs: one strip of buttons switching what a single page shows
|
||||
// (#5416). The same look as DiscoverTabs, which is route
|
||||
// In-page tabs: one strip of buttons switching what a single page shows.
|
||||
// The same look as DiscoverTabs, which is route
|
||||
// navigation and so stays links; this is for state inside one page, such as
|
||||
// Liked's Artists | Albums | Tracks or a queue's status filter.
|
||||
type Item = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
// The box every track list sits in (milestone 494). No fill of its own:
|
||||
// The box every track list sits in. No fill of its own:
|
||||
// the rows stripe themselves, and a filled box would hide the stripe.
|
||||
// Rows are direct children so `odd:` counts them.
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
// The one shape every track list in the web app draws (milestone 494):
|
||||
// The one shape every track list in the web app draws:
|
||||
// a lead column (track number, drag grip or cover), title over a muted
|
||||
// subtitle, then like, radio, add-to-queue, the track menu and the
|
||||
// duration, then whatever the list adds at the end (remove, a timestamp).
|
||||
// The wrappers — TrackRow, PlaylistTrackRow, HistoryRow — own behaviour
|
||||
// (selection, reorder, remove); this component owns how a row looks, so
|
||||
// the lists cannot drift apart again.
|
||||
// the lists cannot drift apart.
|
||||
import type { Snippet } from 'svelte';
|
||||
import { Plus, Radio } from 'lucide-svelte';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
} = $props();
|
||||
|
||||
const track = $derived(tracks[index]);
|
||||
// #5418: the file is gone. The row stays, greyed, so an album still reads
|
||||
// The file is gone. The row stays, greyed, so an album still reads
|
||||
// in order, but there is nothing to play, like or queue.
|
||||
const missing = $derived(!!track.unavailable);
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('TrackRow', () => {
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// #5418: a missing file stays in the list, greyed, with nothing to act on.
|
||||
// A missing file stays in the list, greyed, with nothing to act on.
|
||||
test('a missing file is marked, does not play, and offers no actions', async () => {
|
||||
const withMissing = [{ ...tracks[0], unavailable: true }, tracks[1]];
|
||||
render(TrackRow, { props: { tracks: withMissing, index: 0 } });
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import { formatBytes } from '#lib/utils/bytes.js';
|
||||
import type { Candidate, CandidateVerdict, GrabResult } from '#lib/api/types.js';
|
||||
|
||||
// Every release a want's last search found (M502 #5521), with the verdict
|
||||
// Every release a want's last search found, with the verdict
|
||||
// and the reasons behind it, so a person can see why nothing was taken and
|
||||
// take something anyway, or set a release aside for good.
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
import { errMessage } from '#lib/api/errors.js';
|
||||
import { pushToast } from '#lib/stores/toast.svelte.js';
|
||||
|
||||
// One block for a list of outside sources (#5607): cover art and tags had
|
||||
// the same panel pasted twice. Each source is a row: its name and what it
|
||||
// One block for a list of outside sources, shared by cover art and tags.
|
||||
// Each source is a row: its name and what it
|
||||
// supplies, a switch, a key field when it takes one, Save and Test.
|
||||
|
||||
type Provider = {
|
||||
@@ -64,7 +64,7 @@
|
||||
return words.length ? words.join(', ').replace(/^./, (c) => c.toUpperCase()) : '';
|
||||
}
|
||||
|
||||
// The operator's edits, kept across refetches until saved.
|
||||
// An admin's edits, kept across refetches until saved.
|
||||
let local = $state<Record<string, { enabled: boolean; apiKey: string }>>({});
|
||||
let results = $state<Record<string, TestResult>>({});
|
||||
let saving = $state<Record<string, boolean>>({});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import SettingsGroup from '#lib/components/settings/SettingsGroup.svelte';
|
||||
import SettingRow from '#lib/components/settings/SettingRow.svelte';
|
||||
|
||||
// Outgoing email (#5607): the mail server password resets and
|
||||
// Outgoing email: the mail server password resets and
|
||||
// notifications go out through. Send test mails the signed-in admin.
|
||||
|
||||
const client = useQueryClient();
|
||||
@@ -35,7 +35,7 @@
|
||||
// Filled from the saved config once, when it first loads, and again after
|
||||
// a save, so a refetch doesn't throw edits away. Until it has loaded the
|
||||
// form holds defaults, so Save stays off: saving then would write the
|
||||
// defaults over the real config (#5604).
|
||||
// defaults over the real config.
|
||||
let loaded = $state(false);
|
||||
$effect(() => {
|
||||
if (smtpQ.data && !loaded) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Drag-to-reorder for a row in a vertical list, shared by the playlist and
|
||||
// queue rows (#5393). Wraps @neodrag/svelte with the three things a list
|
||||
// queue rows. Wraps @neodrag/svelte with the three things a list
|
||||
// needs that neodrag does not do on its own:
|
||||
//
|
||||
// - The row moves in whole-row steps, so it visibly snaps into the slot it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" generics="V extends string | number">
|
||||
// A one-of-N choice as a row of joined buttons (#5595): Theme, Volume
|
||||
// A one-of-N choice as a row of joined buttons: Theme, Volume
|
||||
// leveling, Target loudness. Each option is a real radio, so it is
|
||||
// reachable by keyboard and named by its own text.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
// One setting (#188, #5595): its name and at most one short line on the
|
||||
// One setting: its name and at most one short line on the
|
||||
// left, its control at the end. `for` names the control's id so the name
|
||||
// labels it. `hint` is a line of text, or a snippet when it needs a link.
|
||||
// A control too wide to sit beside the name (a form field on a phone)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
// A settings page's groups laid out for the width it has (#5595 follow-up):
|
||||
// A settings page's groups laid out for the width it has:
|
||||
// one column on a phone or a narrow window, two side by side on a wide
|
||||
// screen, so a wide window shows more at once instead of one narrow strip
|
||||
// with empty space beside it. Each column stays narrow enough that a row's
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
// A group of settings on a Settings page (#5595): a titled card whose
|
||||
// rows are SettingRows, ruled apart. A settings page reads as a menu
|
||||
// (#188), so a group carries a title and, at most, one short line.
|
||||
// A group of settings on a Settings page: a titled card whose
|
||||
// rows are SettingRows, ruled apart. A settings page reads as a menu,
|
||||
// so a group carries a title and, at most, one short line.
|
||||
|
||||
let {
|
||||
title,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import ListContinuation from '#lib/components/ListContinuation.svelte';
|
||||
import type { ReleaseBlock } from '#lib/api/types.js';
|
||||
|
||||
// The Blocked tab (M502 #5521–#5523): releases the search will not take
|
||||
// The Blocked tab: releases the search will not take
|
||||
// again — set aside by a person, by what their files were, or by an
|
||||
// import's check that found they weren't the album; and, for a week,
|
||||
// releases given up on because they would not finish.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import Cover from '#lib/components/Cover.svelte';
|
||||
import type { WantArtist } from '#lib/api/types.js';
|
||||
|
||||
// One artist in the Collection's catalogue (#5572), as a poster: the
|
||||
// One artist in the Collection's catalogue, as a poster: the
|
||||
// picture, a bar of how many of their albums on the list are held, and
|
||||
// whether Minstrel follows them for new releases.
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
import CatalogueArtistCard from './CatalogueArtistCard.svelte';
|
||||
import type { WantArtist } from '#lib/api/types.js';
|
||||
|
||||
// The Collection's catalogue (#5572), its main page, an artist index: every
|
||||
// The Collection's catalogue, its main page, an artist index: every
|
||||
// artist on the list A–Z, each card showing how many of their albums are
|
||||
// held. An artist opens on their albums. The library's albums were put on
|
||||
// the list as held once (#5567), each matched to MusicBrainz (#5569); the
|
||||
// ones no match was found for are listed under Unmatched (#5579).
|
||||
// the list as held once, each matched to MusicBrainz; the
|
||||
// ones no match was found for are listed under Unmatched.
|
||||
|
||||
let filter = $state('');
|
||||
const q = $derived(filter.trim());
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
import { countOf } from '#lib/admin/queues.js';
|
||||
import type { AdminSummary, WantCounts } from '#lib/api/types.js';
|
||||
|
||||
// The Collection's sections, down the left (#5572): the catalogue of
|
||||
// The Collection's sections, down the left: the catalogue of
|
||||
// artists first, then the sections that show state. Activity carries a
|
||||
// second, accented count when downloads are waiting on a person. Unmatched
|
||||
// holds the library albums no MusicBrainz album matched (#5579). Upgrades
|
||||
// holds the albums held but wanted for a better copy (#5524). Reports,
|
||||
// holds the library albums no MusicBrainz album matched. Upgrades
|
||||
// holds the albums held but wanted for a better copy. Reports,
|
||||
// Duplicates, Suspect sources and Missing files are the library's health
|
||||
// queues (M504): their counts come from the admin summary and are
|
||||
// queues: their counts come from the admin summary and are
|
||||
// accented, as they wait on a person. Missing files counts tracks.
|
||||
|
||||
let { counts, summary }: { counts?: WantCounts; summary?: AdminSummary } = $props();
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
import ListContinuation from '#lib/components/ListContinuation.svelte';
|
||||
import type { Download, DownloadCondition, ImportEvidence } from '#lib/api/types.js';
|
||||
|
||||
// The Activity tab (M502 #5522): every download Minstrel took, running
|
||||
// The Activity tab: every download Minstrel took, running
|
||||
// ones first. A finished download is checked against MusicBrainz before it
|
||||
// is filed; one the check could not settle waits here for a person, who
|
||||
// imports it anyway or refuses it. A refused release is set aside (the
|
||||
// Blocked tab) and its album searched for again. A download that fails, or
|
||||
// that nobody shares, is retried and then given up the same way, held back
|
||||
// for a week; an imported one seeds, then is removed (#5523).
|
||||
// for a week; an imported one seeds, then is removed.
|
||||
|
||||
const client = useQueryClient();
|
||||
const downloadsStore = createDownloadsQuery();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import { relativeTime } from '#lib/utils/relativeTime.js';
|
||||
import type { Follow } from '#lib/api/types.js';
|
||||
|
||||
// The Following tab (M502 #5520): every artist whose new releases are
|
||||
// The Following tab: every artist whose new releases are
|
||||
// wanted, each on a release-type profile saying which kinds of release.
|
||||
|
||||
const client = useQueryClient();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import UnmatchedMatch from './UnmatchedMatch.svelte';
|
||||
import type { UnmatchedAlbum } from '#lib/api/types.js';
|
||||
|
||||
// The Collection's Unmatched section (#5579): the library albums no
|
||||
// The Collection's Unmatched section: the library albums no
|
||||
// MusicBrainz album matched by artist, title and tracks. Each can be
|
||||
// matched by hand, to a search result or a pasted link, and goes on the
|
||||
// list as held; or left off, as a local band's album MusicBrainz will
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { createCatalogueSearchQuery } from '#lib/api/catalogue.js';
|
||||
import type { CatalogueSearchResult, UnmatchedAlbum } from '#lib/api/types.js';
|
||||
|
||||
// Naming the MusicBrainz album an unmatched album is (#5579): a search of
|
||||
// Naming the MusicBrainz album an unmatched album is: a search of
|
||||
// MusicBrainz's albums, started from the album's own title and artist, or
|
||||
// a link pasted from musicbrainz.org. MusicBrainz takes a request a second,
|
||||
// so the search runs when it's asked for, not on each keystroke.
|
||||
|
||||
@@ -16,19 +16,19 @@
|
||||
import { needsYou, searched, wantStatus } from '#lib/wanted/wantStatus.js';
|
||||
import type { Want, WantState } from '#lib/api/types.js';
|
||||
|
||||
// Albums on the Collection's list (M502 #5520–#5522): the ones still
|
||||
// Albums on the Collection's list: the ones still
|
||||
// wanted, the missing ones wanted back, or, given an artist, every album
|
||||
// of theirs in the catalogue, held or not, under a header (#5572). Each
|
||||
// of theirs in the catalogue, held or not, under a header. Each
|
||||
// open want says what its last search found and how its download is
|
||||
// getting on; Releases lists every candidate with its verdict, and Search
|
||||
// runs one now. Taking a held album off leaves its files and stops it
|
||||
// being fetched back if they go.
|
||||
//
|
||||
// Upgrades (#5524) are held albums wanted for a better copy: below the
|
||||
// Upgrades are held albums wanted for a better copy: below the
|
||||
// quality set under Acquisition, or holding a video rip. They search and
|
||||
// download like an open want, and say what copy they have.
|
||||
//
|
||||
// The list reads like the library (#5572): artists A–Z, each with its
|
||||
// The list reads like the library: artists A–Z, each with its
|
||||
// albums oldest first, and each album's tracks a click away. The filter
|
||||
// narrows it to an artist or album by name, on the server, so it finds
|
||||
// what has not been scrolled to yet.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { errCode } from '#lib/api/errors.js';
|
||||
import type { WantTrack } from '#lib/api/types.js';
|
||||
|
||||
// An album's tracks under its row in the Wanted view (#5572): the
|
||||
// An album's tracks under its row in the Wanted view: the
|
||||
// library's own for an album it holds, a lost file marked, otherwise
|
||||
// MusicBrainz's standard edition of what is wanted.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user