From f3b25f91863e96cfdf6ed3d60da818e314e33069 Mon Sep 17 00:00:00 2001 From: "[._.]/ Adam Eivy" Date: Tue, 21 Jul 2026 18:20:04 -0700 Subject: [PATCH 1/2] refactor: paginate album/artist/author list endpoints via parsePagination (#2840) --- .changelog/NEXT.md | 1 + server/routes/albums.js | 8 +++++--- server/routes/albums.test.js | 13 +++++++++++++ server/routes/artists.js | 8 +++++--- server/routes/artists.test.js | 13 +++++++++++++ server/routes/authors.js | 8 +++++--- server/routes/authors.test.js | 13 +++++++++++++ 7 files changed, 55 insertions(+), 9 deletions(-) diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md index 766bc5e51b..2c12a49986 100644 --- a/.changelog/NEXT.md +++ b/.changelog/NEXT.md @@ -35,6 +35,7 @@ ## Internal +- **[issue-2840] Paginate album/artist/author list endpoints** — `GET /api/albums`, `/api/artists`, and `/api/authors` now accept `limit`/`offset` via the shared `parsePagination`/`paginateArray` helpers, returning the same `{ items, total, limit, offset }` envelope the notes/mood-board/loras list endpoints use when a pagination param is present. Unparameterized requests still return the full array, so existing callers are unaffected. - **[issue-2832] Split the boot-schema DDL into per-domain modules** — the ~1265-line inline `CREATE TABLE`/`CREATE INDEX`/trigger block in `ensureSchemaImpl()` (`server/lib/db.js`) is extracted into per-domain modules under `server/lib/db/schema/` (catalog, media, universes, writers-room, pipeline, privacy, tribe, audit, …), each exporting a statement array; `ensureSchemaImpl` is now a thin composer. Statement text and order are byte-identical, so the composed schema is unchanged. - **[issue-2834] Split the ~1990-line `VideoGen.jsx` into hooks + subcomponents** — the client-side batch-queue orchestration moves into `useVideoGenQueue`, the pure model-memory / FFLF frame-budget / mode-compat helpers into `lib/videoGenParams.js`, and four presentational blocks into `components/videoGen/` (`RuntimeFingerprint`, `ModelRepairBanner`, `VideoPreviewPanel`, `VideoGenGallery`). The inline runtime-status `fetch()` now routes through a `getVideoGenRuntimeStatus` service wrapper, and the Seed input gains a proper `