Repository navigation
fix(collections): repair broken builtin collection templates - #331
Conversation
A live audit of the builtin template catalog (all 40 MDBList URLs and all 10 TMDB franchise IDs fetched) found two dead sources, a silent bundle-apply collision, and several templates whose defaults contradict their descriptions: - Repoint mdblist_misc_a24 and mdblist_misc_criterion_collection to live lists; the original irvingbeano/shtluck lists were deleted on MDBList (404), so every sync of those collections failed. - Retitle mdblist_charts_popular_movies to "IMDb MovieMeter Top 100". It shared the "popular-movies" title slug with tmdb_popular_movies, and bundle apply dedupes by slug per library, so applying all_defaults silently skipped it. Poster regenerated from the raw plate with the new title; new handler test asserts builtin title slugs stay unique. - Raise the shared default limit 50 -> 100, give the IMDb Top 250 templates an explicit 250 (limit*4 fetch trim previously never scanned entries 201-250), and drop the limit on catalog lists (Criterion, A24) so they hold every owned title. - Correct IFC Films to MediaMovie (live list is 100% movies; as MediaMixed it was offered to TV libraries where it always synced empty) and fix the Trakt Popular descriptions (ratings-based, not "most-watched"). - Update stale limit docs in collection-templates.md. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 24 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR raises the shared builtin collection template default item limit from 50 to 100, adds explicit ChangesCollection Template Default Limit Update
Estimated code review effort: 2 (Simple) | ~15 minutes Related PRs: None identified in this diff context. Suggested labels: enhancement, documentation, tests Suggested reviewers: None identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97bb3554e7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| Source: SourceMDBList, | ||
| MediaKind: MediaMovie, | ||
| DefaultLimit: builtinDefaultLimit, | ||
| DefaultLimit: 250, |
There was a problem hiding this comment.
Keep IMDb defaults within import limit caps
When this catalog is served to the direct template galleries, the limit input is initialized from default_limit, but both CollectionTemplateConfigForm and UserCollectionTemplateConfigForm still render that field with max={200}, and the user import API rejects limits above 200. Selecting the IMDb Top 250 template and submitting with this new default 250 therefore either fails native form validation or gets a 400, so direct creation is broken unless the user manually lowers the limit and loses the Top 250 behavior; raise those caps with this change or avoid sending an over-cap default to those forms.
Useful? React with 👍 / 👎.
The IMDb Top 250 templates now default to 250 items, but the template config forms rendered their Max Items input with max=200 and the user import API rejected limits above 200, so applying those templates from the direct galleries failed native validation or got a 400. Raise the cap to 500 on both sides, wired to shared constants: sync's fetch trim (collectionSourceFetchMax) never scans more than 500 source entries, so a larger explicit limit could never be satisfied anyway. collectionutil.MaxExplicitItemLimit backs validateOptionalLimit, and COLLECTION_MAX_ITEMS in lib/collectionTemplates backs all seven Max Items inputs (gallery forms + admin import/editor dialogs). Co-Authored-By: Claude Fable 5 <[email protected]>
* fix(collections): repair broken builtin collection templates A live audit of the builtin template catalog (all 40 MDBList URLs and all 10 TMDB franchise IDs fetched) found two dead sources, a silent bundle-apply collision, and several templates whose defaults contradict their descriptions: - Repoint mdblist_misc_a24 and mdblist_misc_criterion_collection to live lists; the original irvingbeano/shtluck lists were deleted on MDBList (404), so every sync of those collections failed. - Retitle mdblist_charts_popular_movies to "IMDb MovieMeter Top 100". It shared the "popular-movies" title slug with tmdb_popular_movies, and bundle apply dedupes by slug per library, so applying all_defaults silently skipped it. Poster regenerated from the raw plate with the new title; new handler test asserts builtin title slugs stay unique. - Raise the shared default limit 50 -> 100, give the IMDb Top 250 templates an explicit 250 (limit*4 fetch trim previously never scanned entries 201-250), and drop the limit on catalog lists (Criterion, A24) so they hold every owned title. - Correct IFC Films to MediaMovie (live list is 100% movies; as MediaMixed it was offered to TV libraries where it always synced empty) and fix the Trakt Popular descriptions (ratings-based, not "most-watched"). - Update stale limit docs in collection-templates.md. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(collections): raise import limit caps above IMDb Top 250 default The IMDb Top 250 templates now default to 250 items, but the template config forms rendered their Max Items input with max=200 and the user import API rejected limits above 200, so applying those templates from the direct galleries failed native validation or got a 400. Raise the cap to 500 on both sides, wired to shared constants: sync's fetch trim (collectionSourceFetchMax) never scans more than 500 source entries, so a larger explicit limit could never be satisfied anyway. collectionutil.MaxExplicitItemLimit backs validateOptionalLimit, and COLLECTION_MAX_ITEMS in lib/collectionTemplates backs all seven Max Items inputs (gallery forms + admin import/editor dialogs). Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
Problem
A full audit of the builtin collection-template catalog (every one of the 40 MDBList URLs and all 10 TMDB franchise collection IDs fetched live) found:
mdblist_misc_a24(irvingbeano/a24) andmdblist_misc_criterion_collection(shtluck/the-complete-criterion-collection) were deleted on MDBList and return 404 — every sync of those collections fails. Both ship in thestudio_collectionsandall_defaultsbundles.mdblist_charts_popular_moviesandtmdb_popular_moviesboth slugify topopular-movies. Bundle apply dedupes by slugified title per library (slug-match adoption inapplyTemplateBundle), so applyingall_defaultsalways silently skipped the MovieMeter template — and dry-run previewedwould_createfor both, diverging from the real apply.DefaultLimit: 50, and sync scans at mostlimit × 4source entries — so "IMDb Top 250" never even scanned entries 201–250, and "The complete Criterion Collection" considered only the first 200 of ~1,000 entries.MediaMixedbut its live list is 100% movies (as mixed it was offered to TV-only libraries where it always synced empty); Trakt Popular descriptions claimed "all-time most-watched" but Trakt's popular endpoint is ratings-based.Changes
inshanemagic/a24-films(146 movies) and Criterion →reptauros/the-criterion-collection(1,000 movies); both verified live with correct media types. Criterion's description no longer claims "complete".TestBuiltinTemplateTitleSlugsAreUniqueso builtin title slugs can never collide again.TestBuiltinTemplateDefaultLimitsencodes the override scheme.MediaMovie; Trakt Popular descriptions corrected; stale limit docs indocs/wiki/admin/collection-templates.mdfixed (they claimed a 20/50 split that never matched the code).Template IDs are unchanged, so poster assets, bundle references, and existing management keys are unaffected.
Verification
MediaKind).go vet+ fullinternal/collections/templatesandinternal/api/handlerstest suites pass; gofmt clean;go build ./internal/...clean.trending all, Trakt presets incl. profile-gatedrecommended, Discover incl.certification_ltewithcertification_country=US, franchise placeholderCollectionID=0, MDBList) is handled end-to-end at sync time.Risks / follow-up
source_configand need a re-apply with delete-existing (or a manual source edit). Syncs fail loudly in the meantime, as before.No linked issue — defect found and fixed during a catalog audit of this session.
AI-use disclosure
Authored by Claude Code (Claude Fable 5) under human direction; external URL/ID verification performed against live MDBList and TMDB.
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Bug Fixes