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:
+33
-33
@@ -21,7 +21,7 @@ import type {
|
||||
PlaybackErrorResolution
|
||||
} from './types';
|
||||
|
||||
// Admin summary (#5605) ---------------------------------------------------
|
||||
// Admin summary ---------------------------------------------------
|
||||
|
||||
export async function getAdminSummary(): Promise<AdminSummary> {
|
||||
return api.get<AdminSummary>('/api/admin/summary');
|
||||
@@ -38,7 +38,7 @@ export function createAdminSummaryQuery() {
|
||||
});
|
||||
}
|
||||
|
||||
// Admin status (M504): who is listening, downloads, the library and disk,
|
||||
// Admin status: who is listening, downloads, the library and disk,
|
||||
// and the server, for the Overview below its verdict. Polled while open.
|
||||
|
||||
export async function getAdminStatus(): Promise<AdminStatus> {
|
||||
@@ -68,7 +68,7 @@ export async function listAdminRequests(
|
||||
);
|
||||
}
|
||||
|
||||
// Approving puts the request on the wanted list (M502 #5520). An artist
|
||||
// Approving puts the request on the wanted list. An artist
|
||||
// request is followed on profileId, or the default profile when omitted.
|
||||
export async function approveRequest(id: string, profileId?: string): Promise<MusicRequest> {
|
||||
return api.post<MusicRequest>(
|
||||
@@ -93,7 +93,7 @@ export function createAdminRequestsQuery(status?: RequestStatus) {
|
||||
queryFn: () => listAdminRequests(status),
|
||||
// Only the 'approved' tab needs polling — that's where in-flight
|
||||
// ingests live. Other tabs (pending/rejected/completed) are static
|
||||
// until the operator acts on them.
|
||||
// until an admin acts on them.
|
||||
refetchInterval: (query) => {
|
||||
if (status !== 'approved') return false;
|
||||
const rows = query.state.data as MusicRequest[] | undefined;
|
||||
@@ -280,14 +280,14 @@ export function createCoverageQuery() {
|
||||
});
|
||||
}
|
||||
|
||||
// Fingerprint backfill (#3908) --------------------------------------------
|
||||
// Fingerprint backfill --------------------------------------------
|
||||
|
||||
export type FingerprintCoverage = {
|
||||
total: number;
|
||||
fingerprinted: number;
|
||||
rejected: number;
|
||||
pending: number;
|
||||
// False when the operator has switched fingerprinting off (#3913): pending
|
||||
// False when an admin has switched fingerprinting off: pending
|
||||
// then never shrinks, and nothing should read as progress.
|
||||
enabled: boolean;
|
||||
};
|
||||
@@ -307,7 +307,7 @@ export function createFingerprintCoverageQuery() {
|
||||
});
|
||||
}
|
||||
|
||||
// Fingerprinting settings (#3913) ------------------------------------------
|
||||
// Fingerprinting settings ------------------------------------------
|
||||
|
||||
export type FingerprintSettings = {
|
||||
enabled: boolean;
|
||||
@@ -317,7 +317,7 @@ export type FingerprintSettings = {
|
||||
acoustic_max_bit_error_rate: number;
|
||||
backfill_concurrency: number;
|
||||
sweep_interval_hours: number;
|
||||
// Lets the duplicate resolver act on its own (M498): merge copies no
|
||||
// Lets the duplicate resolver act on its own: merge copies no
|
||||
// release needs.
|
||||
auto_resolve: boolean;
|
||||
};
|
||||
@@ -332,7 +332,7 @@ export async function updateFingerprintSettings(
|
||||
return api.put<FingerprintSettings>('/api/admin/library/fingerprint-settings', s);
|
||||
}
|
||||
|
||||
// Loudness analysis (#4995) -------------------------------------------------
|
||||
// Loudness analysis -------------------------------------------------
|
||||
|
||||
export type LoudnessCoverage = {
|
||||
total: number;
|
||||
@@ -342,7 +342,7 @@ export type LoudnessCoverage = {
|
||||
silent: number;
|
||||
unreadable: number;
|
||||
pending: number;
|
||||
// False when the operator has switched analysis off: pending then never
|
||||
// False when an admin has switched analysis off: pending then never
|
||||
// shrinks, and nothing should read as progress.
|
||||
enabled: boolean;
|
||||
};
|
||||
@@ -354,7 +354,7 @@ export async function getLoudnessCoverage(): Promise<LoudnessCoverage> {
|
||||
export type LoudnessSettings = {
|
||||
enabled: boolean;
|
||||
backfill_concurrency: number;
|
||||
/** Disk for the leveled copies rendered for Sonos/UPnP speakers (#5001). */
|
||||
/** Disk for the leveled copies rendered for Sonos/UPnP speakers. */
|
||||
leveled_cache_mb: number;
|
||||
};
|
||||
|
||||
@@ -366,7 +366,7 @@ export async function updateLoudnessSettings(s: LoudnessSettings): Promise<Loudn
|
||||
return api.put<LoudnessSettings>('/api/admin/library/loudness-settings', s);
|
||||
}
|
||||
|
||||
// The library's folders (#6129) -----------------------------------------------
|
||||
// The library's folders -----------------------------------------------
|
||||
|
||||
export type LibraryFolder = {
|
||||
path: string;
|
||||
@@ -395,7 +395,7 @@ export async function updateLibraryFolders(folders: LibraryFolderChange[]): Prom
|
||||
return api.put<LibraryFolders>('/api/admin/library/folders', { folders });
|
||||
}
|
||||
|
||||
// AcoustID recording-id lookup (M401) ---------------------------------------
|
||||
// AcoustID recording-id lookup ---------------------------------------
|
||||
|
||||
export type AcoustIDSettings = {
|
||||
enabled: boolean;
|
||||
@@ -529,7 +529,7 @@ export function createCoverProvidersQuery() {
|
||||
// Tag-enrichment providers -------------------------------------------------
|
||||
// Parallel to the cover-art providers surface, over /api/admin/tag-sources.
|
||||
// Independent settings so a new folksonomy source is added without touching
|
||||
// art config (#1490).
|
||||
// art config.
|
||||
|
||||
export type TagProviderCapability = 'track_tags';
|
||||
|
||||
@@ -656,7 +656,7 @@ export async function updateUserAutoApprove(id: string, autoApprove: boolean): P
|
||||
return api.put<AdminUser>(`/api/admin/users/${id}/auto-approve`, { auto_approve: autoApprove });
|
||||
}
|
||||
|
||||
// Flip an account's diagnostics/debug-reporting opt-in (M9). Admin-set;
|
||||
// Flip an account's diagnostics/debug-reporting opt-in. Admin-set;
|
||||
// the client obeys it (with a local per-device OFF switch).
|
||||
export async function updateUserDebugMode(id: string, enabled: boolean): Promise<AdminUser> {
|
||||
return api.put<AdminUser>(`/api/admin/users/${id}/debug-mode`, { enabled });
|
||||
@@ -709,7 +709,7 @@ export function createSMTPConfigQuery() {
|
||||
});
|
||||
}
|
||||
|
||||
// Device diagnostics (M9) ---------------------------------------------------
|
||||
// Device diagnostics ---------------------------------------------------
|
||||
|
||||
// Coarse event category. The finer event sub-type lives inside `payload`.
|
||||
export type DiagnosticKind =
|
||||
@@ -773,7 +773,7 @@ export function createAdminDiagnosticsQuery(f: DiagnosticsFilter) {
|
||||
return createQuery({
|
||||
queryKey: qk.adminDiagnostics(f as Record<string, string | number | undefined>),
|
||||
queryFn: () => listAdminDiagnostics(f),
|
||||
// The operator enables debug then watches events stream in; a short
|
||||
// An admin enables debug then watches events stream in; a short
|
||||
// poll keeps the timeline live without manual refresh.
|
||||
refetchInterval: 10_000,
|
||||
staleTime: 5_000
|
||||
@@ -788,7 +788,7 @@ export function createDiagnosticDevicesQuery(userId?: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// Trusted-proxy depth (#2453) ---------------------------------------------
|
||||
// Trusted-proxy depth ---------------------------------------------
|
||||
|
||||
// detected_client_ip / forwarded_chain / remote_addr describe THIS request
|
||||
// under the current setting, so the admin card can be verified rather than
|
||||
@@ -823,7 +823,7 @@ export async function updatePublicUrl(publicUrl: string): Promise<NetworkSetting
|
||||
});
|
||||
}
|
||||
|
||||
// Duplicates report (#3912) -------------------------------------------------
|
||||
// Duplicates report -------------------------------------------------
|
||||
|
||||
export const DUPLICATES_PAGE_SIZE = 25;
|
||||
|
||||
@@ -842,8 +842,8 @@ export function duplicatesNextOffset(last: AdminDuplicatesResponse): number | un
|
||||
return last.groups.length === 0 || loaded >= last.total ? undefined : loaded;
|
||||
}
|
||||
|
||||
// Loads as the page scrolls (rule 172), one tab at a time. Polls so a sweep
|
||||
// or resolver pass finishing shows up while the operator is on the page.
|
||||
// Loads as the page scrolls, one tab at a time. Polls so a sweep
|
||||
// or resolver pass finishing shows up while an admin is on the page.
|
||||
export function createDuplicatesQuery(view: DuplicatesView = 'review') {
|
||||
return createInfiniteQuery({
|
||||
queryKey: qk.adminDuplicates(view),
|
||||
@@ -866,7 +866,7 @@ export function resolvedDuplicatesNextOffset(last: ResolvedDuplicatesResponse):
|
||||
return last.items.length === 0 || loaded >= last.total ? undefined : loaded;
|
||||
}
|
||||
|
||||
// What the resolver did by itself (M498), newest first.
|
||||
// What the resolver did by itself, newest first.
|
||||
export function createResolvedDuplicatesQuery() {
|
||||
return createInfiniteQuery({
|
||||
queryKey: qk.adminResolvedDuplicates(),
|
||||
@@ -881,9 +881,9 @@ export async function runDuplicateSweep(): Promise<{ started: boolean }> {
|
||||
return api.post<{ started: boolean }>('/api/admin/library/duplicates/sweep', {});
|
||||
}
|
||||
|
||||
// Merges a group into the copy chosen to keep, removing the other copies' files.
|
||||
// survivor_track_id is the operator's choice; the server checks it belongs to
|
||||
// the group.
|
||||
// Merges a group into the copy chosen to keep, removing the other copies'
|
||||
// files. survivor_track_id is an admin's choice; the server checks it belongs
|
||||
// to the group.
|
||||
export async function mergeDuplicateGroup(
|
||||
id: string,
|
||||
body: { survivor_track_id: string }
|
||||
@@ -894,7 +894,7 @@ export async function mergeDuplicateGroup(
|
||||
);
|
||||
}
|
||||
|
||||
// One recording in several of an album's slots (#6184): keep the copy whose
|
||||
// One recording in several of an album's slots: keep the copy whose
|
||||
// title it is, or none (empty keep_track_id), and fetch the album again.
|
||||
export async function refetchDuplicateGroup(
|
||||
id: string,
|
||||
@@ -910,7 +910,7 @@ export async function dismissDuplicateGroup(id: string): Promise<void> {
|
||||
await api.post(`/api/admin/library/duplicates/${encodeURIComponent(id)}/dismiss`, {});
|
||||
}
|
||||
|
||||
// Missing files (#2527) -----------------------------------------------------
|
||||
// Missing files -----------------------------------------------------
|
||||
|
||||
export async function listMissingFiles(
|
||||
offset: number = 0,
|
||||
@@ -936,7 +936,7 @@ export function createMissingFilesQuery(offset: number = 0, limit: number = 50)
|
||||
});
|
||||
}
|
||||
|
||||
// Suspect sources (#5410) --------------------------------------------------
|
||||
// Suspect sources --------------------------------------------------
|
||||
|
||||
export const SUSPECT_SOURCES_PAGE_SIZE = 50;
|
||||
|
||||
@@ -952,7 +952,7 @@ export function suspectSourcesNextOffset(last: AdminSuspectResponse): number | u
|
||||
return loaded >= last.total ? undefined : loaded;
|
||||
}
|
||||
|
||||
// Loads as the page scrolls (rule 172). Changes only when files are added or
|
||||
// Loads as the page scrolls. Changes only when files are added or
|
||||
// removed, so it is not re-fetched on every focus.
|
||||
export function createSuspectSourcesQuery() {
|
||||
return createInfiniteQuery({
|
||||
@@ -965,12 +965,12 @@ export function createSuspectSourcesQuery() {
|
||||
}
|
||||
|
||||
// 'fine' lets a flagged track back into radio and the mixes; 'suspect' holds
|
||||
// it back again (M498 #5439).
|
||||
// it back again.
|
||||
export async function setSuspectVerdict(trackId: string, verdict: SuspectVerdict): Promise<void> {
|
||||
await api.put(`/api/admin/library/suspect-sources/${encodeURIComponent(trackId)}`, { verdict });
|
||||
}
|
||||
|
||||
// Missing-file re-acquisition (#2527 / milestone #290) ----------------------
|
||||
// Missing-file re-acquisition ----------------------
|
||||
|
||||
export type ReacquisitionSettings = {
|
||||
enabled: boolean;
|
||||
@@ -992,7 +992,7 @@ export async function updateReacquisitionSettings(
|
||||
return api.put<ReacquisitionSettings>('/api/admin/library/reacquisition', s);
|
||||
}
|
||||
|
||||
// Notification emails (M489 #5346): when the grouped emails go out.
|
||||
// Notification emails: when the grouped emails go out.
|
||||
export type NotificationEmailSettings = {
|
||||
summary_hour: number;
|
||||
batch_window_minutes: number;
|
||||
@@ -1008,7 +1008,7 @@ export async function updateNotificationEmailSettings(
|
||||
return api.put<NotificationEmailSettings>('/api/admin/notification-email', s);
|
||||
}
|
||||
|
||||
// Indexers and download clients (M502 #5518) -------------------------------
|
||||
// Indexers and download clients -------------------------------
|
||||
|
||||
export type AcquisitionProtocol = 'prowlarr' | 'torznab' | 'qbittorrent' | 'exchange';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user