Skip to content

feat!: drop Trakt support - #2586

Merged
Quick104 merged 3 commits into
mainfrom
feat/drop-trakt
Oct 16, 2026
Merged

Quick104 merged 3 commits into
mainfrom
feat/drop-trakt

Conversation

@Quick104

@Quick104 Quick104 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Silo is dropping Trakt support. Trakt watch sync already ran through a first-party plugin, and new Trakt collections and home rows were already refused, but the server still carried a Trakt client, sync for the legacy Trakt collections and trending rows, the guards that kept those rows locked, and the auto-install that put the Trakt plugin back on any server with Trakt connections. This removes all of it and converts what households built with Trakt into things that keep working without it.

Approach

Two migrations run on update:

  • retire_trakt: Trakt-backed admin and personal collections become manual collections that keep their current titles and stop syncing. Trakt trending home rows switch to TMDB weekly trending and are turned off; a profile's own Trakt trending row is switched the same way and hidden. Collection rows drop their Trakt marker and keep showing their collection. The SQLite user store rewrites its section overrides the same way at schema v33.
  • retire_trakt_watch_sync: deletes Trakt connections (their per-connection rows cascade, as on a disconnect), the legacy watchsync.trakt.* settings and plugin migration markers, and disables an installed silo.watchprovider.trakt. Imported watch history stays. They are separate because migrationcheck refuses a migration that both defines SQL functions and touches server_settings.

With no Trakt data left, the server drops the Trakt client, collection and trending sync, the legacy-Trakt guards on sections and collections, the Trakt template source, and the Trakt settings. silo.watchprovider.trakt is listed as retired: the host never registers it, so a copy left installed cannot sync, scrobble or claim a provider key, and Trakt connections no longer trigger an auto-install. Only that plugin ID is retired: the plugin SDK is provider-agnostic, and a community Trakt plugin under its own ID registers like any other third-party plugin.

API: /api/v2 removes importAdminTrakt and importTraktCollection (and AdminTraktImport, TraktCollectionImport, TraktSpec) before the lock, with breaking-change approvals; both already answered 410 and no first-party client calls them. The frozen v1 import routes keep their 410 unsupported_source. The v1 removals table and the ledger record the change. Jellycompat has no Trakt surface.

The web client loses the legacy-Trakt collection and home-row handling, including the home-layout import retry that existed only because the server refused Trakt rows. silo-apple and silo-android need no change. The plugin is removed from the catalog in Silo-Server/silo-plugins (separate PR) and its repository is archived. A siloserver.org issue covers the manual pages that name Trakt.

Validation

  • Migrations: a migration test covers both files, including rollback and re-run, against PostgreSQL 18; a full migration of an empty database applies all 586; make verify-migrations passes.
  • Go: build, vet, gofmt, make lint-changed (0 issues) and make test-go pass, except TestRunStatsWithRealFFmpeg, which also fails on main on the test host (FFmpeg version).
  • DB-backed tests for every touched package pass, except TestAdminSubtitleListPageDB and TestCatalogTransferPersistsJobsAndSignedLink, which also fail on main on the test host; make test-db-pins passes (258/258).
  • Web: lint, format check, build, budget check and make test-web pass.
  • Contracts: verify-apiv2-openapi, verify-apiv2-contract, verify-apiv2-fixtures, verify-apiv2-web-types, verify-route-inventory, verify-migration-ledger, verify-offline-routes, verify-v1-route-freeze and the other repository checks pass. verify-actionlint and verify-shellcheck were not run locally (tools not installed); no workflow or shell file changed.

Evidence

After the update, Trakt collections show as manual collections with their titles and no sync status, Trakt trending home rows appear turned off as TMDB weekly trending, and the collection editor and home-row editor no longer show the locked "Trakt (legacy)" states. Watch-provider copy in admin settings and the dashboard names Simkl and MDBList instead of Trakt. Nothing changes for servers without Trakt data.

Risks

  • Irreversible data change: Trakt connections, tokens and app credentials are deleted, and Trakt collection sources are cleared. The down migrations only widen the type constraints again.
  • Admins who relied on a Trakt trending row must turn the TMDB row back on.
  • Until fix(collections): reject unknown collection_type on admin create and update #2450 lands, creating an admin collection with collection_type: "trakt" returns 500, as any unknown type does today.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code (with a Claude Code subagent for the web changes), GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Remove Trakt support across API, collections, trending, and watch sync

  • Deletes the Trakt collection-import routes (admin and personal), which now return HTTP 410 with an unsupported-source error, and removes the AdminTraktImport, TraktCollectionImport, and TraktSpec schemas from the v2 OpenAPI contract
  • Removes all Trakt collection synchronization: preset and user-list sync in the catalog service, Trakt trending fetching in TrendingRefresher, and the Trakt fetcher/token-resolver wiring in router.go and main.go
  • Adds PostgreSQL and SQLite migrations that convert stored Trakt collections to manual collections, rewrite Trakt trending sections to disabled TMDB weekly sections, and delete Trakt watch-sync connections, credentials, and plugin registration (retire_trakt.sql, retire_trakt_watch_sync.sql)
  • Strips the legacyTrakt flag and all legacy-Trakt lock/immutability rules from the web UI (home rows, collection editors, layout import) and docs; the trakt provider key is no longer claimed by the first-party registry
  • Risk: breaking change — the removed v2 import operations are recorded as approved removals in breaking-approvals.json; the migrations are irreversible, so Trakt connections and collection sources cannot be restored; check catalog.IsSyncableType and trendingDiscoverRecipe.Validate for the new rejected-source behavior

Macroscope summarized aafc44d.

Silo no longer supports Trakt. Two migrations convert what Trakt built and
remove what it stored:

- Trakt-backed admin and personal collections become manual collections
  that keep their titles and stop syncing.
- Trakt trending home rows switch to TMDB weekly trending and are turned
  off; a profile's own Trakt trending row is switched and hidden, in the
  Postgres store and the SQLite user store (schema v33).
- Trakt watch-sync connections, the legacy watchsync.trakt.* settings and
  migration markers are deleted, and an installed Trakt plugin is disabled.
  The server never registers silo.watchprovider.trakt again. Imported watch
  history stays.

The Trakt client, collection and trending sync, legacy-Trakt guards,
templates and settings are removed from the server and the web client.
The v2 importAdminTrakt and importTraktCollection operations are removed
before the v2 lock; the frozen v1 routes keep their 410.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Oct 16, 2026
@silo-kody

silo-kody Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 16, 2026

Copy link
Copy Markdown

The Evidence section describes outcomes but includes no captures, response excerpts, or evidence.siloserver.org link, so reviewers cannot see these changes without building the branch.

  • migrations/sql/20261016131356_retire_trakt.sql and web/src/components/collections/editor/: Trakt collections become manual and lose sync status and legacy locked editing; add before-and-after captures of the same collection views on desktop and mobile web.
  • migrations/sql/20261016131356_retire_trakt.sql and web/src/components/homeRows/: Trakt trending rows become disabled TMDB weekly rows and the home-row controls change; add before-and-after captures of the same Home Rows surface on desktop and mobile web.
  • web/src/pages/admin-settings/WatchProviderTiles.tsx and web/src/components/admin/dashboard/widgets/WatchProvidersWidget.tsx: provider copy changes; add before-and-after desktop and mobile web captures of both surfaces.
  • web/src/lib/homeLayoutTransfer.ts: layout import no longer preserves the affected saved overrides or reports that preservation; add a before-and-after recording of the same import flow and resulting layout.

Name the surface and build or commit for each capture. Suggested fix: No diff — add the requested evidence under the PR's Evidence heading.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@macroscopeapp

macroscopeapp Bot commented Oct 16, 2026

Copy link
Copy Markdown

Visible changes lack the required evidence:

  • web/src/pages/admin-settings/WatchProviderTiles.tsx and web/src/lib/userSettingsNav.ts change provider/settings UI copy and available provider presentation; attach before-and-after desktop and mobile web captures, naming the surface and build or commit.
  • web/src/components/collections/editor/ and web/src/components/homeRows/ change how retired Trakt collections and home rows are presented and edited; attach before-and-after desktop and mobile captures of the same collection and home-row settings, naming the surface and build or commit. Include the resulting home-screen state if demonstrating the retired trending row.
  • migrations/sql/20261016131356_retire_trakt.sql, migrations/sql/20261016134645_retire_trakt_watch_sync.sql, and the API changes alter client-visible collection/provider data and remove v2 Trakt import routes; include before-and-after API excerpts or request outcomes for the same requests, naming the build or commit.

The Evidence section describes outcomes but does not include captures, response excerpts, or an evidence link.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cad75c01-a917-40a0-96a6-bf0b00fe7066
📥 Commits

Reviewing files that changed from the base of the PR and between 99c04a9 and 91ae3bc.

📒 Files selected for processing: 141
  • TRADEMARK.md
  • cmd/silo/main.go
  • cmd/silo/main_test.go
  • contracts/api/v2/breaking-approvals.json
  • contracts/api/v2/migration.json
  • contracts/api/v2/openapi.json
  • docs/admin-api.md
  • docs/architecture/admin-settings-ux.md
  • docs/architecture/collection-editor.md
  • docs/architecture/collection-templates.md
  • docs/architecture/dropped-shows.md
  • docs/architecture/external-watchlist.md
  • docs/architecture/v1-scope.md
  • docs/architecture/watch-provider-plugins.md
  • docs/catalog-api.md
  • docs/collections-api.md
  • internal/api/handlers/admin.go
  • internal/api/handlers/admin_collections_service.go
  • internal/api/handlers/admin_collections_service_test.go
  • internal/api/handlers/admin_sections_service.go
  • internal/api/handlers/admin_settings_checks_test.go
  • internal/api/handlers/admin_settings_legacy_pairs_test.go
  • internal/api/handlers/admin_stats_playback.go
  • internal/api/handlers/collections_lifecycle_service.go
  • internal/api/handlers/collections_lifecycle_service_test.go
  • internal/api/handlers/collections_mutation_guards_test.go
  • internal/api/handlers/library_collections.go
  • internal/api/handlers/library_collections_test.go
  • internal/api/handlers/section_source_policy.go
  • internal/api/handlers/section_source_policy_test.go
  • internal/api/handlers/sections.go
  • internal/api/handlers/user_collection_imports.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/api/trakt_collection_adapter_test.go
  • internal/api/trakt_collection_token_resolver.go
  • internal/apiv2/admin_collection_extras.go
  • internal/apiv2/admin_collection_types.go
  • internal/apiv2/personal_collections.go
  • internal/apiv2/personal_collections_test.go
  • internal/apiv2/schema_ownership_test.go
  • internal/catalog/collection_type.go
  • internal/catalog/encrypted_settings_repo.go
  • internal/catalog/encrypted_settings_repo_test.go
  • internal/catalog/library_collection_membership_test.go
  • internal/catalog/library_collection_repo.go
  • internal/catalog/library_collection_service.go
  • internal/catalog/library_collection_service_test.go
  • internal/catalog/trakt_list_url_test.go
  • internal/collections/templates/templates.go
  • internal/collections/templates/templates_test.go
  • internal/collections/templates/validate.go
  • internal/config/admin_settings.go
  • internal/config/restart_keys.go
  • internal/metadata/trakt/client.go
  • internal/metadata/trakt/client_test.go
  • internal/metadata/trakt/types.go
  • internal/metadata/trakt/user_list_test.go
  • internal/sections/fetcher.go
  • internal/sections/recipes/trending_discover.go
  • internal/sections/resolver_test.go
  • internal/sections/trending_demand_test.go
  • internal/sections/trending_refresher.go
  • internal/sections/trending_refresher_test.go
  • internal/sections/trending_snapshot.go
  • internal/sections/trending_snapshot_test.go
  • internal/storagetransition/operational_test.go
  • internal/taskmanager/tasks/refresh_trending_discover.go
  • internal/taskmanager/tasks/sync_user_collections.go
  • internal/usercollections/sync.go
  • internal/usercollections/types.go
  • internal/userdb/migrate.go
  • internal/userdb/migrate_v33_test.go
  • internal/userdb/retire_trakt.go
  • internal/watchsync/first_party.go
  • internal/watchsync/first_party_test.go
  • internal/watchsync/service.go
  • internal/watchsync/service_test.go
  • migrations/retire_trakt_test.go
  • migrations/sql/20261016131356_retire_trakt.sql
  • migrations/sql/20261016134645_retire_trakt_watch_sync.sql
  • web/src/api/types.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/request.test.ts
  • web/src/api/v2/schema.ts
  • web/src/components/admin/dashboard/registry.tsx
  • web/src/components/admin/dashboard/widgets/WatchProvidersWidget.tsx
  • web/src/components/collections/editor/LockedSourceSummary.tsx
  • web/src/components/collections/editor/SyncedListPanel.tsx
  • web/src/components/collections/fields/OrderBlock.tsx
  • web/src/components/homeRows/HomeRowsPage.test.tsx
  • web/src/components/homeRows/HomeRowsPage.tsx
  • web/src/components/homeRows/addRow/AddRowDialog.test.tsx
  • web/src/components/homeRows/addRow/AddRowDialog.tsx
  • web/src/components/homeRows/addRow/CollectionPicker.test.tsx
  • web/src/components/homeRows/addRow/CollectionPicker.tsx
  • web/src/components/homeRows/addRow/RowForm.tsx
  • web/src/components/homeRows/addRow/ShowsSummary.tsx
  • web/src/components/sections/HomeLayoutTransfer.tsx
  • web/src/hooks/queries/homeRows/useAdminHomeRows.test.tsx
  • web/src/hooks/queries/homeRows/useAdminHomeRows.ts
  • web/src/hooks/queries/homeRows/useProfileHomeRows.test.tsx
  • web/src/hooks/queries/homeRows/useProfileHomeRows.ts
  • web/src/hooks/queries/homeRows/useProfileHomeRowsAdapter.ts
  • web/src/hooks/queries/watchProviders.test.ts
  • web/src/lib/adminSettingsSearch.ts
  • web/src/lib/collectionTemplates.ts
  • web/src/lib/collections/adminList.test.ts
  • web/src/lib/collections/copy.ts
  • web/src/lib/collections/scope.ts
  • web/src/lib/collections/synced.test.ts
  • web/src/lib/collections/synced.ts
  • web/src/lib/collections/types.test.ts
  • web/src/lib/collections/types.ts
  • web/src/lib/homeLayoutTransfer.test.ts
  • web/src/lib/homeLayoutTransfer.ts
  • web/src/lib/homeRows/bulkCopy.test.ts
  • web/src/lib/homeRows/bulkCopy.ts
  • web/src/lib/homeRows/describe.test.ts
  • web/src/lib/homeRows/peek.test.ts
  • web/src/lib/homeRows/profileOverrides.test.ts
  • web/src/lib/homeRows/profileOverrides.ts
  • web/src/lib/homeRows/rowDraft.test.ts
  • web/src/lib/homeRows/types.ts
  • web/src/lib/homeRows/variants.test.ts
  • web/src/lib/homeRows/variants.ts
  • web/src/lib/sectionTypes.ts
  • web/src/lib/userSettingsNav.ts
  • web/src/pages/AdminHomeRows.addRow.test.tsx
  • web/src/pages/AdminHomeRows.concurrency.test.tsx
  • web/src/pages/AdminHomeRows.tsx
  • web/src/pages/CollectionEditorPage.syncedEdit.test.tsx
  • web/src/pages/CollectionImports.goldens.test.tsx
  • web/src/pages/admin-settings/WatchProviderTiles.tsx
  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.test.tsx
  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx
  • web/src/pages/settings/HomeScreenSettings.test.tsx
  • web/src/pages/settings/WatchProvidersSettings.test.tsx
  • web/src/test/fixtures/collectionAnswers.ts
  • web/src/test/fixtures/collectionBodies.ts
  • web/src/test/v2Recorder.ts
+----------------------+
| Tabs or spaces? Yes. |
+----------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Quick104
Quick104 merged commit 1e0b14a into main Oct 16, 2026
2 of 3 checks passed
@Quick104
Quick104 deleted the feat/drop-trakt branch October 16, 2026 14:14
@macroscopeapp

macroscopeapp Bot commented Oct 16, 2026

Copy link
Copy Markdown

Major validation impact — #193 S5 (Server/API, build 927 · 66f6a52a). This previously passed check exercised 20 /api/v2 admin collection routes, including imports. Removing POST /api/v2/admin/collections/import/trakt changes the non-admin response from the recorded 403 to a missing-route response. The PR must explain why this validated behavior changes, and S5 needs re-validation after merge.

Replace the current Validation tasks: none line with:

-Validation tasks: none
+Validation tasks: changes #193 S5

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Quick104 added a commit to Silo-Server/silo-plugins that referenced this pull request Oct 16, 2026
Silo no longer supports Trakt (Silo-Server/silo-server#2586), and the plugin
repository is archived.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@macroscopeapp

macroscopeapp Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Major change: #193 S5 recorded 403 responses for 20 admin collection routes, including imports. This PR removes POST /api/v2/admin/collections/import/trakt, so that route no longer follows the recorded authorization path. The PR must connect this behavior change to the Trakt retirement, and S5 needs re-validation after merge.

Suggested fix: replace Validation tasks: none with Validation tasks: changes #193 S5.

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

Comment on lines +139 to +142
IF COALESCE(element->>'SectionID', '') = ''
AND (pg_temp.is_trakt_trending_config(config) OR pg_temp.is_trakt_trending_config(user_config)) THEN
element := element || '{"Hidden": true}'::jsonb;
END IF;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Bug high

Incorrect hiding during upgrade in migrations/sql/20261016131356_retire_trakt.sql occurs because the hide predicate treats Config and UserConfig as equally authoritative, hiding rows with an ignored legacy Trakt Config and an active TMDB UserConfig despite the explicit UserConfig precedence for user-added rows exercised by TestResolveEmptySectionIDPrefersExplicitUserFields. Select the effective config before testing for Trakt, and apply the same fix to internal/userdb/retire_trakt.go:25.

IF COALESCE(element->>'SectionID', '') = ''
   AND pg_temp.is_trakt_trending_config(
     CASE
       WHEN user_config IS NULL OR btrim(user_config, E' \t\r\n') IN ('', 'null') THEN config
       ELSE user_config
     END
   ) THEN
  element := element || '{"Hidden": true}'::jsonb;
END IF;
Prompt for LLM

File migrations/sql/20261016131356_retire_trakt.sql:

Line 139 to 142:

Incorrect hiding during upgrade in `migrations/sql/20261016131356_retire_trakt.sql` occurs because the hide predicate treats `Config` and `UserConfig` as equally authoritative, hiding rows with an ignored legacy Trakt `Config` and an active TMDB `UserConfig` despite the explicit `UserConfig` precedence for user-added rows exercised by `TestResolveEmptySectionIDPrefersExplicitUserFields`. Select the effective config before testing for Trakt, and apply the same fix to `internal/userdb/retire_trakt.go:25`.

Suggested Code:

      IF COALESCE(element->>'SectionID', '') = ''
         AND pg_temp.is_trakt_trending_config(
           CASE
             WHEN user_config IS NULL OR btrim(user_config, E' \t\r\n') IN ('', 'null') THEN config
             ELSE user_config
           END
         ) THEN
        element := element || '{"Hidden": true}'::jsonb;
      END IF;

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant