Skip to content

fix(sections): key the title of a row added from a gallery preset - #5624

Open
rangoDJ wants to merge 4 commits into
Silo-Server:mainfrom
rangoDJ:fix/5440-watchlist-row-title-key
Open

rangoDJ wants to merge 4 commits into
Silo-Server:mainfrom
rangoDJ:fix/5440-watchlist-row-title-key

Conversation

@rangoDJ

@rangoDJ rangoDJ commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: none. Merge order: none.

Problem

Closes #5440
Validation tasks: changes #1140 C1, changes #1141 C1 (minor: a row created under a preset's name now carries title_key; English titles are unchanged)

Other clients: Web and Apple translate the new key. Android and Roku translate only home.section.* keys today, so they keep the English title until the maintainers decide which keys a section title_key may carry (see the review on this PR). Jellyfin-compat N/A.

A Home row added from the Watchlist preset in the admin section builder was stored with an empty title_key, so translated clients showed "Watchlist" in English. The builder saves the preset's name as the row's title, and the create paths (createAdminSection, bulkCreateAdminSections, both in internal/api/handlers/admin_sections_service.go) never set TitleKey. withDefaultTitleKeys keys only default rows, and "Watchlist" isn't one of them.

Approach

The issue suggests adding a title_key field to AdminSectionCreate. This PR fixes it on the server without an API change, so rows created by any client get the key:

  • New recipes.PresetTitleKey(sectionType, title) (internal/sections/recipes/text_keys.go) returns the preset's display-name key when title is the English name of a preset of that section type, or "" otherwise. It uses PresetTextKeys, the same keys the gallery sends as display_name_key. The Watchlist preset gives home.recipe.watchlistDefault.name.
  • Both create paths store that key with the row. A row given its own title gets none, as before. The bulk path's INSERT (createMany in internal/sections/repo.go) didn't write title_key at all, so it now does.
  • A renamed row loses the key through the existing UPDATE trigger, as the issue notes.
  • docs/catalog-api.md's title_key paragraph names the new case, and so do the title_key field description (regenerated into the OpenAPI artifact and web types) and the title_keys.go header.

Validation

  • New TestPresetTitleKey (unit): Watchlist and Recently Added keep their keys. An own title, an empty title, a preset name under another type and an unknown type get none.
  • New TestAdminSectionFromPresetKeysItsTitleDB (Postgres): a Home row created with section_type: watchlist and title "Watchlist" is stored with home.recipe.watchlistDefault.name, and one titled "Saved for later" with no key. The test checks the bulk create's Home row the same way. Added to scripts/ci/db-contracts.txt.
  • With main's admin_sections_service.go, the DB test fails (output under Evidence).
  • With this change: go test -count=1 ./internal/sections/... ./internal/api/handlers/ ./internal/apiv2/ passes against a local Postgres 18. lint-changed: 0 issues.
  • Not tested: a translated client showing the row, and the reporter's existing row, which this doesn't repair (see Risks).

Evidence

The visible change is the row's title in translated native clients, which I couldn't capture here. Below are results of go test -count=1 -v -run TestAdminSectionFromPresetKeysItsTitleDB ./internal/api/handlers/ against a local Postgres 18. The test checks the stored key those clients read.

Before (admin_sections_service.go from main bc17dc0):

    admin_section_preset_title_key_db_test.go:45: row titled "Watchlist": stored title_key "", want "home.recipe.watchlistDefault.name"
--- FAIL: TestAdminSectionFromPresetKeysItsTitleDB
FAIL
FAIL	github.com/Silo-Server/silo-server/internal/api/handlers

After (this branch at e6413ff; the test with its bulk case also passes at 0e3f21c):

--- PASS: TestAdminSectionFromPresetKeysItsTitleDB
ok  	github.com/Silo-Server/silo-server/internal/api/handlers

Risks

  • Rows already created this way keep their empty key until they are added again. This PR has no backfill. Re-adding the row, or a follow-up migration, fixes them.
  • An admin who types a preset's exact English name as a row's title gets the preset's key, so translated clients show the preset's translated name. That is the name they typed.
  • No API field, schema or config change. Only the title_key field description changes.

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 in the Claude desktop app
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, not yet human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Set preset title key on admin-created gallery section rows

  • Adds recipes.PresetTitleKey, which returns a preset's display-name catalog key when the requested title exactly matches a preset DisplayName for the given section type; otherwise it returns an empty string (text_keys.go)
  • SectionHandler.CreateAdminSection and SectionBulkHandler.BulkCreateAdminSections assign this key to each new PageSection (admin_sections_service.go)
  • Repository.createMany now persists title_key in the page_sections INSERT so bulk-created rows keep their key (repo.go)
  • Adds a database contract test covering single and bulk creation with preset-matching and custom titles, plus table-driven tests for the helper
  • Behavioral Change: admin-created rows with a preset name now carry a title_key, which stops applying once the row is renamed; see catalog-api.md and schema.ts for the documented behavior

Macroscope summarized 03b87c2.

The section builder saves a preset's name as the new row's title, and
the create paths stored it with no title_key, so translated clients
showed a Watchlist row's title in English. createAdminSection and
bulkCreateAdminSections now store the preset's display-name key when the
title is the English name of a preset of the row's type.

Closes Silo-Server#5440

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Nov 30, 2026
@silo-kody

silo-kody Bot commented Nov 30, 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 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Admin section creation now assigns a preset display-name key when the section title exactly matches a preset name. Batch inserts persist the key. Tests and API documentation cover this behavior.

Changes: Admin Section Title Keys

Layer / File(s) Summary
Preset title lookup
internal/sections/recipes/text_keys.go, internal/sections/recipes/preset_title_key_test.go
PresetTitleKey returns a preset’s display-name key when the section type and title match exactly. Tests cover alternate, empty, mismatched, and unknown inputs.
Admin creation and persistence
internal/api/handlers/admin_sections_service.go, internal/sections/repo.go, internal/api/handlers/admin_section_preset_title_key_db_test.go, scripts/ci/db-contracts.txt, docs/catalog-api.md, internal/sections/title_keys.go, internal/apiv2/library_views.go, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts
CreateAdminSection and BulkCreateAdminSections set the title key. Batch inserts store it. A database-backed test checks stored keys for preset and custom titles, and the CI database-contract list includes the test. The documentation and API schema descriptions cover the preset-title case.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant AdminSectionsService
  participant PresetTitleKey
  participant SectionsRepo
  participant Database
  AdminSectionsService->>PresetTitleKey: Look up key for section type and title
  AdminSectionsService->>SectionsRepo: Submit section with TitleKey
  SectionsRepo->>Database: Insert title_key
Loading

Possibly related issues

  • Silo-Server/silo-server#5683: Describes the same missing preset title key for profile-added Home rows; this change applies to admin creation paths, not profile-added rows.

Possibly related PRs

Suggested reviewers: quick104, blurbery

Merge Risk: Low · up to 03b87

Admin-added gallery preset rows now carry a translation key, which Web and Apple can translate. Android and Roku may still show the English title until those clients accept preset keys or a catalog decision is made. This does not break any existing behavior, and the remaining risk is low.

Security architecture risk: Minimal · up to 03b87

Matching preset titles gain a translation key without changing who can create sections or which sections users can see. Clients that do not recognize the key can still display the original title.

Security review details

Security Blast Radius

  • observed — The changed write is limited to localization metadata on the Home or library rows created by existing admin operations. Bulk creation applies the same derived key to each row in the already-selected scopes.

Trust Boundaries and Controls

  • observed — Creation remains on the acting-admin routes. Callers provide a section type and title, not a raw translation key; an exact match selects a catalog key defined by the server, which is stored as a SQL parameter.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(sections): key the title of a row added from a gallery preset" matches the main change. The PR adds recipes.PresetTitleKey and assigns it in both admin create paths, so a Watchlist row …
Description check Passed The description states the problem (a Home row created from the Watchlist preset lacks title_key), the approach (server-side PresetTitleKey, both create paths, and the bulk INSERT fix), validation (un…
Linked Issues check Passed [#5440] The reported defect is that a Home row created from the Watchlist preset is stored with an empty title_key. At head, recipes.PresetTitleKey (internal/sections/recipes/text_keys.go) returns Pre…
Out of Scope Changes check Passed The changes described for the whole PR against merge base a78b690 are: the new recipes.PresetTitleKey helper and its tests, the two create paths in admin_sections_serv…
Full details: Title check

Explanation

The title "fix(sections): key the title of a row added from a gallery preset" matches the main change. The PR adds recipes.PresetTitleKey and assigns it in both admin create paths, so a Watchlist row keeps its translatable title key. The title is specific, concise, and in conventional-commit form.

Full details: Description check

Explanation

The description states the problem (a Home row created from the Watchlist preset lacks title_key), the approach (server-side PresetTitleKey, both create paths, and the bulk INSERT fix), validation (unit and Postgres DB tests, before and after evidence), risks, and known gaps. It relates directly to the changeset.

Full details: Linked Issues check

Explanation

[#5440] The reported defect is that a Home row created from the Watchlist preset is stored with an empty title_key. At head, recipes.PresetTitleKey (internal/sections/recipes/text_keys.go) returns PresetTextKeys(p).DisplayName for the preset whose DisplayName exactly equals the title for that section type, and "" otherwise. For Watchlist this is home.recipe.watchlistDefault.name. Per the PR, CreateAdminSection and BulkCreateAdminSections in internal/api/handlers/admin_sections_service.go set TitleKey from this helper, and createMany in internal/sections/repo.go now writes title_key. Custom titles receive no key, and the existing UPDATE trigger clears the key on rename. The issue's technical notes propose a server-side key next to the stored English title, and the issue's text states that storing the English title can remain. This matches that requirement. The Postgres test TestAdminSectionFromPresetKeysItsTitleDB and unit test TestPresetTitleKey cover it, per the PR evidence. Limits: the diff between the previous reviewed head and head could not be read in this review (changed blobs unavailable), so incremental changes were assessed from the supplied summaries only. The issue's Android expected outcome (Croatian title on Android) depends on client translation of home.recipe.* keys. Android and Roku translate only home.section.* keys per the PR comment, and that client change is outside this repository's reviewed code. Rows already stored with an empty key are not repaired; the issue does not require a backfill.

Full details: Out of Scope Changes check

Explanation

The changes described for the whole PR against merge base a78b690 are: the new recipes.PresetTitleKey helper and its tests, the two create paths in admin_sections_service.go, the createMany INSERT change in repo.go, a DB contract test and its db-contracts.txt entry, and documentation and generated schema text for the title_key field (catalog-api.md, openapi.json, schema.ts, library_views.go, title_keys.go). All of these implement or document the #5440 key fix. The bulk path applies the same key to library-scoped rows created from the same preset name. This extends the same mechanism and is not unrelated work. The incremental diff since the previous reviewed heads could not be read, so the assessment relies on the whole-PR summaries for those changes. The docs summary mentions a 'Trending on Server' key case; this is documentation of an existing default-row mechanism and is not evidenced here as a code change.

Finishing Touches

Generate unit tests (beta)

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

@silo-triage silo-triage Bot added bug Something isn't working go Pull requests that update go code impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 30, 2026
LibraryID: nil,
SectionType: sections.SectionType(req.SectionType),
Title: req.Title,
TitleKey: titleKey,

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 medium

Bulk creation discards the computed preset title key

Translated clients display English preset names because bulk-created rows have an empty title_key. Include title_key and its value in the bulk INSERT in Repository.createMany.

Prompt for LLM
File internal/api/handlers/admin_sections_service.go, line 242:

Bulk creation discards the computed preset title key

Bulk-created rows still store an empty `title_key` because `Repository.createMany` omits that field from its INSERT, so translated clients display their English preset names. Include `title_key` (and its value) in the bulk INSERT.

Talk to Kody by mentioning @kody

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

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 0e3f21c. createMany's INSERT (internal/sections/repo.go) now writes title_key from the row, as insertSectionInTx does. title_args is left at its column default, since a preset name key has no placeholders. TestAdminSectionFromPresetKeysItsTitleDB now also bulk-creates a Home row for each title and checks its stored key. With the old repo.go it fails: bulk row titled "Watchlist": stored title_key "".

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for addressing this. Based on your description, writing title_key in createMany fixes the reported bulk-creation issue, and the expanded database test covers the regression. Leaving title_args at its default also makes sense for keys without placeholders.

I haven’t independently verified the commit or run the test.

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.

🤖 Claude Code (claude-opus-5-5): Confirmed live on a sandbox built from cd6e304. POST /api/v2/admin/sections/bulk with a home watchlist row titled "Watchlist" stores home.recipe.watchlistDefault.name, and /api/v2/home/layout returns it. The same request on main stored an empty key.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for confirming. The sandbox results show that bulk creation now stores the preset title key and returns it through the Home layout endpoint; the same request on main stored an empty key. That addresses the original suggestion.

A translated client display has not yet been verified, and existing rows with an empty key are not repaired by this change.

@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 posted: 1

Architecture findings (1)

Advisory architecture findings (1)

  • Trivial — Bulk creation computes the preset translation key for Home and library rows but drops it at the database write boundary. The API reports successful creation while the stored key remains empty, so clients fall back to the untranslated title. Persist the key in the existing bulk INSERT so both creation paths honor the documented behavior.
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: d315ebc0-96e5-4ef4-906d-3192df4b0d95
Commits

Reviewing files that changed from the base of the PR and between bc17dc0 and e6413ff.

Files selected for processing: 6

  • docs/catalog-api.md
  • internal/api/handlers/admin_section_preset_title_key_db_test.go
  • internal/api/handlers/admin_sections_service.go
  • internal/sections/recipes/preset_title_key_test.go
  • internal/sections/recipes/text_keys.go
  • scripts/ci/db-contracts.txt

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

createMany's INSERT left out title_key, so a bulk-created row from a
gallery preset still had none. It now writes the row's key, as the
single create does.

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

silo-kody Bot commented Nov 30, 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 ❌

The title_key field description and the title_keys.go header said an
admin-typed title never has a key. A row an admin adds from a gallery
preset and leaves under the preset's name now keeps the preset's
display_name_key, so both say so; the OpenAPI artifact and web types are
regenerated from the description.

The DB test found its bulk-created row by comparing the test host's
clock with the database's. It now takes the one row id that wasn't
there before the bulk create.

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.

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

Maintainer review of 0e3f21c. The server change does what it says: on a sandbox built from main, a Watchlist row created from the builder (single and bulk) is stored and served with no title_key. TestAdminSectionFromPresetKeysItsTitleDB fails on the merge base for that reason. The live check on the fixed head is in the summary comment.

Three findings are inline. The first needs a maintainer decision, and I'm fixing the other two in a commit on this branch, so there's no need to change them yourself.

}
for _, p := range rec.Definition().Presets {
if p.DisplayName == title {
return PresetTextKeys(p).DisplayName

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 (high): Android and Roku ignore this key, so #5440 stays open on the client it was reported on.

The PR body says Apple, Android and Roku need no change. On current main, two of them drop any title_key outside home.section.*:

  • Android: ServerText.sectionTitle returns the English title when !key.startsWith("home.section.") (android-shared/.../i18n/ServerText.kt).
  • Roku: catalog.cards.words loads only home.section.* strings into sectionTitles, which catalog.map.sectionTitle looks the key up in.

Both follow docs/architecture/i18n.md, which says a section's title_key is a home.section.* catalog key. The Watchlist row's key is home.recipe.watchlistDefault.name, so an Android TV in Croatian still shows "Watchlist". Web and Apple look any key up and do translate it.

The maintainers need to settle which keys a section title_key may carry:

  1. Widen the contract to include a gallery preset's name key (home.recipe.<preset>.name). Update i18n.md, then open Android and Roku parity issues for a small prefix change. This covers every preset, and older Android and Roku builds keep the English title.
  2. Keep title_key to home.section.*. Add home.section.* catalog entries for the presets that need them, mapped in presetNameKeys. That works on shipped clients, but it duplicates the preset name translations and only covers the presets that get an entry.

Until that's decided, Closes #5440 would close the issue while the reported Android case still shows English.

Comment thread docs/catalog-api.md Resolved
@silo-kody

silo-kody Bot commented Nov 30, 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 ❌

@Quick104

Quick104 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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

Review summary at cd6e304

The server fix works: rows created from a gallery preset now store and serve the preset's name key. One maintainer decision remains, because Android and Roku don't translate that kind of key yet, so the issue's own Android case still shows English.

Verified live. On a sandbox built from main (02dd5ed), creating a home watchlist row titled "Watchlist" through createAdminSection and bulkCreateAdminSections stored an empty title_key, and /api/v2/home/layout returned no key. After rebuilding the same sandbox from cd6e304, both new rows carry home.recipe.watchlistDefault.name and "Saved for later" carries none. A rename (PATCH to "Saved for later") clears the key through the existing trigger. TestAdminSectionFromPresetKeysItsTitleDB fails on the merge base for the reported reason.

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

Fixed on this branch (cd6e304)

  • The title_key field description and the title_keys.go header now name the kept-preset-name case. openapi.json and the web schema are regenerated, and their verify targets pass.
  • The DB test finds its bulk-created row by id instead of comparing the test host's clock with the database's.
  • The PR body's Other clients: and Validation tasks: lines are corrected.

Left for the maintainers

  • Maintainer decision: which keys a section title_key may carry (thread). Android's ServerText.sectionTitle and Roku's sectionTitles table accept only home.section.* keys, following docs/architecture/i18n.md. Web and Apple translate the new key. The options are to widen the contract to preset name keys (update i18n.md, then file Android and Roku parity issues), or to keep home.section.* and add catalog entries for the presets that need them. Until that's settled, Closes #5440 would close an issue whose Android case is unchanged.
  • A row added from the "A row of collections" preset is titled "Collections" by the web builder, which isn't the preset's name, so it still gets no key.
  • Keys are set only at create time. Switching a keyed row to another variant in the editor changes its title to that variant's preset name, and the update clears the key. Re-keying on update would be a natural follow-up once the contract question is settled.
  • Rows created before this change keep an empty key, as the PR's Risks section says. There's no backfill migration.
  • Rows a profile adds for itself from the gallery aren't keyed on main either. That's filed as Home rows a profile adds from a gallery preset stay English on translated clients #5683, to follow this merge.

Validated features. Curated home sections #1140 C1 (server contract) and #1141 C1 (web admin) see a minor change: a row created under a preset's name now has title_key, and English titles are unchanged. A rename still clears the key (checked live), so no passed case regresses. The client home-row cases are unchanged for English fixtures.

User manual. Unaffected: the manual doesn't describe how row titles are translated.

Council (round 1, at 0e3f21c). GPT-6.2 Sol (medium): 8/10. Claude Opus 5.5 (medium): 8.5/10. Gemini 4 Neon (medium): 6.5/10. All three flagged the stale contract text, which is now fixed. Gemini and a code-review finder raised the native-client key gap, which is the decision above. The update-path and profile-row gaps are listed above. The fix commit changes only docs and a test, so no second round ran.

Fit: 8/10 · Readiness: 6/10 — conditional (assuming CI is green)

Fit: a server-side key at create time is the smallest fix that follows the existing title-key design, and every client benefits without an API change. It adds a new kind of key to title_key, which is the open decision. Readiness: the behavior is shown live and by a test that fails on the base, and the validation board was checked. It holds at 6 until the key decision is made and the Android and Roku side is handled or ruled out.

…w-title-key

# Conflicts:
#	scripts/ci/db-contracts.txt

@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 posted: 1

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: 196942dc-68ac-4c21-a61b-de7b713ae1bf
Commits

Reviewing files that changed from the base of the PR and between 0e3f21c and 03b87c2.

Files selected for processing: 6

  • contracts/api/v2/openapi.json
  • internal/api/handlers/admin_section_preset_title_key_db_test.go
  • internal/apiv2/library_views.go
  • internal/sections/title_keys.go
  • scripts/ci/db-contracts.txt
  • web/src/api/v2/schema.ts

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

},
"title_key": {
"description": "Key of the shared translation catalog message whose English is title, present only while title is the server's own text: a built-in or generated section, recommendation row or request Discover row name, or a seasonal row's built-in in-season title. A client that has the key shows its translation, filling title_args, and otherwise shows title. Absent when an administrator or the profile typed the title, except that upgrading keyed existing titles identical to a built-in name, and a profile title equal to the administrator's keeps the key. A client acts on title_key whenever it is present",
"description": "Key of the shared translation catalog message whose English is title, present only while title is the server's own text: a built-in or generated section, recommendation row or request Discover row name, or a seasonal row's built-in in-season title. A client that has the key shows its translation, filling title_args, and otherwise shows title. Absent when an administrator or the profile typed the title, except that upgrading keyed existing titles identical to a built-in name, a row an administrator added from a section gallery preset keeps the preset's display_name_key while its title is the preset's name, and a profile title equal to the administrator's keeps the key. A client acts on title_key whenever it is present",

@coderabbitai coderabbitai Bot Nov 30, 2026 •

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 · Heavy lift

Make preset keys usable by the affected clients.

For a new Watchlist row, this contract permits home.recipe.watchlistDefault.name. Android and Roku currently translate only home.section.* keys, so they still show the English title. This leaves the Android outcome requested by the linked issue unresolved. Use a key those clients support or coordinate client support for preset keys.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the open maintainer decision in the review thread on internal/sections/recipes/text_keys.go: widen title_key to preset name keys and file Android and Roku parity issues, or keep home.section.* and add catalog entries for the presets. I'll make whichever change they pick. Until then, nothing changes here.

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

Labels

bug Something isn't working go Pull requests that update go code impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] A home row added from the Watchlist preset has no title_key, so translated clients show "Watchlist" in English

2 participants