Revert "test: DELIBERATE BREAK, expected red, reverted next (#8300)"

This reverts commit 2bfe6036e3.
This commit is contained in:
2026-12-02 16:59:31 -05:00
parent 741594dea2
commit b0c05891a4
10 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -873,7 +873,7 @@ export async function removeWrongSlotFiles(
}
export async function dismissDuplicateGroup(id: string): Promise<void> {
await api.post(`/api/admin/library/duplicates/${id}/dismiss`, {});
await api.post(`/api/admin/library/duplicates/${encodeURIComponent(id)}/dismiss`, {});
}
// Needs a file ------------------------------------------------------
+1 -1
View File
@@ -16,6 +16,6 @@ import type { Page } from './types';
export function pageGetNextPageParam<T>() {
return (last: Page<T>): number | undefined => {
const loaded = last.offset + last.items.length;
return loaded === last.total ? undefined : loaded; /* DELIBERATE BREAK */
return loaded >= last.total ? undefined : loaded;
};
}
+1 -1
View File
@@ -15,7 +15,7 @@ export type FlagParams = {
export async function flagTrack(params: FlagParams): Promise<QuarantineRow> {
const body: FlagParams = { track_id: params.track_id, reason: params.reason };
if (params.notes !== undefined) /* DELIBERATE BREAK */ body.notes = params.notes;
if (params.notes && params.notes.length > 0) body.notes = params.notes;
return api.post<QuarantineRow>('/api/quarantine', body);
}
+1 -1
View File
@@ -5,7 +5,7 @@
// email-link reset flow (/forgot-password, /reset-password/<token>) is by
// definition entered without a session.
const PUBLIC_ROUTES = new Set(['/login', '/register', '/forgot-password']);
const PUBLIC_PREFIXES = ['/reset-password']; /* DELIBERATE BREAK */
const PUBLIC_PREFIXES = ['/reset-password/'];
export function isPublicRoute(pathname: string): boolean {
if (PUBLIC_ROUTES.has(pathname)) return true;
+2 -1
View File
@@ -32,7 +32,8 @@
} else if (e.key === ' ' || e.key === 'Enter') {
// Reorder activates via arrow keys, not Space/Enter. Prevent
// default so Space doesn't scroll the queue list and Enter doesn't
// fire the button's no-op click. /* DELIBERATE BREAK */
// fire the button's no-op click.
e.preventDefault();
}
}
</script>
+1 -1
View File
@@ -5,7 +5,7 @@
let { state }: Props = $props();
</script>
{#if state === 'in_progress' || state === 'pending'}
{#if state === 'in_progress'}
<span class="inline-flex items-center gap-1 text-xs text-action-primary">
<Loader2 size={12} class="animate-spin" />
Processing
+1 -1
View File
@@ -2,7 +2,7 @@
// `h:mm:ss` otherwise. Negative values clamp to zero (callers shouldn't
// pass them, but the UI shouldn't crash if they do).
export function formatDuration(seconds: number): string {
const total = Math.floor(Math.abs(seconds)); /* DELIBERATE BREAK */
const total = Math.max(0, Math.floor(seconds));
const h = Math.floor(total / 3600);
const m = Math.floor((total % 3600) / 60);
const s = total % 60;
+2 -2
View File
@@ -295,7 +295,7 @@ export function toggleShuffle(): void {
// Fisher-Yates shuffle over _queue[_index+1 .. end].
const arr = _queue.slice();
for (let j = arr.length - 1; j > _index; j--) {
const r = Math.floor(_rng() * (j + 1)); /* DELIBERATE BREAK */
const r = Math.floor(_rng() * (j - _index)) + _index + 1;
[arr[j], arr[r]] = [arr[r], arr[j]];
}
_queue = arr;
@@ -533,7 +533,7 @@ export function removeFromQueue(idx: number): void {
// pause on the now-last remaining track at position 0 — don't
// auto-play a track the user already heard.
_index = next.length - 1;
_state = 'loading'; /* DELIBERATE BREAK */
_state = 'paused';
_position = 0;
_duration = 0;
_error = null;
+1 -1
View File
@@ -296,7 +296,7 @@
{#if !isOwner}· by {pl.owner_username}{/if}
</p>
{#snippet tools()}
{#if pl.kind === 'system' && pl.system_variant}
{#if pl.refreshable && pl.system_variant}
<button
type="button"
disabled={refreshingSystem}
+1 -1
View File
@@ -35,7 +35,7 @@
function errorMessageFor(code: string): string {
switch (code) {
case 'invite_required':
return 'That invite token is invalid, expired, or already used.'; /* DELIBERATE BREAK */
return 'An invite token is needed to register. Ask an admin of this server for one.';
case 'invite_invalid':
return 'That invite token is invalid, expired, or already used.';
case 'setup_token_invalid':