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(calendar): show DIGITAL and PHYSICAL badges on movie releases - #722
Silo-Server/silo-server#3240 lists each calendar movie on its first home release instead of its theatrical date. On /api/v2/calendar, the movie's badges says which release that is: digital or physical. The phone and TV calendars hide badge values they don't know, so the movie appears on the right day but nothing says whether it's a digital or a disc release.
The phone (including tablet and foldable) and TV calendars now label these DIGITAL and PHYSICAL, in capitals like PREMIERE, NEW SEASON and FINALE.
Approach
The phone and TV calendar screens each had a private copy of the badge-to-label mapping. Both now call one shared calendarBadgeLabel in CalendarModels.kt, next to the new CalendarBadge.Digital and CalendarBadge.Physical, so the two apps can't drift apart. Unknown values still map to null and stay hidden.
The new badges use the existing calendar pill. Web gives them sky and emerald chips, but Android draws every calendar badge in one neutral style, FINALE included (web colours FINALE orange), so the label alone tells them apart.
The For You upcoming cards need no change: the app doesn't read upcoming_event, so it shows no badges there.
Validation
Shared unit test for the label mapping: written first and seen failing, then passing.
Surface and build: Calendar → All on Android phone, tablet, foldable (folded and open) and Android TV emulators. Before on origin/main3cecc7a66, after on this branch, with the same test library on a server running Silo-Server/silo-server#3240.
Risks
None identified. Without Silo-Server/silo-server#3240 the server never sends these values, so nothing changes on current servers.
Checklist
I read and can explain the complete diff.
This pull request addresses one concern.
The Evidence section shows every change a user can see, or says there is none.
Adversarial review: Independent Claude Opus 5.5 and GPT 6.1 Sol reviews of the branch diff for correctness, repo standards and issue Calendar: show DIGITAL and PHYSICAL badges on movie releases #720. Neither found a correctness or spec problem. Opus noted that the repo's testing guideline discourages tests for small changes. The test stays because test-first development was requested.
Silo-Server/silo-server#3240 lists calendar movies on their first home
release and tags each with a digital or physical badge. Label both in
the phone and TV calendars through one shared badge-label function.
ClosesSilo-Server#720
The shared calendar model adds DIGITAL and PHYSICAL badge labels and centralizes label mapping. The Android phone and TV calendar screens use that shared mapping. Tests cover all five recognized badges and an unrecognized badge.
Changes: Calendar badge labels
Layer / File(s)
Summary
Shared badge values and label mapping shared/src/commonMain/kotlin/org/siloserver/silo/model/calendar/CalendarModels.kt, shared/src/commonTest/kotlin/org/siloserver/silo/model/calendar/CalendarBadgeLabelTest.kt
The shared model adds Digital and Physical badge values and maps five recognized badge strings to uppercase labels. Tests check those labels and verify that an unrecognized badge returns null.
Phone and TV calendar integration androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/calendar/CalendarScreen.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/calendar/TvCalendarScreen.kt
Both calendar screens replace their local badge-label functions with the shared calendarBadgeLabel function.
Silo-Server/silo-android#698: Updates comments for the local calendar badge mappings that this PR replaces with a shared function.
Suggested reviewers:quick104
Merge Risk: Low · up to 291ba
Merge Risk:🔵 Low · up to 291ba
The change is broadly functional, but the large-text badge readability issue and naming violation should be addressed before or shortly after merge.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: displaying DIGITAL and PHYSICAL badges for movie releases in the calendar.
Description check
The description directly explains the badge additions, affected calendar surfaces, shared mapping, dependency, validation, and scope.
Linked Issues check
Issue #720 requires DIGITAL and PHYSICAL labels for the corresponding calendar badges on phone, tablet, and TV surfaces. CalendarBadge.Digital and CalendarBadge.Physical are added in `CalendarMode…
Out of Scope Changes check
The diff contains only the shared badge model and mapping, the phone and TV calendar integrations, and focused unit tests. Each change supports issue #720. No unrelated product behavior or unrelated f…
Full details: Linked Issues check
Explanation
Issue #720 requires DIGITAL and PHYSICAL labels for the corresponding calendar badges on phone, tablet, and TV surfaces. CalendarBadge.Digital and CalendarBadge.Physical are added in CalendarModels.kt. The shared calendarBadgeLabel maps digital to DIGITAL and physical to PHYSICAL, while preserving the existing labels and hiding unknown values. Both phone and TV calendar cards use this shared mapping. CalendarBadgeLabelTest covers all five labels and an unknown badge. No For You badge change is required because the PR states that this client does not read upcoming_event badges.
Full details: Out of Scope Changes check
Explanation
The diff contains only the shared badge model and mapping, the phone and TV calendar integrations, and focused unit tests. Each change supports issue #720. No unrelated product behavior or unrelated files are changed.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Visible change, but evidence is missing: Evidence: EVIDENCE_LINK is a placeholder, and no captures are attached. The validation description names devices and builds but does not let reviewers see the change.
DIGITAL/PHYSICAL calendar badges (CalendarScreen.kt, TvCalendarScreen.kt, and CalendarModels.kt): evidence is missing on Android phone, tablet, foldable folded and open, and Android TV. Please provide before-and-after captures of Calendar → All with the same data for each device, identifying the device and build or commit for each capture.
Suggested fix: replace EVIDENCE_LINK with the published evidence URL or attach the captures. No diff.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.
Digital and Physical are const val properties. The repository guideline requires Kotlin properties to use camelCase. Rename them to digital and physical, then update the references in calendarBadgeLabel. (raw.githubusercontent.com)
As per coding guidelines, Kotlin functions and properties use camelCase.
Source: Coding guidelines
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: d4a497d7-93c6-409a-aaea-859f413387f9
Commits
Reviewing files that changed from the base of the PR and between 3cecc7a and 8387d53.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
On the CodeRabbit nitpick about renaming CalendarBadge.Digital/Physical to camelCase: keeping PascalCase. These are constants in the existing CalendarBadge object, whose other members are SeriesPremiere, SeasonPremiere and Finale, and the sibling CalendarFilter and CalendarItemType objects use the same style. Lower-casing only the two new ones would make the object inconsistent.
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 requestimpact: polishAnnoyance, cosmetic, or nice-to-havepriority: P2Limited scope, workaround exists, or polishsize/M50–199 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
Closes #720
Related issue: Silo-Server/silo-server#3240
Validation tasks: none
Silo-Server/silo-server#3240 lists each calendar movie on its first home release instead of its theatrical date. On
/api/v2/calendar, the movie'sbadgessays which release that is:digitalorphysical. The phone and TV calendars hide badge values they don't know, so the movie appears on the right day but nothing says whether it's a digital or a disc release.The phone (including tablet and foldable) and TV calendars now label these DIGITAL and PHYSICAL, in capitals like PREMIERE, NEW SEASON and FINALE.
Approach
The phone and TV calendar screens each had a private copy of the badge-to-label mapping. Both now call one shared
calendarBadgeLabelinCalendarModels.kt, next to the newCalendarBadge.DigitalandCalendarBadge.Physical, so the two apps can't drift apart. Unknown values still map to null and stay hidden.The new badges use the existing calendar pill. Web gives them sky and emerald chips, but Android draws every calendar badge in one neutral style, FINALE included (web colours FINALE orange), so the label alone tells them apart.
The For You upcoming cards need no change: the app doesn't read
upcoming_event, so it shows no badges there.Validation
origin/mainneither shows a badge.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-722/
Surface and build: Calendar → All on Android phone, tablet, foldable (folded and open) and Android TV emulators. Before on
origin/main3cecc7a66, after on this branch, with the same test library on a server running Silo-Server/silo-server#3240.Risks
None identified. Without Silo-Server/silo-server#3240 the server never sends these values, so nothing changes on current servers.
Checklist
AI Disclosure