Skip to content

Personal template gallery offers TMDB Discover and franchise templates that do nothing when submitted #1640

Description

@Quick104

Problem

On the web Collections page, Browse Templates opens the template gallery for personal collections. It lists every built-in template, including the 37 TMDB Discover genre shelves (such as Popular Horror and Kids Movies) and the 11 TMDB franchise collections (such as Star Wars Saga). Those are 48 of the 101 templates, and none of them can become a personal collection. Picking one opens the normal form with Create Collection enabled. Clicking it does nothing: no request, no error, no toast, and the dialog stays open.

The form's submit handler has a branch for tmdb, trakt, mdblist, and tmdb_list templates and nothing after them. For tmdb_discover and tmdb_collection it returns without calling a mutation. The server wouldn't accept them anyway: personal collections import only from mdblist, tmdb, and tmdb_list. The admin gallery handles these two sources with a read-only summary that points to template bundles, but bundles don't exist in personal mode.

I found this by reading the code while auditing the docs for #1635. I didn't reproduce it in a browser.

Fix

Offer personal users only the templates they can create:

  • Filter the catalog that GET /api/v2/collections/templates returns to the importable sources, so API clients get the same list. Alternatively, filter in the gallery when mode="user".
  • Remove the dead trakt branch from the personal form while there. The server refuses new Trakt collections, and no Trakt templates remain.
  • Add a user-mode case to CollectionTemplateGallery.test.tsx. It has none today.

Technical notes

  • Entry point: web/src/pages/Collections.tsx:191 renders CollectionTemplateGallery mode="user"; the button is at Collections.tsx:205, shown when capabilities.imports is true.
  • Catalog: listPersonalCollectionTemplates (internal/apiv2/personal_collections_lifecycle.go:174) returns UserCollectionImportHandler.CollectionTemplates (internal/api/handlers/user_collection_imports.go:530), which is the unfiltered registry.Catalog().
  • Form: web/src/components/CollectionTemplateGallery/CollectionTemplateGallery.tsx:145 renders UserCollectionTemplateConfigForm for every template in user mode. In that form, submitDisabled (UserCollectionTemplateConfigForm.tsx:136) doesn't account for the source, and handleSubmit only has branches at lines 157 (tmdb), 168 (trakt), 178 (mdblist), and 187 (tmdb_list).
  • Admin handling of the same sources: CollectionTemplateConfigForm.tsx:123 shows read-only summaries for tmdb_collection and tmdb_discover.
  • Server-side sources: importableCollectionSources, internal/apiv2/personal_collections.go:136.

AI disclosure

  • Harness: T3 Code (Claude Code agent harness)
  • Tool(s): Claude Code, GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted; filed at the maintainer's request
  • Adversarial review: n/a

Activity

  1. added a commit that references this issue on Sep 29, 2026
    04d2b86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions