feat(settings): add variant storage backend setting (BE-4 follow-up)#483
Merged
Conversation
BE-4 added the `variant_storage` config + backend resolution but no admin UI
to set it, so the variant pipeline could not be enabled through normal admin
flow. This adds the missing entry point.
- A "Variant storage" card above the storage tabs in /admin/settings/storages
with a Select (Off / S3 / R2; default Off), a helper line ("configure the
backend in its tab first"), and an empty-state note when disabled.
- GET/PUT /api/v1/settings/variant-storage endpoints, VariantStorageInfo type,
toVariantStorageInfo transform, and updateVariantStorageConfig (upsert, so it
works on installs that predate the seed key).
- i18n keys for zh / en / ja / zh-TW.
Empty (Off) keeps the variant pipeline disabled, matching the loader's dormant
fallback to preview/blurhash — so it's safe regardless of backfill state.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 30, 2026
pull Bot
pushed a commit
to candies404/PicImpact
that referenced
this pull request
May 30, 2026
Expose the variant preprocessing queue (the engine from besscroft#481) over the protected /api/v1/preprocess-tasks routes, mirroring /api/v1/tasks: preview-count, runs, runs/:id, runs (create), runs/:id/kick, runs/:id/cancel, tick. Delegates to image-preprocess-service.ts; scope carries the `force` flag; surfaces "not configured" / "already active" / "no images" as 4xx. This is the drivable API the admin /tasks button and the CLI backfill (following) use to create and drain a backfill run; it also enables the real end-to-end backfill test once variant_storage is configured (besscroft#483). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Variant storage backend setting — the admin entry point to enable the variant pipeline
BE-4 (#477) added the
variant_storageconfig key + backend resolution, but there was no admin UI to set it — so the variant pipeline couldn't be turned on through normal admin flow (@manjusaka flagged this). This adds the missing entry point. It's the last gate before the variant path (problem ⑤) can activate.What
/admin/settings/storages(it's a cross-backend global choice, not per-tab):Select: Off / S3 / R2 (default Off).GET/PUT /api/v1/settings/variant-storage,VariantStorageInfotype,toVariantStorageInfotransform,updateVariantStorageConfig(usesupsertso it works on installs predating the seed key).Safety
Off keeps the pipeline disabled, matching the loader's dormant preview/blurhash fallback — safe regardless of backfill state. Once set to S3/R2 (with that backend configured) and BE-3 backfill runs,
variantBaseUrlresolves and the gallery serves variants.Design / UX
Placement, control, helper text, empty state, and i18n follow @Picimpact-Design's guidance — requesting her design/a11y/i18n review.
Verification
tsc --noEmit: no errors in changed files.eslint --fix: clean (0 errors). All 4 message JSON files parse.🤖 Generated with Claude Code