Repository navigation
feat(api): offer only creatable admin templates - #1944
Conversation
The admin v2 template list still offers TMDB Discover and franchise templates, which no admin import route accepts. These tests describe the list that only holds creatable templates, keep the v1 list byte-identical, and restate #193 S5 for the route. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The admin v2 template list offered TMDB Discover and franchise templates that no admin import route accepts, so a gallery card for one could never be created. The list now uses the same filter as the personal list and drops categories left empty. Starter packs read those templates from the bundle summaries instead. The v1 list is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The summary, comment and docs said the list holds what an admin import route can create, but admins can also import from Trakt, which the filter leaves out. Name the three sources it actually keeps. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rged An approval lives only on the pull request that needs it. The #1615 removals merged into feat/collections-revamp with #1875, so these entries now match no change and fail the contract gate. The record stays in the file's history; the final merge into main carries them again. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The Suggested line: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
…at/api-admin-creatable-templates # Conflicts: # contracts/api/v2/fixtures/get_system_info_ok.json
Problem
Related issue: #192
Validation tasks: changes #194 A1 (Not run; the admin template gallery no longer lists Discover/Franchise summaries, and Starter packs stays the way to apply them); reaches #193 S5 (Pass; acting-admin authorization unchanged and now has its own test)
Admin > Collections > Browse Templates lists every built-in template, TMDB Discover and TMDB Franchise templates included. No route creates a single collection from those two sources, so their cards can't create anything: each shows a summary and a pointer to Starter packs. Now that Starter packs list them (#1941), the gallery cards are redundant.
GET /api/v2/admin/collections/templatesnow returns only templates with anmdblist,tmdbortmdb_listsource, the same set the personal template list already offers. Discover and Franchise templates stay available to admins through Starter packs.Stacked on #1941 (
feat(collections): Starter packs replace template bundles). It must merge after #1941: before that PR, the gallery's bundle view looked up Discover and Franchise templates in this list.Approach
creatableCollectionTemplatesand now also wraps the admin list. It keeps templates by source, drops categories left empty, and keeps the rest in order./api/v1/admin/collections/templateshas its own handler and doesn't change. A new test checks that its output is byte-identical to the full built-in catalog.docs/catalog-api.mddescribes the admin list.docs/architecture/collection-templates.mdnotes that both v2 template lists leave out Discover and Franchise templates.feat/collections-revampcommit that drops the Personal collections: owner-only management and a single share-with-all-profiles switch #1615 breaking-change approvals. This stack branched before that commit landed, and this is the stack's first PR to changeopenapi.json, so without it the contract diff against the base fails on approvals that match no change. The file now matchesfeat/collections-revamp.Apple and Android clients don't call this route, jellycompat has no equivalent, and the user manual needs no change.
Validation
make lint-changedagainstfeat/collection-starter-packsare clean.make test-gopasses.403with no catalog read for a regular account and for a non-primary profile on an admin account. The personal list test is unchanged.apiv2,api/handlersandcollectionspackages ran against a freshly migrated database. Two DB-backed tests this branch doesn't touch fail there:TestAdminSubtitleListPageDBandTestCatalogTransferPersistsJobsAndSignedLink. They fail the same way on the base branch.verify-apiv2-openapi,verify-apiv2-contract,verify-apiv2-fixtures,verify-apiv2-web-types,verify-route-inventory,verify-migration-ledgerandTestCommittedArtifactMatchesRouterpass. The contract diff reports no change againstfeat/collection-starter-packsand nothing breaking without approval againstfeat/collections-revamp.tsc -bandmake test-webpass.make verify-local-pathspasses.Risks
/api/v2(not yet locked) now returns fewer templates. A client that read Discover or Franchise templates from it should read the bundle summaries fromlistAdminCollectionTemplateBundlesinstead. No known client does.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Filter v2 admin template list to only creatable templates
Applies the shared creatable-template filter to GET /api/v2/admin/collections/templates in admin_collection_extras.go. The filter keeps only
mdblist,tmdb, andtmdb_listsources and drops categories left empty, so TMDB Discover and TMDB collection templates (bundle-only) no longer appear.creatableCollectionTemplatesand reuses it in personal_collections_lifecycle.go; personal template behavior is unchanged.tmdb_discoverortmdb_collectiontemplates; v1 remains unchanged.Macroscope summarized 93a4765.