fix: WantList's prop is list, not state, which Svelte reads as the $state store; the length test's 4-minute case fits within 3% (M502 #5522)
release / govulncheck (push) Successful in 16s
release / web (push) Failing after 1m40s
release / go (push) Successful in 1m53s
release / integration (push) Successful in 5m38s
release / android (push) Successful in 5m39s
release / Build signed APK (releases and dev) (push) Successful in 5m51s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 10:44:21 -04:00
co-authored by Claude Opus 5.5
parent ebbc49b902
commit f268b4df09
6 changed files with 12 additions and 10 deletions
+3 -1
View File
@@ -166,7 +166,9 @@ func TestLengthFits(t *testing.T) {
file, track int file, track int
ok bool ok bool
}{ }{
{240000, 244000, true}, {240000, 246000, false}, {600000, 615000, true}, {600000, 620000, false}, // Short tracks get the 5s floor; longer ones 3% of the track.
{120000, 125000, true}, {120000, 126000, false},
{240000, 246000, true}, {240000, 248000, false}, {600000, 615000, true}, {600000, 620000, false},
{0, 240000, false}, {240000, 0, true}, {0, 240000, false}, {240000, 0, true},
} { } {
if got := lengthFits(c.file, c.track); got != c.ok { if got := lengthFits(c.file, c.track); got != c.ok {
@@ -15,10 +15,10 @@
// what its last search found and how its download is getting on; Releases // what its last search found and how its download is getting on; Releases
// lists every candidate with its verdict, and Search runs one now. // lists every candidate with its verdict, and Search runs one now.
let { state }: { state: WantState } = $props(); let { list }: { list: WantState } = $props();
const client = useQueryClient(); const client = useQueryClient();
const wantsStore = $derived(createWantsQuery(state)); const wantsStore = $derived(createWantsQuery(list));
const wants = $derived($wantsStore); const wants = $derived($wantsStore);
const items = $derived((wants.data?.pages ?? []).flatMap((p) => p.items) as Want[]); const items = $derived((wants.data?.pages ?? []).flatMap((p) => p.items) as Want[]);
@@ -156,12 +156,12 @@
<div class="rounded-lg border border-border bg-surface p-6 text-center"> <div class="rounded-lg border border-border bg-surface p-6 text-center">
<ListChecks size={28} strokeWidth={1} class="mx-auto text-text-muted" /> <ListChecks size={28} strokeWidth={1} class="mx-auto text-text-muted" />
<p class="mt-3 text-text-primary"> <p class="mt-3 text-text-primary">
{#if state === 'held'}Nothing on the list has been held yet. {#if list === 'held'}Nothing on the list has been held yet.
{:else if state === 'missing'}No missing albums are wanted back. {:else if list === 'missing'}No missing albums are wanted back.
{:else}Nothing is wanted.{/if} {:else}Nothing is wanted.{/if}
</p> </p>
<p class="mt-1 text-sm text-text-secondary"> <p class="mt-1 text-sm text-text-secondary">
{#if state === 'missing'} {#if list === 'missing'}
An album whose files stay missing past the grace window on the Missing files page lands here. An album whose files stay missing past the grace window on the Missing files page lands here.
{:else} {:else}
A request you approve, a new release from a followed artist, or an album whose files went A request you approve, a new release from a followed artist, or an album whose files went
@@ -83,7 +83,7 @@ function setup(
vi.mocked(createCandidatesQuery).mockReturnValue( vi.mocked(createCandidatesQuery).mockReturnValue(
mockQuery({ data: [] }) as unknown as ReturnType<typeof createCandidatesQuery> mockQuery({ data: [] }) as unknown as ReturnType<typeof createCandidatesQuery>
); );
return render(WantList, { state }); return render(WantList, { list: state });
} }
describe('WantList', () => { describe('WantList', () => {
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted')}</title></svelte:head>
<WantList state="wanted" /> <WantList list="wanted" />
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted · Held')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted · Held')}</title></svelte:head>
<WantList state="held" /> <WantList list="held" />
+1 -1
View File
@@ -5,4 +5,4 @@
<svelte:head><title>{pageTitle('Wanted · Missing files')}</title></svelte:head> <svelte:head><title>{pageTitle('Wanted · Missing files')}</title></svelte:head>
<WantList state="missing" /> <WantList list="missing" />