Repository navigation
Show the server community rating on phone and TV title pages - #42
Conversation
Decode the optional community_rating ({average, count}) on item detail
(v2 read model and the domain ItemDetail) and append it to the shared
ratings row as "★ 4.2 · 7 ratings". The row is hidden when the server
omits the field (older servers, or fewer than three ratings). On phone
widths the community entry rides after the three-external-rating limit.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The community rating appears where intended when available and remains hidden when absent. No actionable issue identified here prevents merging after normal checks. Pre-merge checks ·
|
Title pages on phone and TV now show the server's community rating in the ratings row, after the external ratings:
★ 4.2 · 7 ratings.Depends on the parallel prairie-server PR that adds
community_rating({ "average": 4.2, "count": 7 }) to item detail. Without it, or when a title has fewer than three ratings, the server omits the field and the entry stays hidden. Parsing tolerates the field's absence.Changes
CommunityRatingmodel; optionalcommunity_ratingonItemDetailReadV2(the v2 detail read the app uses) and the domainItemDetail(also covers the v1 shape and the detail cache).ExternalRatings.community()builds the entry andtitleRatings()appends it, so both phone layouts and the TV hero / series-episode facts lines pick it up with no screen changes. It returns null for values outside 1–5 or a count of zero.forPhone()keeps the community entry past the three-external limit.RatingEntrygives TalkBack "Community rating 4.2 · 7 ratings" in place of the star glyph.Notes
setRating/clearRatingon the phone and TV detail view models, backed byuser_rating). This PR doesn't change it; it only displays the aggregate.🤖 Generated with Claude Code
Summary by CodeRabbit