You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ratings): rate titles from 1 to 10 with half stars - #4398
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)
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.
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.
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.
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.
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.
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.
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.
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 ratings and local scores are imported, compared, and exported unchanged. Sync state uses scores. Tests and localized descriptions use the updated scale and examples.
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.
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: 4
Check name
Status
Explanation
Title check
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
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
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.
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
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.
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.
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).
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!
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.
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.
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.
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.
…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]>
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.
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
Backup format versions (95cfe57). Backups now write score, so the restore set moves to version 7 and the profile export to version 2. Before the bump, a server without this PR failed on a new profile export with json: unknown field "score". With it, that server says the export is from a newer Silo. I checked both documents against main's reader.
A comment on itemRatingReader that still called the values stars.
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.
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.
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]>
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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.
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.
#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]>
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 settingsReview 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
Main rewrote StarRating for half stars (#4398); Left and Right now step half
a star there and pass through at either end. TourHost takes main's version,
which already restores focus to the primary button after a save (#4296).
The test files main pruned in #4465 stay deleted.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enhancementNew feature or requestpriority: P2Limited scope, workaround exists, or polishsize/XXL1000–2999 added + deleted lines (all files); change volume, not priority.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
UserRating.Stars()(rounding half up), so their weights do not change.scoreand 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 onscore./api/v2:ratingon the rating routes anduser_ratingon 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.The maintainers chose to keep the fields. Reusing
ratinganduser_ratingkeeps 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 newscore/user_scorefield, 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. Ininternal/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.txtanddb-pins.txtpass 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-fixturesand the route manifest are current;make lint-changedreports 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.
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-changedreports 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
mainat abd85d0; after is this branch at 717e260. Both use the same database and title, rated 4 stars before the upgrade.Risks
user_ratingsandwatch_provider_rating_itemsonce. These are per-profile tables, so even a large server rewrites them quickly..silo-translationspins its release,2026.11.17-41be401.docs/architecture/watch-provider-rating-sync.mddescribes them.web/src/hooks/queries/ratings.ts, which this branch leaves as it is onmain, and both change one test inpersonalLists.v2.test.ts. The two may conflict there.Checklist
AI Disclosure
Note
Change ratings to a 1-to-10 score scale with half-star UI
StarRatingto render ten half-star radios with drag, tap, and keyboard support (StarRating.tsx).DislikedScoreMax), and bumps restore-set format to version 7 and profile export to version 2, keeping backward compatibility with legacy star-based backups.catalog.UserRatingrenamesRatingtoScore(JSON keyscore), the v2 API accepts ratings 1-10 (rejects 11), and out-of-tree consumers of the oldratingfield or 1-5 scale need updating.Macroscope summarized a383c69.