Skip to content

feat(calendar): show DIGITAL and PHYSICAL badges on movie releases - #722

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:feat/calendar-home-release-badges
Nov 4, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:feat/calendar-home-release-badges

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Depends on Silo-Server/silo-server#3240 — merge only after that server PR is merged and deployed; until then the server never sends these badges.

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'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

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/main 3cecc7a66, 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.

AI Disclosure

  • Harness: Claude Code (T3 Code)
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Gradle, Android Emulator, adb
  • Model(s): claude-opus-5-5; gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • 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.

Closes Silo-Server#720
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 29, 2026
@silo-kody

silo-kody Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

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.

Priority: Normal

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

Change: Feature · Severity of issue fixed: Medium

Possibly related PRs

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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 Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: displaying DIGITAL and PHYSICAL badges for movie releases in the calendar.
Description check Passed The description directly explains the badge additions, affected calendar surfaces, shared mapping, dependency, validation, and scope.
Linked Issues check Passed 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 Passed 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.

@macroscopeapp

macroscopeapp Bot commented Oct 29, 2026

Copy link
Copy Markdown

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.

Posted via Macroscope — Visible change evidence

@silo-triage silo-triage Bot added enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Oct 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Nitpick comments: 1
shared/src/commonMain/kotlin/org/siloserver/silo/model/calendar/CalendarModels.kt: 1

29-32: Trivial · Maintainability & Code Quality · Quick win

Use camelCase for the new badge properties.

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.

Files selected for processing: 4
  • 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
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/calendar/CalendarModels.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/calendar/CalendarBadgeLabelTest.kt

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

@Rhainland

Copy link
Copy Markdown
Contributor Author

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.

@Quick104
Quick104 merged commit 64ae5f0 into Silo-Server:main Nov 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar: show DIGITAL and PHYSICAL badges on movie releases

2 participants