From b9faeac009044fd7ebee30c797ea5ccfc75f65ad Mon Sep 17 00:00:00 2001 From: "[._.]/ Adam Eivy" Date: Tue, 21 Jul 2026 18:26:49 -0700 Subject: [PATCH 1/3] refactor: route inline /api fetch calls through client service layer (#2838) --- .changelog/NEXT.md | 1 + client/src/components/apps/tabs/GsdTab.jsx | 19 +-- .../components/settings/LocalSetupPanel.jsx | 28 ++--- .../writers-room/StagePromptModelPicker.jsx | 19 +-- client/src/pages/ImageGen.jsx | 17 +-- client/src/pages/PromptManager.jsx | 112 +++++++----------- client/src/services/README.md | 1 + client/src/services/api.js | 1 + client/src/services/apiApps.js | 2 +- client/src/services/apiGSD.js | 2 +- client/src/services/apiImageVideo.js | 44 ++++++- client/src/services/apiPrompts.js | 58 +++++++++ 12 files changed, 177 insertions(+), 127 deletions(-) create mode 100644 client/src/services/apiPrompts.js diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md index 766bc5e51..a5c577191 100644 --- a/.changelog/NEXT.md +++ b/.changelog/NEXT.md @@ -37,4 +37,5 @@ - **[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 `