Skip to content

feat(ratings): rate titles from 1 to 10 with half stars - #4398

Merged
Quick104 merged 8 commits into
Silo-Server:mainfrom
Rhainland:feat/ten-point-ratings
Nov 17, 2026
Merged

Quick104 merged 8 commits into
Silo-Server:mainfrom
Rhainland:feat/ten-point-ratings

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #3890
Validation tasks: changes #1183 C1 (a rating is now 1 to 10, so 6 to 10 are accepted and 11 is refused); changes #1184 C1 (the web rating control now sets half stars)

Other clients: Apple Silo-Server/silo-apple#1017; Android Silo-Server/silo-android#817; Roku N/A (Roku does not set or show personal ratings)

Personal ratings are whole stars from 1 to 5, while IMDb, TMDB, Trakt, Simkl and Plex all rate out of 10. Watch provider sync has to round a provider's 7/10 to 4 stars, so a 7 and an 8 become the same rating, and nobody can give a title three and a half stars. This change stores ratings from 1 to 10 and shows them as five stars with half stars, like Plex: 7 is three and a half stars.

Approach

  • Storage: a migration doubles every stored rating and the value each watch provider connection last agreed on. Ratings look the same after the upgrade, and on the next sync, a provider value that was rounded into a star (a 7 kept as 4 stars, now 8) differs on the provider's side only, so Silo imports it exactly. Down rounds back to stars, half up.
  • Watch provider sync sends and imports 1 to 10 unchanged.
  • Recommendations still weigh ratings in whole-star bands, through UserRating.Stars() (rounding half up), so their weights do not change.
  • Backups write the rating as score and still read star ratings from older backup files. Restore sets move to format version 7 and profile exports to version 2, so a server without this change refuses a new backup as too new instead of failing on score.
  • /api/v2: rating on the rating routes and user_rating on the item detail keep their names, and their range becomes 1 to 10. There is no capability operation for the scale: servers and clients update together before 1.0, so no client needs to tell a 1 to 5 server apart.
  • Web: each star is two radios. A click or tap on either half fills the whole star, and a click on the star that is set clears the rating. Half stars come from pressing and dragging sideways; the stars fill to the half under the pointer and the value is saved on release. A vertical swipe that starts on the stars still scrolls the page. The arrow keys step half a star, and the screen reader label reads "3.5 stars".

The maintainers chose to keep the fields. Reusing rating and user_rating keeps the contract small, and nothing uses the old range yet: no first-party app submits ratings through the API (Android's rating code has no screen that calls it, and Apple has none), and the web ships with the server. The cost is that an app written for 1 to 5 would read a 10 as out of range instead of getting an error. A new score / user_score field, which would make an old app's 1 to 5 request fail with a 422, was considered and not taken.

Validation

  • Go: the packages this touches (internal/apiv2, internal/catalog, internal/watchsync, internal/recommendations, internal/api, migrations) pass. In internal/api/handlers, three diagnostic and plugin upload tests fail on this machine with or without the change, from temp directory permissions.

  • Database tests: the rating-related entries in db-contracts.txt and db-pins.txt pass against Postgres 18, including the new migration test, which seeds star ratings and checks up and down. Up and down also ran on a database a server had already migrated.

  • Web: the component, item page and query hook tests pass (1,057 tests across 170 files); typecheck, ESLint and Prettier are clean.

  • Contracts: verify-apiv2-openapi, verify-apiv2-web-types, verify-apiv2-fixtures and the route manifest are current; make lint-changed reports 0 issues.

  • End to end on a branch build, in Chromium at desktop and phone size: the stored value matched after each of these steps.

    • An upgraded 4-star rating is stored as 8 and shows 4 stars.
    • A click on the left half of a star fills the whole star.
    • A mouse drag and a touch drag set half stars.
    • Arrow keys step half a star.
    • A tap on the set star clears it.
    • A vertical swipe scrolls without rating.
  • Review follow-up (main merged, plus the backup format versions and a hover preview fix in the rating control): the backup, catalog, apiv2 and StarRating tests pass, the API contract checks are current, and make lint-changed reports 0 issues.

Evidence

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

Surface and build: web app, desktop (1440 px) and phone (390 px) in Chromium. Before is main at abd85d0; after is this branch at 717e260. Both use the same database and title, rated 4 stars before the upgrade.

Risks

  • Migration: it rewrites every row of user_ratings and watch_provider_rating_items once. These are per-profile tables, so even a large server rewrites them quickly.
  • Open browser tabs: a web tab opened before the upgrade still sends 1 to 5 until it reloads, so a rating set there saves as half its value.
  • Settings copy: the watch provider Import ratings and Send ratings descriptions now say a 7/10 becomes 3.5 stars and back, from fix(catalog): describe watch provider rating sync on the 1 to 10 scale silo-translations#74, which has merged. .silo-translations pins its release, 2026.11.17-41be401.
  • First sync after the upgrade: a removal the scheduled sync has not sent yet comes back when its provider holds an odd value, and a profile that syncs ratings with two providers holding 7 and 8 for one title ends up with 7 on both. Both happen once; docs/architecture/watch-provider-rating-sync.md describes them.
  • User manual: the watch sync page says sync converts between the provider's 10-point ratings and Silo's stars. A siloserver.org issue covers it.
  • Overlap: fix(web): keep another device's metadata save after a failed rating write #4362 changes web/src/hooks/queries/ratings.ts, which this branch leaves as it is on main, and both change one test in personalLists.v2.test.ts. The two may conflict there.

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 T3 Code)
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Playwright
  • Model(s): claude-opus-5-5 (implementation and review), gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: two independent reviews of the full diff, Claude Opus 5.5 and GPT 6.1 Sol, covering correctness, repository standards and the discussion's requirements.
    • Fixed: a tap that drifted a pixel or two across a star's midline set a half star (a press now has to move 6 px before it counts as a drag); the migration had no test; the API contract doc did not describe the 1 to 10 range or the new operation; one duplicated test case.
    • Left as is, with reasons:
      • Removing a half-star rating takes two clicks, because a click on that star first fills it.
      • Old tabs send 1 to 5 (see Risks).
      • The discussion asks to show the number, such as "7/10", next to the stars. This pull request shows stars only, as Plex does. A number label would need new translated text and can follow if wanted.

Note

Change ratings to a 1-to-10 score scale with half-star UI

  • Replaces whole-star ratings (1-5) with scores from 1 to 10 across the stack: two score points equal one star, and clients show five stars with half-star steps.
  • Adds a database migration that doubles stored ratings, allows 1-10 in the checks, and removes rating sync cursors (migrations/sql/20261116115433_ratings_ten_point_scores.sql). Rollback converts scores back to stars with half-up rounding.
  • Reworks StarRating to render ten half-star radios with drag, tap, and keyboard support (StarRating.tsx).
  • Syncs provider ratings unchanged instead of converting to stars (ratings.go), updates recommendations to use score cutoffs (DislikedScoreMax), and bumps restore-set format to version 7 and profile export to version 2, keeping backward compatibility with legacy star-based backups.
  • Behavioral Change: catalog.UserRating renames Rating to Score (JSON key score), the v2 API accepts ratings 1-10 (rejects 11), and out-of-tree consumers of the old rating field or 1-5 scale need updating.

Macroscope summarized a383c69.

Personal ratings are stored and served as 1 to 10 and shown as five
stars with half stars. A migration doubles existing star ratings and the
values watch provider sync last agreed on, so ratings look the same after
the upgrade and the next sync recovers exact provider values.

The /api/v2 rating fields keep their names (rating, user_rating) with the
range widened to 1 to 10, and getPersonalRatingCapabilities reports the
scale for feature detection. Watch provider sync passes 1-10 values
through unchanged, recommendations keep weighing ratings in whole-star
bands, and backups write scores while still reading old star backups.

On the web, a click or tap fills the whole star and a sideways drag sets
half stars; the arrow keys step half a star.
@silo-triage silo-triage Bot added the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Nov 16, 2026
@silo-kody

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

@silo-triage silo-triage Bot added enhancement New feature or request priority: P2 Limited scope, workaround exists, or polish labels Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Personal ratings now use a 1–10 score scale across storage, APIs, sync, recommendations, backups, and the web rating control. The change also updates migration logic, validation, docs, fixtures, and localized provider-sync text.

Changes: Personal rating scale

Layer / File(s) Summary
Score model, migration, and backups
internal/catalog/ratings_repo.go, migrations/sql/*, migrations/ratings_ten_point_scores_test.go, internal/catalog/ratings_backup.go, internal/backup/*, docs/architecture/backups.md, scripts/ci/db-contracts.txt
The catalog model uses Score values and provides score-to-star helpers. The migration doubles stored ratings, changes the allowed range to 1–10, clears rating sync cursors, and converts values back on rollback. Backup export uses scores; import accepts scores or legacy whole-star ratings. Restore-set and profile-export versions advance.
Rating API and contracts
internal/apiv2/*, internal/api/handlers/*, contracts/api/v2/*, web/src/api/*, web/src/hooks/queries/personalLists.v2.test.ts, web/src/pages/ItemDetail/components/ActionBar.test.tsx, docs/architecture/api-contract.md
The API validates and returns ratings on the 1–10 scale. Catalog rating scores map to API rating values. Schemas, fixtures, handler tests, client documentation, and examples reflect the updated range.
Provider rating synchronization
internal/watchsync/*, web/src/locales/*, docs/architecture/watch-provider-rating-sync.md, .silo-translations
Provider ratings and local scores are imported, compared, and exported unchanged. Sync state uses scores. Tests and localized descriptions use the updated scale and examples.
Recommendation score handling
internal/recommendations/*, internal/api/handlers/recommendations.go, docs/architecture/recommendations.md
Disliked-title filtering uses a score threshold of 4. Recommendation code that uses whole-star values derives them from scores. Test fixtures use the 1–10 scale.
Half-star rating control
web/src/components/StarRating.*, web/src/app.css
The control presents ten half-star choices and supports pointer taps, dragging, keyboard selection, clearing, and pending selections. Styles and tests cover preview, selection, and cancellation behavior.

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

Change: Feature · Severity of issue fixed: Medium

Possibly related issues

  • Silo-Server/silo-server#1182 — The web rating control, rating scale, and half-star input behavior changed, which matches the issue scope.
  • Silo-Server/silo-server#1183 — The valid rating range and 422 validation path changed from 1–5 to 1–10, which matches the issue scope.

Suggested reviewers: quick104

Merge Risk: Moderate · up to a383c

Ratings move to a 1–10 scale. A browser tab opened before the upgrade can save a five-star click as 2.5 stars. After the upgrade, the first provider sync can restore a rating the user had just removed, when the provider's score is odd. Both are one-time effects and the maintainers accepted them, so the change is mergeable with that awareness.

Security architecture risk: Low · up to a383c

The upgrade can restore a rating that a user removed locally before that removal reached a connected provider. This is a bounded state-ownership issue: the user can remove it again. No introduced security-control bypass was established.

Retained concerns

  • Low · reliability · inferred: The scale migration can undo a pending local rating removal without an actual provider edit. For an unchanged provider score of 7, the old agreed value 4 becomes 8 while the local rating remains absent. The merge now treats both sides as changed and imports 7, losing the pending removal. This affects preservation of user-owned state during rollout, not cross-account authorization. It is documented and recoverable by removing the rating again.
Security review details

Security Blast Radius

  • observed — The migration transforms all stored rating and agreement rows. The identified reconciliation consequence is bounded to affected profiles and their connected provider state; the inspected import write uses the connection's user and profile identity.

Trust Boundaries and Controls

  • observed — The release-download boundary still checks the archive against the repository-pinned digest before extraction. Archive link and traversal checks, generated-output allowlists, and destination symlink checks precede installation. A mismatching pin fails before extraction; whether the new digest identifies the intended published release remains unverified.

Resilience and Maintainability Implications

  • observed — The unchanged translation installer copies outputs, prunes obsolete files, saves the file list, and replaces the config last. These are separate filesystem operations, not an atomic installation transaction; that pre-existing property is not an introduced PR concern.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'feat(ratings): rate titles from 1 to 10 with half stars' matches the main change: personal ratings move from whole stars 1-5 to scores 1-10 displayed as five stars with half-star increments…
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 is specific and on-topic. It explains the move from whole-star ratings (1-5) to a 1-10 score shown as five stars with half steps, and it lists the storage migration, provider sync, rec…
Full details: Title check

Explanation

The title 'feat(ratings): rate titles from 1 to 10 with half stars' matches the main change: personal ratings move from whole stars 1-5 to scores 1-10 displayed as five stars with half-star increments. The changeset covers the storage migration, API range, web StarRating control, and sync/backup changes, all tied to this rating scale change. The title is specific and concise.

Full details: Description check

Explanation

The description is specific and on-topic. It explains the move from whole-star ratings (1-5) to a 1-10 score shown as five stars with half steps, and it lists the storage migration, provider sync, recommendations, backups, API, web control, validation, and risks. These all match the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: 75e04ad3-10ed-43f1-abbd-5dce1bf48a79
Commits

Reviewing files that changed from the base of the PR and between e8994a8 and a383c69.

Files selected for processing: 2

  • .silo-translations
  • web/src/locales/keys.ts
Files skipped from review as they are similar to previous changes: 1

  • web/src/locales/keys.ts

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 on lines +16 to +20
ALTER TABLE public.watch_provider_rating_items
DROP CONSTRAINT watch_provider_rating_items_synced_rating_check;
UPDATE public.watch_provider_rating_items SET synced_rating = synced_rating * 2;
ALTER TABLE public.watch_provider_rating_items
ADD CONSTRAINT watch_provider_rating_items_synced_rating_check CHECK (synced_rating BETWEEN 1 AND 10);

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

Existing rating cursors prevent recovery of exact provider scores

Previously rounded values remain incorrect indefinitely because incremental providers do not resend unchanged odd scores. Reset the rating import and provider rating cursors during migration so the next import performs a full read.

Prompt for LLM
File migrations/sql/20261116115433_ratings_ten_point_scores.sql, lines 16-20:

Existing rating cursors prevent recovery of exact provider scores

Existing incremental rating cursors survive the migration, so providers that return only changes do not resend unchanged odd scores and the previously rounded local values remain incorrect indefinitely. Reset the rating import and provider rating cursors during migration so the next import performs a full read.

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 c7fb4b7. The migration now drops every sync cursor key containing .ratings (the same rule as withoutRatingCursors), so the next sync does a full rating read. The migration test checks that rating cursors are removed and the watched cursor stays.

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. Clearing the rating cursors should allow the next sync to recover exact provider scores, while preserving the watched cursor avoids an unnecessary watched-history resync. The migration test covers both behaviors.

I haven’t independently verified commit c7fb4b794.

@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: 4

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: a910f437-9c23-41c9-9fd0-24b1beee5dd3
Commits

Reviewing files that changed from the base of the PR and between 17d5376 and 717e260.

Files selected for processing: 51

  • contracts/api/v2/fixtures/get_rating_ok.json
  • contracts/api/v2/fixtures/index.json
  • contracts/api/v2/fixtures/list_ratings_ok.json
  • contracts/api/v2/fixtures/set_rating_out_of_range.json
  • contracts/api/v2/openapi.json
  • docs/architecture/api-contract.md
  • docs/architecture/recommendations.md
  • docs/architecture/watch-provider-rating-sync.md
  • internal/api/handlers/catalog_resources.go
  • internal/api/handlers/ratings.go
  • internal/api/handlers/ratings_test.go
  • internal/api/handlers/recommendations.go
  • internal/api/testdata/media_routes.txt
  • internal/apiv2/catalog_items.go
  • internal/apiv2/fixtures_test.go
  • internal/apiv2/ratings.go
  • internal/apiv2/ratings_test.go
  • internal/apiv2/request_lifecycle.go
  • internal/apiv2/router.go
  • internal/catalog/detail.go
  • internal/catalog/ratings_backup.go
  • internal/catalog/ratings_backup_test.go
  • internal/catalog/ratings_page_index_db_test.go
  • internal/catalog/ratings_repo.go
  • internal/recommendations/access_postgres_test.go
  • internal/recommendations/aversion.go
  • internal/recommendations/collaborative.go
  • internal/recommendations/defaultrows_postgres_test.go
  • internal/recommendations/reader_test.go
  • internal/recommendations/relevance_postgres_test.go
  • internal/recommendations/repo_stale_test.go
  • internal/recommendations/signals.go
  • internal/recommendations/signals_test.go
  • internal/recommendations/taste.go
  • internal/recommendations/taste_test.go
  • internal/recommendations/types.go
  • internal/recommendations/worker_postgres_test.go
  • internal/watchsync/ratings.go
  • internal/watchsync/ratings_test.go
  • internal/watchsync/types.go
  • migrations/ratings_ten_point_scores_test.go
  • migrations/sql/20261116115433_ratings_ten_point_scores.sql
  • scripts/ci/db-contracts.txt
  • web/src/api/types.ts
  • web/src/api/v2/operations.ts
  • web/src/api/v2/schema.ts
  • web/src/app.css
  • web/src/components/StarRating.test.tsx
  • web/src/components/StarRating.tsx
  • web/src/hooks/queries/personalLists.v2.test.ts
  • web/src/pages/ItemDetail/components/ActionBar.test.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.

return apiError(http.StatusNotFound, "not_found", "Item not found")
}
if err := h.ratingsRepo.Set(ctx, userID, profileID, itemID, rating); err != nil {
if err := h.ratingsRepo.Set(ctx, userID, profileID, itemID, score); err != nil {

@coderabbitai coderabbitai Bot Nov 16, 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.

Major · Data Integrity & Integration · Heavy lift

Prevent old clients from saving ratings on the wrong scale.

An old open tab submits 5 for five stars. This call saves 5 as a ten-point score, so the rating becomes 2.5 stars and can be sent to the provider. The new capabilities endpoint cannot protect clients that do not know about it. Distinguish or reject old-scale writes before saving them.

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.

Leaving this as is. No client other than the web app submits ratings today: Android has no screen that calls it and Apple has none. The web app ships with the server, so the only old-scale writer is a tab opened before the upgrade, which goes away on reload. The PR body lists this under Risks, and its maintainer note covers the alternative: a new score field that makes an old 1 to 5 request fail with a 422.

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.

The maintainers decided to keep rating and user_rating on the 1 to 10 scale. No first-party client sends ratings yet, and servers and clients update together before 1.0. The getPersonalRatingCapabilities operation was dropped for the same reason (9fa1fb1).

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

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.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Comment thread internal/catalog/ratings_backup.go Resolved
continue
}
item.remote = starsFromProviderRating(match.row.Rating)
item.remote = match.row.Rating

@coderabbitai coderabbitai Bot Nov 16, 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.

Major · Data Integrity & Integration · Heavy lift

Preserve pending removals when migrating rounded agreements.

Before upgrade, an agreed four-star rating and provider score 7 compare as equal. If the user has removed the local rating, sync sends that removal.

After migration, the agreement is 8, the local value is 0, and this assignment makes the remote value 7. decideRating(0, 7, 8) selects import because both sides appear changed and a rating beats a removal. SetIfUnchanged then restores the deleted rating as score 7.

Preserve enough migration state to distinguish an old rounding difference from a new provider edit before applying conflict resolution. Cover a pending local removal as well as the unchanged-local migration case.

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.

Leaving this as is. It needs a removal made after the last sync and before the upgrade, on an item whose provider value is odd. Sync runs on a schedule, so that window is short. The outcome also follows the existing conflict rule (a rating beats a removal, so a conflict never deletes): the rating comes back at the provider's value and the profile can remove it again. Telling a rounding difference apart from a provider edit would mean keeping migration-only state in the sync decision indefinitely, which costs more than this one-time edge case.

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.

One correction to the window. A local removal isn't sent right away: sendLocalRatings skips removals and leaves them for the scheduled merge ("A removal waits for the scheduled merge"). The removals that come back are any made between the last scheduled sync before the upgrade and the first sync after it that hasn't sent them yet, on titles whose provider rating is odd. The effect is still one-time, and the profile can remove the rating again. The rating sync doc now describes it, and whether to accept it or add one-time handling is left for the maintainers to decide.

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

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.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

An incremental provider read never resends an unchanged 7, so a value
rounded into a star before the upgrade would stay at 8. The migration now
drops the rating read cursors so the next sync reads every rating.

Also bound a legacy backup's star rating before converting it, so a huge
value cannot overflow into an accepted negative score.
@silo-kody

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

Quick104 and others added 3 commits November 17, 2026 03:33
…rsion

A rating's backup entry now carries `score` instead of `rating` stars, but
the restore set stayed at version 6 and the profile export at version 1.
An older server reads both strictly, so it failed the ratings section
with `json: unknown field "score"` instead of refusing the file as being
from a newer Silo. Bump the restore set to version 7 and the profile
export to version 2, and say in the backups doc which versions carry
stars. Also correct a comment that still called ratings stars.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…clicked star

A click holds the stars' hover preview off until the pointer leaves the
star, so clearing a rating doesn't look undone under a pointer that has not
moved. Each star is now two radios, and leaving one half for the other
ended the hold, so a pointer drifting across the star's middle redrew the
old fill. Keep the hold while the pointer moves into the star's other half.

Also say in the rating sync doc what the first sync after the move to
scores still changes: a value imported from one provider is sent to a
second provider that held the star's other value, and an unsent removal
comes back when its provider holds an odd value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@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 c7fb4b7. Four findings below. I'm pushing fixes for three of them to this branch, along with a merge of main. The fourth needs a translations catalog change, which the maintainers will handle. A summary comment follows once the fixes are pushed.

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

Comment thread internal/catalog/ratings_backup.go Resolved
Comment thread internal/apiv2/request_lifecycle.go Resolved
Comment thread web/src/components/StarRating.tsx Resolved
@silo-kody

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

Copy link
Copy Markdown
Contributor

Review summary

Reviewed head: a383c69 (c7fb4b7 with main merged, the review fixes, the maintainers' decisions, and translations pinned to a published release). Main merged without conflicts. The OpenAPI, web types, fixtures and route inventory checks are current. The API contract diff against main is one change: setRating's rating maximum goes from 5 to 10.

Fit: 8/10 · Readiness: 9/10 — ready (CI green on a383c69)

  • Fit: Ratings from providers that rate out of 10 now keep their value instead of rounding into a star. One model change carries that through storage, sync, backups and the web control, with no new API surface. It stops short of 9 because the migration rewrites every stored rating during a polish phase.
  • Readiness: The fixes, the decisions and the settings copy are all on this branch. It stops short of 10 because the one-time sync effects below stay as they are.

Fixed on this branch

Left for the maintainers

  • One-time sync effects. On the first sync after the upgrade, a removal the scheduled sync hasn't sent yet comes back when its provider holds an odd value. A profile that syncs ratings with two providers holding 7 and 8 for one title ends up with 7 on both. The thread on internal/watchsync/ratings.go has the detail, and the rating sync doc and the Risks section describe both. Preventing the first would take migration-only state in the sync decision.

Validation

  • Tests that failed on main: the StarRating and ActionBar tests (5 radios instead of 10, no half-star drag), and the new hover test against this PR before its fix. The Go tests don't build on main because of the Rating to Score rename, so they aren't evidence. The migration test ran in CI.
  • Validated features: Watchlist / Favorites / Ratings — Server #1183 C1 (a rating is now 1 to 10) and Watchlist / Favorites / Ratings — Web #1184 C1 (half stars) change, as the PR body says. Watchlist / Favorites / Ratings — Web #1184 C3 keeps its write and rollback path. I checked that a failed write can't leave the new control showing an unsaved value: a write fails only through the request, after the optimistic value has rendered. I couldn't read the validation board, so this comes from the task issues.
  • Cross-provider review: one round with GPT 6.1 Sol on c7fb4b7. It found the backup versions (fixed), the removal case (left for the maintainers above), and a fast-failure display case that no real request can reach.
  • The evidence page still matches this head: the fixes don't change anything its captures show.

Other clients and docs

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

Quick104 and others added 2 commits November 17, 2026 04:25
getPersonalRatingCapabilities only told a client whether the server
predates ratings from 1 to 10. Before 1.0, servers and clients update
together, and from 1.0 every server would answer 10, so no client needs
to branch on it. Remove the operation; rating and user_rating document
the 1 to 10 range themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…alog

The Import ratings and Send ratings descriptions said a provider's 7/10
became 4 stars and 4 stars became 8/10. Ratings now sync unchanged, so
they say a 7/10 becomes 3.5 stars and back. Synced from the unmerged
silo-translations branch; re-sync with --version once it is released.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 17, 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 .silo-translations Outdated
Comment on lines +2 to +3
version=local-ae1745ae524f
sha256=-

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

Local translation pin breaks the default sync command

scripts/sync-translations rejects local-* versions without a separate checkout, so the standard sync command fails. Pin a published translation release and its checksum so contributors can reproduce the installed translations.

Prompt for LLM
File .silo-translations, lines 2-3:

Local translation pin breaks the default sync command

The local version pin makes the standard `scripts/sync-translations` invocation fail because the script rejects `local-*` versions without a separate checkout. Pin a published translation release and its checksum so contributors can reproduce the installed translations.

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

Choose a reason for hiding this comment

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

Intended for now. The catalog change is in Silo-Server/silo-translations#74, which hasn't merged, so this branch is synced with --local as the repository's translation rules say to do in that state. Once #74 merges and publishes its release, this branch re-syncs with scripts/sync-translations --version <release>, which pins the release and its checksum. The PR body and the review summary list that as a step before merge.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That makes sense. The local pin is intentional while the translation change is pending, and the PR already identifies re-syncing to the published release and checksum as a pre-merge step. My suggestion did not account for that workflow; it does not need to be addressed now.

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.

Done in a383c69. Silo-Server/silo-translations#74 merged and published release 2026.11.17-41be401, and scripts/sync-translations --version 2026.11.17-41be401 now pins that release and its checksum. The locale files didn't change from the earlier local sync; only the pin and the keys.ts header did.

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

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 the follow-up. With the published release and checksum pinned, the original concern about the local pin is addressed.

Quick104 added a commit to Silo-Server/silo-translations that referenced this pull request Nov 17, 2026
#74)

* fix(catalog): describe watch provider rating sync on the 1 to 10 scale

Silo-Server/silo-server#4398 stores ratings from 1 to 10, shown as half
stars, and syncs them with providers unchanged. The Import ratings and Send
ratings descriptions still described the old rounding into whole stars.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(translations): watch provider rating sync descriptions in twenty-one languages

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Silo-Server/silo-translations#74 merged and published, so the web locales
now come from that release instead of the unmerged catalog branch. The
locale files are unchanged; only the pin and the keys.ts header move.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Nov 17, 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 ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

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/XXL 1000–2999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants