Restrict catalog song rows when filtering by creator

Merged
SI
3d ago
+195-5

Filtering catalog songs by artistName currently filters the embedded account while retaining parent rows and their nonzero count. Use inner joins at both creator relations only when that filter is supplied, so the database query can restrict parent rows before pagination/counting. Unfiltered catalogs keep left joins, including songs without a linked creator. Also omit null account embeds from the returned artists array.

This is the current-main successor for the missing one-file repair in API688, exact oldhead adc40182726f41fd4ea073f9b972b4e83b11d6df, under Mono358. Base is actualmain1703112c. Original branch/PR remains unchanged; no bulk triage, valuation activation, schema/permission/auth change or new endpoint.

Verification at refreshed head: all77focused tests across16files pass again, and full ESLint plus formatting/whitespace checks pass. Three regressions failed on the original source and six adapter tests pass with the repair. The implementation and test bytes are identical to the prior reviewed8c685f35 source; only current-base verification prose changed. Prior whole-repository TypeScript comparison had211byte-identical baseline/candidate diagnostics with no added errors; that is historical source evidence, not a fresh whole-project typecheck claim. Exact new-head full CI passes:7,068tests/15skipped across1,280passingfiles/13skippedfiles, response-contract typecheck, formatting, lint and OAuth checks. Preview passes. Independent delta review at the exact refreshed head/tree reports no findings; no independent execution.

Evidence limit: tests run the actual installed Supabase query client with intercepted synthetic responses. They inspect request joins/filter/range/order/count and response mapping, without executing PostgREST or a database. Historical customer preview evidence belongs to original688; no new hosted fallback/rendering verification is claimed. Current Supabase join semantics support the query change. No customer/database/provider operation, credential inspection, permission/schema change, package change or manual deployment occurred.

Current candidate e1c6810c0f8bbab65cce0d142f6d518be8c7e43b, tree 5e82d014590f41749ba53e4aef8005a3ceaf994e, rebased onto actualmain 1703112ca52f816ded40a544f6bb988d0c5a9e41. Its instruction-only main delta is retained. This supersedes8c685f35 and its CI/review receipts. Coordinator retains source merge/old-PR closure and original acceptance decisions; no merge or production claim.

Refreshed acceptance packet: local77tests/16files rerun and full lint pass. Source/test byte proof confirms no runtime/test change from prior review. Records original688 acceptance and coordinator merge reassessment remain separate; no second merge attempt by builder.