Skip to content

feat(catalog): hide titles with chosen custom tags from a profile - #5820

Open
Rhainland wants to merge 4 commits into
Silo-Server:mainfrom
Rhainland:feat/custom-tags
Open

Rhainland wants to merge 4 commits into
Silo-Server:mainfrom
Rhainland:feat/custom-tags

Conversation

@Rhainland

@Rhainland Rhainland commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A (requested in discussions #5813 and #3888)
Validation tasks: changes #1180 C2, #1181 C1, #1181 C4 (profile filtering gains a tag limit), #1210 C1, #1211 C1 (Edit Metadata gains a Custom tags field); validated behavior is unchanged when no tags are set

Other clients: Apple Silo-Server/silo-apple#1347; Android Silo-Server/silo-android#1128; Roku N/A (no profile editor or metadata editor)

Parents can only keep a title from a child's profile through its content rating. Some titles pass a rating ceiling but still don't belong on that profile, and the only workaround today is editing the title's rating, which changes it for everyone (#3888). Plex users also expect to label titles and filter profiles by those labels (#5813).

This adds custom tags. Admins and metadata curators type their own tags on a movie or series in Edit Metadata → Tags & Genres. In the profile editor, a household manager turns on "Hide titles with tags" and picks tags from a searchable list; the profile then can't see or play any title carrying one of them.

Approach

  • Storage: media_items.custom_tags and user_profiles.excluded_tags (also in the SQLite user store). No metadata provider writes tags, so a refresh leaves them alone. Up to 50 tags of 64 characters each; matching ignores case.
  • Enforcement: the tags travel in access.MaturityLimits and are applied by the shared catalog access filter. Every read that already honors a profile's rating limit honors them too: browsing, search, home and library rows, item detail, seasons and episodes, people, recommendations, playback and jellycompat. A series' tags hide its seasons and episodes. The predicate is one uncorrelated subquery over the tagged titles, which Postgres runs once per query as a hashed subplan; profiles without excluded tags skip it.
  • Title allowances lift rating limits only, never a tag. The allowance editor shows such a title as hidden_by_tag instead of offering an allowance that would not work.
  • API (/api/v2, additive): custom_tags on movie and series metadata, read and written by curators only; excluded_tags on profiles, writable only by an admin or the household's primary profile; GET /api/v2/catalog/custom-tags lists the tags on titles the viewer can see, with counts; a new hidden_by_tag allowance state. Profiles advertise excluded_tags_supported. /api/v1 is unchanged, and jellycompat does not expose tags as Jellyfin Tags.
  • Backups: per-user restore and profile transfer carry excluded_tags, and the credential authority check treats fewer excluded tags as a looser profile.
  • Web: the Custom tags field uses the existing TagInput, which gains an in-app suggestion list of tags already in use. The profile editor gains the switch card with a searchable tag picker.
  • Strings come from feat(web): add custom tag strings silo-translations#217, which now carries the translation pass. .silo-translations is synced locally from that branch combined with the catalog's main (so main's newer keys stay) and must re-pin to the release [v1] Subtitle settings + search/download via the Jellyfin-compat layer #217 publishes before merge.

Validation

  • make test-go passes. The touched packages pass with a Postgres test database, including the new DB tests (listed in scripts/ci/db-contracts.txt).
  • make test-web, web lint, format, build and bundle budget pass.
  • make lint-changed and the apiv2 OpenAPI, web-types, contract, fixtures, route-inventory, settings-bindings, migrations, local-paths and size-ratchet checks pass.
  • On a local server with Parent, Teen and Kid profiles, where Teen hides Gore and Scary: Teen gets 404 on the four tagged titles, their seasons and episodes, and the people credited only on them. They are absent from browse, search, home rows, library rows and the tag list. Starting playback of their files is refused. Through jellycompat, /Items, search, Latest, item lookups and PlaybackInfo hide them. Parent sees and plays all of them, and a title tagged only Car chases stays visible to Teen.
  • Not tested: Apple and Android clients, which don't show the new fields yet (parity issues above). The user manual update is Document custom tags and hiding titles with tags from a profile siloserver.org#491.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-5820/

Surface and build: web app and web admin, desktop and mobile web; before is e3047ba46 (main), after is this branch, both against the same local server and test library.

Risks

  • The migration adds two text[] columns with constant defaults (no table rewrite) and builds a partial index concurrently.
  • The .silo-translations pin is local until silo-translations#217 is released; this must not merge before that re-pin.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code (via T3 Code); Codex CLI for code review
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Playwright
  • Model(s): claude-opus-5-5; gpt-6.2-sol (code review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: dual-code-review (gpt-6.2-sol and claude-opus-5-5) of the full diff. The fixed findings were Go and Postgres case-folding drift, allowances offered for tag-hidden titles, tags accepted on non-movie/series items, a missing profile context in the tag picker, and a switch that vanished while on. Follow-up reviews of the suggestion list found scroll lock, clipping and keyboard-highlight problems inside dialogs, all fixed. Dismissed: a pre-existing home-row cache limit, and backup authority not comparing catalog tags, which matches how ratings work.

Note

Add custom tags to catalog items and let profiles hide titles by tag

  • Profiles can store excluded_tags (normalized, case-insensitive, max 50). Catalog queries filter out titles whose custom tags match, and title allowances show a hidden_by_tag state that an allowance does not lift.
  • Curators can set custom tags on movies and series via the metadata editor (EditMetadataDialog.tsx); other item types return ErrCustomTagsUnsupported. A new GET /api/v2/catalog/custom-tags endpoint lists accessible tags with title counts, used as suggestions in the UI.
  • Tag matching is case-insensitive and whitespace-normalized via access.TagKey/DistinctTags in tags.go. Access cache keys, cursor digests, and access-scope intersections include excluded tags so results stay distinct and consistent.
  • Adds migrations: custom_tags on media_items and excluded_tags on user_profiles (Postgres 20261203082703_add_custom_tags.sql, SQLite schema v39). Backups, restores, media-item merges, and recommendation filtering all carry the new fields.
  • Behavioral Change: MaturityLimits.WithAllowedTitles and intersectAllowedTitles now gate on the new RatingActive instead of Active, so excluded tags alone no longer trigger title-allowance application. Profile updates that set excluded tags are excluded from the self-service update path in isAllowedSelfServiceProfileUpdate.

Macroscope summarized 4bf16c0.

Admins and metadata curators can put free-text custom tags on movies and
series in Edit Metadata. A profile's "Hide titles with tags" limit hides
every title carrying one of the chosen tags (and every season and episode
of such a series) from browsing, search, home rows, people, playback and
the Jellyfin view. Tags match without regard to case, a metadata refresh
never changes them, and a title allowance never lifts a tag.

The native API gains custom_tags on movie and series metadata (curators
only), excluded_tags on profiles, GET /api/v2/catalog/custom-tags, and a
hidden_by_tag title allowance state. Backups carry both fields.
@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Dec 3, 2026
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

This change adds custom tags to movies and series and profile exclusions for those tags. It updates catalog and profile APIs, storage, access filtering, backups, web controls, tests, documentation, fixtures, and translations.

Changes: Custom tags and profile exclusions

Layer / File(s) Summary
Tag normalization, metadata, and persistence
internal/access/tags.go, internal/catalog/update.go, internal/catalog/item_repo.go, internal/metadata/*, migrations/sql/*, internal/userdb/*, internal/userstore/*
Adds tag normalization and storage for catalog tags and profile exclusions. Catalog metadata merges retain tags. SQLite and PostgreSQL profile stores persist excluded tags.
Profile access enforcement and backup handling
internal/access/*, internal/policy/*, internal/catalog/access_filter.go, internal/catalog/access_cache_key.go, internal/apiv2/cursor.go, internal/api/handlers/title_allowances.go, internal/backup/*
Adds excluded tags to access limits and scope keys. Catalog filtering excludes matching titles, and title allowances report hidden_by_tag without overriding the restriction. Backup exports, restores, and credential comparisons include excluded tags.
API contracts and catalog endpoints
internal/api/handlers/admin*, internal/api/handlers/catalog_resources.go, internal/api/handlers/profiles*, internal/apiv2/*, contracts/api/v2/*, internal/api/router.go, internal/api/testdata/media_routes.txt
Adds custom-tag metadata updates, curator-only item details, profile excluded-tag fields, and a profile-scoped endpoint that lists visible tags with title counts.
Web metadata and profile controls
web/src/api/*, web/src/components/*, web/src/hooks/queries/*, web/src/lib/profile-management.ts, web/src/pages/*
Adds tag suggestions and entry to metadata editing. Adds profile controls for selecting excluded tags, submitting profile changes, and displaying tag-based allowance states and access summaries.
Validation, documentation, and translations
internal/*/*test.go, internal/userstore/storetest/*, scripts/ci/db-contracts.txt, docs/*, web/src/locales/*, .silo-translations
Adds tests, documents tag behavior and profile restrictions, updates translations, and changes translation metadata.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor AdminCurator
  participant UpdateCatalogItemMetadata
  participant ItemRepository
  actor ProfileEditor
  participant CatalogCustomTagsEndpoint
  AdminCurator->>UpdateCatalogItemMetadata: submit custom_tags
  UpdateCatalogItemMetadata->>ItemRepository: update item metadata
  ProfileEditor->>CatalogCustomTagsEndpoint: GET /api/v2/catalog/custom-tags
  CatalogCustomTagsEndpoint->>ItemRepository: ListCustomTags with viewer access
  ItemRepository-->>CatalogCustomTagsEndpoint: visible tags and title counts
  CatalogCustomTagsEndpoint-->>ProfileEditor: custom-tag collection
Loading
Merge Risk: Moderate · up to 66293

Custom tags and profile exclusions look functionally sound, but the translation pin must point to a published release before merging. A failed tag read could also let a later tag edit remove existing tags. Both should be resolved or explicitly accepted. The remaining items are minor wording and limit-handling issues.

Security architecture risk: Moderate · up to 66293

Title allowances cannot override a tag exclusion, but cached catalog cards can outlive a tag edit, and case-insensitive matching is not consistent across all supported comparison paths. A full restore can also retain an API key even when restored tag assignments give its profile broader visibility. Rolling back the database migration deletes the tag policy rather than preserving it for re-upgrade.

Retained concerns

  • Minor · security · observed: A series tag edit changes live visibility without changing the affected profile's section cache key. Local eviction finds the series and descendants whose IDs encode it, but misses cached generated-ID episode cards that carry no series ID. Other API nodes also depend on best-effort notification. A restricted profile can still receive a previously cached episode card until refresh or expiry. This does not establish playback access.
  • Minor · security · inferred: Go deduplicates tags and keys shared section results using its Unicode lowercase form, but the live predicate binds the retained spellings and folds them in PostgreSQL. Lowercasing both SQL operands does not align those equivalence rules. Where they differ, an intended case-insensitive exclusion can fail to match, or otherwise identical viewer scopes can share cached membership despite different live visibility. Exposure depends on database collation, stored spellings, and the consumer.
  • Minor · security · observed: The new PostgreSQL Down migration drops profile exclusions and title tags in separate nontransactional statements. Interruption can leave only one policy input intact. Retrying completes the schema operation, but reapplying Up creates empty defaults for dropped columns and does not recover configured restrictions.
  • Minor · security · inferred: A same-deployment swap can retain a live profile-bound API key when the backup has the same profile exclusions but lacks a title tag assigned since the backup. The carry check compares excluded labels, not the title assignments that give them effect, so that key can gain visibility to an otherwise eligible title. An operator's approval to restore historical data is separate from the documented promise not to carry a live credential onto weaker restrictions.
Security review details

Security Blast Radius

  • inferred — A catalog-side tag change can affect any profile on that deployment which excludes the label and would otherwise see the title, including its descendants for a series. Stale card exposure is limited to affected cached results; the credential-carry issue additionally requires a same-deployment full swap and an otherwise eligible carried credential.

Security Findings and Attack Paths

  • inferred — A restricted viewer can receive stale metadata through a normal section read after an authorized catalog edit. The exposure does not require curator rights, but it does require an affected warm entry. The inspected playback gate does not take the cached card as authority.

Trust Boundaries and Controls

  • observed — Curators control the title-side input through the metadata edit path. For profile updates, Silo checks household management authority before persisting exclusions and limits non-managers to self-service playback preferences. The catalog applies exclusions independently of title allowances.

Dependencies

  • inferred — Profile transfer carries exclusion labels, not a portable guarantee that the same titles are hidden. Effective visibility depends on the destination catalog's assignments. The inspected evidence did not establish destination-side verification of equivalent title coverage.

Data and control flow

  • observed — Profile exclusions enter the resolved maturity limits. Episode catalog queries use the parent series ID to look up tags instead of relying on a copy on each episode row.

Resilience and Maintainability Implications

  • observed — A committed metadata edit does not wait for every reader to acknowledge invalidation. Cancellation-resistant publication and local eviction help when they succeed, but a missed notification or an unrecognized descendant can leave a warm result in service until refresh or hard expiry.
  • observed — Swap computes and applies credential carry in a staging transaction before cutover, deleting credential rows that do not qualify. A reported pre-cutover carry error enters staging cleanup, not publication. Once journaled, recovery can reopen an already-swapped database or roll back an incomplete swap; it does not recompute effective tag authority.

Rollout and rollback

  • inferred — Up starts with empty policy inputs for existing rows and makes failed concurrent index creation retryable. Down does not check for configured policy before dropping either input. The database operator must verify before Down that both inputs are recoverable and verify the restored policy before reopening restricted access after re-upgrade. No mixed-version enforcement guarantee was established.
  • observed — Before swap cutover, the restore loader compares credential-owner authority in staging and withholds credentials when it detects wider authority, including a missing live exclusion label. This does not veto the restore itself or verify the assignments behind the labels. The operator remains responsible for the effective tag policy in the selected backup before reopening service.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(catalog): hide titles with chosen custom tags from a profile" matches the main change: custom tags on movies and series, and profile excluded tags that hide matching titles. The change…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states that the PR adds custom tags so profiles can hide titles, and it names the affected areas: storage, enforcement, title allowances, the /api/v2 surface, backups, web UI, and tran…
Full details: Title check

Explanation

The title "feat(catalog): hide titles with chosen custom tags from a profile" matches the main change: custom tags on movies and series, and profile excluded tags that hide matching titles. The changeset adds storage, enforcement in the catalog access filter, API endpoints, and UI for this feature.

Full details: Description check

Explanation

The description states that the PR adds custom tags so profiles can hide titles, and it names the affected areas: storage, enforcement, title allowances, the /api/v2 surface, backups, web UI, and translations. It also lists validation steps and the open translation pin. It is specific and clearly related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)

@silo-kody

silo-kody Bot commented Dec 3, 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 ❌

Comment thread web/src/hooks/queries/profiles.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments

Major 3
  1. Do not present a failed tag read as an empty editable list.
  2. Pin the translation catalog to a released version before merge.
  3. Non-manager profile edits fail when excluded tags are supported.
Minor 6
  1. Check the listing dependency before advertising custom tags.
  2. Prevent selection beyond the profile’s 50-tag limit.
  3. internal/catalog/access_filter.go, lines 239 · 🔒 Security & Privacy · 🛡️ Detected with Advanced Tier · ⚖️ Poor tradeoff
    Authorization Bypass
    Reachability: External
    Exploitability: Difficult
    CWE: CWE-178
    Excluded-tag matching ignores case variants on databases with a C or POSIX collation.
    On a database created with the C or POSIX collation, or with another non-UTF-8 encoding, PostgreSQL lower() changes only ASCII letters. TagKey uses Go's strings.ToLower, which also folds Unicode letters. A profile that excludes ä does not hide a title tagged Ä, and the reverse pairing fails too. The shipped initdb uses en_US.UTF-8, where both sides fold these pairs the same way. Startup and restore do not reject non-UTF-8 databases, so the mismatch occurs only on those deployments.
    Required behavior: an excluded tag must hide every title whose TagKey matches it, whatever the database locale. The SQL predicate must not depend on the database's case folding to decide equality.
  4. A curator's series tag edit changes live visibility without changing the profile's cache key. The existing eviction path can identify episodes whose IDs embed the series ID, but not cached episode cards with generated IDs that carry no series ID. Those cards can remain visible in a matching profile's warm section until refresh or expiry. Cross-node notification is also best effort. This is a catalog visibility concern, not evidence of playback bypass.
  5. Tag deduplication and shared cache keys use Go lowercasing, while live filtering uses PostgreSQL lowercasing under the database collation. Where those equivalence rules differ, the new rule can miss a case-insensitive exclusion or allow otherwise equivalent viewer scopes to share cached results despite different SQL visibility. The impact depends on the database locale, the configured tag spellings, and the cache consumer.
  6. The new nontransactional PostgreSQL rollback drops both policy columns without preserving their data. An interruption can leave only one policy input removed; retry can finish the schema operation but cannot recover removed values. Reapplying the migration creates empty defaults rather than reinstating restrictions configured after upgrade.
Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8bf8d594-74b7-4856-8bfb-678cfe8dcb8f
Commits

Reviewing files that changed from the base of the PR and between e3047ba and 6eaad97.

Files selected for processing: 104

  • .silo-translations
  • contracts/api/v2/fixtures/admin_account_profile_clear_pin.json
  • contracts/api/v2/fixtures/admin_account_profile_create.json
  • contracts/api/v2/fixtures/admin_account_profile_get.json
  • contracts/api/v2/fixtures/admin_catalog_capabilities.json
  • contracts/api/v2/fixtures/create_profile_created.json
  • contracts/api/v2/fixtures/list_profiles_ok.json
  • contracts/api/v2/fixtures/update_profile_ok.json
  • contracts/api/v2/fixtures/upload_profile_avatar_ok.json
  • contracts/api/v2/openapi.json
  • docs/admin-api.md
  • docs/architecture/backups.md
  • docs/architecture/title-allowances.md
  • docs/catalog-api.md
  • internal/access/household.go
  • internal/access/household_test.go
  • internal/access/resolver.go
  • internal/access/tags.go
  • internal/access/types.go
  • internal/api/handlers/admin.go
  • internal/api/handlers/admin_item_metadata_service.go
  • internal/api/handlers/catalog_resources.go
  • internal/api/handlers/profiles.go
  • internal/api/handlers/profiles_audit.go
  • internal/api/handlers/profiles_excluded_tags_test.go
  • internal/api/handlers/recommendation_scope.go
  • internal/api/handlers/title_allowances.go
  • internal/api/handlers/title_allowances_test.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/admin_catalog_item_metadata.go
  • internal/apiv2/admin_catalog_items.go
  • internal/apiv2/catalog_custom_tags.go
  • internal/apiv2/catalog_items.go
  • internal/apiv2/cursor.go
  • internal/apiv2/cursor_scope_digest_test.go
  • internal/apiv2/document.go
  • internal/apiv2/profiles.go
  • internal/apiv2/profiles_test.go
  • internal/apiv2/router.go
  • internal/apiv2/title_allowances.go
  • internal/backup/credentials_authority.go
  • internal/backup/credentials_authority_test.go
  • internal/backup/profile_transfer.go
  • internal/backup/restoreset_users.go
  • internal/backup/users_apply.go
  • internal/backup/users_postgres_test.go
  • internal/catalog/access_cache_key.go
  • internal/catalog/access_cache_key_test.go
  • internal/catalog/access_filter.go
  • internal/catalog/custom_tags.go
  • internal/catalog/custom_tags_access_db_test.go
  • internal/catalog/detail.go
  • internal/catalog/episode_catalog_count_db_test.go
  • internal/catalog/item_repo.go
  • internal/catalog/personal_collection_access.go
  • internal/catalog/personal_collection_access_test.go
  • internal/catalog/update.go
  • internal/metadata/identify_sticky_db_test.go
  • internal/metadata/provider_id_integrity.go
  • internal/metadata/service.go
  • internal/policy/viewer_resolver.go
  • internal/policy/viewer_resolver_test.go
  • internal/recommendations/engine.go
  • internal/userdb/conformance_test.go
  • internal/userdb/migrate.go
  • internal/userdb/profile_requests_blocked_test.go
  • internal/userdb/profiles.go
  • internal/userdb/schema.go
  • internal/userdb/tags_json.go
  • internal/userstore/pgstore/profile_pin_revision_test.go
  • internal/userstore/pgstore/profiles.go
  • internal/userstore/storetest/profile_excluded_tags.go
  • internal/userstore/types.go
  • migrations/sql/20261203082703_add_custom_tags.sql
  • scripts/ci/db-contracts.txt
  • web/src/api/types.ts
  • web/src/api/v2/catalog.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/components/EditMetadataDialog.form.ts
  • web/src/components/EditMetadataDialog.test.tsx
  • web/src/components/EditMetadataDialog.tsx
  • web/src/components/TagInput.tsx
  • web/src/components/profiles/ProfileEditorDialog.model.ts
  • web/src/components/profiles/ProfileEditorDialog.test.tsx
  • web/src/components/profiles/ProfileEditorDialog.tsx
  • web/src/components/profiles/ProfileExcludedTags.tsx
  • web/src/components/profiles/ProfileSwitchCard.tsx
  • web/src/hooks/queries/customTags.ts
  • web/src/hooks/queries/items.ts
  • web/src/hooks/queries/keys.ts
  • web/src/hooks/queries/profiles.ts
  • web/src/hooks/queries/titleAllowances.ts
  • web/src/lib/profile-management.test.ts
  • web/src/lib/profile-management.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/keys.ts
  • web/src/pages/HouseholdSetup.tsx
  • web/src/pages/Profiles.tsx
  • web/src/pages/admin-users/detail/profiles/ProfilesTab.tsx
  • web/src/pages/settings/ProfilesSettings.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread internal/apiv2/admin_catalog_items.go Resolved
Comment thread web/src/locales/en-XA.json Resolved
@silo-kody

silo-kody Bot commented Dec 3, 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 ❌

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments

Minor 4
  1. A curator's series tag edit changes live visibility without changing the affected profile's cache key. Local eviction can find episodes whose IDs encode the series, but not already-cached generated-ID episode cards that carry no series ID. A missed cross-node notification can also leave matching entries on another API node. Affected profiles can still see stale cards until refresh or expiry; this does not establish playback access.
  2. Go deduplicates tag values and keys shared results by its lowercase form, but the live predicate binds the retained spellings and lowercases them in PostgreSQL. Where those equivalence rules differ, the filter can miss an intended case-insensitive match, or otherwise identical viewer scopes can share cached membership despite having different live visibility. Exposure depends on the database collation, stored spellings, and cache consumer.
  3. The new PostgreSQL Down migration independently drops profile exclusions and title tags without preserving either. Interruption after the first column drop can leave only one policy input intact. Retrying finishes the DDL, but reapplying Up creates empty defaults for dropped columns rather than restoring restrictions configured after upgrade.
  4. A full restore in swap mode can carry an existing credential into broader catalog access. The authority check compares profile exclusion labels, not the title assignments that give those labels effect. If a backup has the same profile exclusions but lacks a curator's later tag assignment, the affected title can become visible without the tag check marking the credential owner's authority as wider. The operator's decision to restore historical data does not cover the separate guarantee about carrying live credentials.
Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83664c4c-13ce-45d7-add1-7fc14e9fad94
Commits

Reviewing files that changed from the base of the PR and between 6eaad97 and 4bf16c0.

Files selected for processing: 2

  • internal/apiv2/admin_catalog_items.go
  • internal/apiv2/fixtures_test.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@Rhainland

Copy link
Copy Markdown
Contributor Author

On CodeRabbit's four architecture notes in the latest review, none needs a change in this PR:

  1. Cached cards after a curator edits tags: a curator's tag edit goes through the same metadata update path, and gets the same cache invalidation, as a content_rating edit, which also changes which profiles can see a title. Tags add no new staleness window, and playback and detail reads check access live.
  2. Case-folding drift between Go and Postgres: the matching was aligned in an earlier review round. A mismatch would need tag spellings whose lowercase form differs between Go's Unicode folding and the database collation, which is not a realistic tag.
  3. Down migration drops the data: every column-dropping Goose down migration loses its data. Rolling back this feature removes the feature, so that's expected.
  4. Backup restore and catalog tag assignments: the credential authority check compares profile policy, not catalog content. It treats max_content_rating the same way: a curator's later rating change isn't compared either. That's consistent and intended.

Regenerates the web translation files from silo-translations#217 combined
with the catalog's main, so the local pin keeps main's newer keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review of 6629359 (the PR's 4bf16c0 plus a merge of main). Two points for the maintainers to decide are below; the summary comment covers the rest.

🤖 Claude Code (claude-opus-5-5)

}

func registerCatalogCustomTags(reg *Registry) {
op := viewerOperation(humaOp(http.MethodGet, Prefix+"/catalog/custom-tags", "listCatalogCustomTags", "catalog",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maintainer decision: who may read the tag list. listCatalogCustomTags is a viewerOperation, so any profile, a child's included, can read every curator tag on the titles it can see, with counts. Item detail shows custom_tags only to curators, and the PR names only two users of the list: the metadata editor and the household manager's tag picker.

Options: keep it open, as it is now, or limit it to admins, metadata curators and the household's primary profile, which would make it match the curator-only rule on item detail. The second option fits better. The excluded tags never appear in a limited profile's own list, because the count only covers titles that profile can see.

if ok, err := visible(filter); err != nil || !ok {
return AllowanceStateNoLibraryAccess, err
}
if len(scope.ExcludedTags) > 0 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maintainer decision: an allowance for a title hidden by a tag. GET .../title-allowances reports such a title as hidden_by_tag, and the web editor doesn't offer an allowance for it. A direct PUT .../allowed-titles/{item} still answers 204 and stores the row, because checkAllowanceFor (line 248) only tests library access. The row does nothing while the tag hides the title. Once a curator removes the tag, it lifts the rating limit with nobody choosing that again.

Options: refuse the write with 422, the way no_library_access is refused (that adds a new error code and its translated message), or keep accepting it and say in the OpenAPI description that the allowance waits until the tag goes. Refusing it is easier for clients to reason about.

@Quick104

Quick104 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

/silo review: 6629359

Fit: 7/10 · Readiness: 5/10 — not ready (assuming CI is green)

Reviewed head: 66293593b9, which is the author's 4bf16c035a plus a merge of main. The code review and council read 4bf16c035a. The merge brings in main and regenerates the web translation files, and changes none of this PR's own code.

What I changed

Open for the maintainers

  • Who may read the tag list. GET /api/v2/catalog/custom-tags is open to every profile, while item detail shows tags only to curators. The review comment on catalog_custom_tags.go gives the options.
  • Allowances for titles hidden by a tag. A direct PUT still stores one, and it starts lifting the rating limit if the tag is removed later. The options are in the review comment on title_allowances.go.
  • Other findings. The maintainers are handling some findings directly, and those hold Readiness at 5.
  • Translation pin. Merge [v1] Subtitle settings + search/download via the Jellyfin-compat layer #217 and re-pin .silo-translations with --version <release>. The pin has to name a published release before merge.
  • Not fixed:
    • With custom_tags, a metadata update for an ID that doesn't exist answers 422 instead of 404.
    • Restore doesn't bound the size of a backup's excluded_tags.
    • The tag predicate's cost on a catalog with many tagged titles hasn't been measured. It is a NOT IN subquery, which Postgres can't turn into an anti-join.

What I checked

  • Coverage. The tag filter sits in the shared catalog access filter, and every catalog read I traced goes through it: browse, Meilisearch results (rechecked in Postgres), home and library rows, item detail, seasons and episodes (judged by their series), people, Next Up and Continue Watching, recommendations, calendar, progress sync, downloads and playback admission, and jellycompat. The section and resolved-list caches and the cursor digests all key on the excluded tags.
  • Stale reads after a tag edit. When a curator tags a title, cached home rows and collection collages can keep showing it until they refresh, and sessions already playing it continue. A content-rating edit behaves the same way today, so this PR doesn't add it.
  • Writes. Self-service profile updates can't set excluded_tags. Writes to custom_tags go through the existing metadata-curation check.
  • Tests. On the merged head these pass: the PR's new Postgres tests (TestExcludedCustomTagsHideTitlesPostgres, TestCustomTagsSurviveMetadataRefreshPostgres, TestPostgresProfileExcludedTags), and the access, policy, apiv2, handlers, userdb, notifications and PR-related backup tests. The new tests call code this PR adds, so they can't run on main, and none of them counts as a test that failed on the base.
  • Contract and web. The OpenAPI, route-inventory and web-types checks report current. The web typecheck and the touched web tests pass.
  • Safety read. I read the diff before running it and found nothing of concern.

Validated features

Validation tasks: changes #1180 C2, #1181 C1, #1181 C4, #1210 C1, #1211 C1. Each case gains new behavior only when tags are set. Rating, PIN, library and Edit Metadata behavior is unchanged without tags, and I found no regression. The validation-board check ran.

Clients, Jellyfin and the manual

Council

One round on 4bf16c035a.

Member Round 1
Sol (gpt-6.2-sol, medium) 4/10
Opus (claude-opus-5-5, medium) 8/10
Gemini (gemini-4-neon, medium) 8/10

The two decisions above came out of this round. The merge since then changes no code in the PR, so I didn't run a second round.

Scores

  • Fit 7. Parents asked for a way to keep one title off a child's profile without changing its rating for everyone. This builds that on the existing profile limits, without adding a parallel path. It does add new surface: a profile setting, a curator field, a list endpoint and an allowance state.
  • Readiness 5. The enforcement point is sound and well covered, but verified findings are still open.

🤖 Claude Code (claude-opus-5-5)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments

Minor 1
  1. Correct the catalog authentication hint.
Additional comments: 1

web/src/locales/nb.json-137565-137565: 1

137565-137565: Minor · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Describe the titles hidden by the tags.

“Skjuler 2 tagger” says that two tags are hidden. The profile restriction hides titles with those tags. Update both plural forms in the translation catalog and sync the locale. As per coding guidelines, “Never edit web/src/locales/*.json or keys.ts by hand.”

Also applies to: 137581-137581

Source: Coding guidelines

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0fae137a-724e-45af-bdbb-9091e901947b
Commits

Reviewing files that changed from the base of the PR and between 4bf16c0 and 6629359.

Files selected for processing: 55

  • .silo-translations
  • contracts/api/v2/openapi.json
  • docs/catalog-api.md
  • internal/api/handlers/catalog_resources.go
  • internal/api/router.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/catalog_items.go
  • internal/apiv2/document.go
  • internal/catalog/detail.go
  • internal/userdb/conformance_test.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/bg.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json
Files skipped from review as they are similar to previous changes: 3

  • web/src/locales/ar-XB.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

Comment thread web/src/locales/hi.json
"web.admin.plugins.repositories.authHintCatalog": [
{
"type": 0,
"value": "रिपॉज़िटरी होस्ट को Authorization: Bearer हेडर के रूप में भेजा जाता है।"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Correct the catalog authentication hint.

The Hindi text says the repository host is sent as a Bearer header. It does not identify the credential sent to the host. Correct the source translation and regenerate this file.

As per coding guidelines, “Never edit web/src/locales/*.json or keys.ts by hand.”

Source: Coding guidelines

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

Labels

enhancement New feature or request priority: P2 Limited scope, workaround exists, or polish 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.

2 participants