Skip to content

feat(tv): add Release Date library sort on Android TV - #433

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:feat/library-release-date-sort
Oct 2, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:feat/library-release-date-sort

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #8 (Browse: sort + filter), #348 C1

Android TV library browse has no Release Date sort. Its only date option, labelled "Year", sends year, which orders titles by year alone, so two movies from the same year come back in title order instead of the order they came out. The phone app and web already sort by release date. This change adds a real Release Date option to the Android TV library sort menu and keeps Year next to it.

Approach

The Year entry was named ReleaseDate in code, and a comment said the server did not support release_date. The server does support it, and the phone app already sends it. That entry is now Year and still sends year, so a sort saved before this change restores as Year. A new Release Date entry sends release_date, newest first by default. Library browse and library collection grids list both. Favorites and watchlist keep Year only.

The iOS, tvOS, and macOS change is Silo-Server/silo-apple#567.

Validation

  • androidTvApp library unit tests: pass. The existing sort-retention test now selects Release Date and expects -release_date.
  • Supply-chain checks and :androidApp / :androidTvApp debug builds: pass.
  • Lint (debug and vital release for android-shared, androidApp, androidTvApp): no new issues.
  • testDebugUnitTest: 693 of 694 pass. ReflowStyleTest in the phone ebook reader fails on a machine with a decimal-comma locale (1,9 instead of 1.9) and passes under en_US; this branch does not touch it.
  • Manual on an Android TV emulator (API 34) against a local server whose two 2010 movies have different release dates: Release Date listed them in release order, Year listed them in title order.

Risks

None identified.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code; OpenAI Codex CLI (review only)
  • Model(s): claude-opus-5-5; gpt-6-astra and gpt-6.1-sol (review only)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: Claude Code (claude-opus-5-5) and separate read-only Codex reviews with gpt-6-astra and gpt-6.1-sol reviewed this diff and the matching Apple change. None reported findings.

Note

Add Release Date and Year sort options to Android TV library

  • Splits the previous Year option into two: Release Date uses the release-date sort key, and Year uses the year sort key, in TvLibrarySortOption in TvLibraryDetailViewModel.kt
  • Adds Year to the direction-label mapping, the available-sort lists for non-audiobook and personal lists, and the descending defaultOrder group
  • Updates tests to assert the release-date sort key and its persistence after screen re-entry
  • Behavioral Change: the Release Date option now sends the release-date sort key instead of the year sort key it previously used

Macroscope summarized 3354787.

The library sort entry labelled Year was named ReleaseDate and sent
year, under a stale note that the server lacked release_date. Rename
it to Year (still sends year, so saved sorts restore unchanged) and add
a Release Date entry that sends release_date, newest first. Library
browse and collection grids list both; favorites and watchlist keep
Year only.
@kody-ai

kody-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e88924bf-1e5f-4dc4-b1cd-ac3e52b8a13c

📥 Commits

Reviewing files that changed from the base of the PR and between e24d9e1 and 3354787.

📒 Files selected for processing (2)
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailViewModel.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibrarySubdestinationViewModelTest.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.


📝 Walkthrough

Walkthrough

The TV library sort options now distinguish release date from year. The changes update sort choices and descending defaults, and adjust test assertions for the release-date request and retained browse filter.

Changes

TV library sorting

Layer / File(s) Summary
Define and apply sort options
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailViewModel.kt, androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibrarySubdestinationViewModelTest.kt
ReleaseDate now uses the “Release Date” label and release_date wire value. Year is a separate option used in video-library and personal-list sort choices, with the oldest/newest direction label and descending default. Test assertions now expect -release_date and the retained release_date filter.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: quick104

Merge Risk: 🟡 Moderate · up to 33547

The new Release Date choice may return the default ordering instead of release-date ordering. Year and other browsing remain available, but the catalog needs to support this sort for the PR’s main feature to work reliably.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 33547

The change adds an ordering option without changing the selected library or collection. Existing Year values remain compatible, but server support for Release Date could not be independently confirmed.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The newly reachable input is a fixed ordering key on existing library and collection reads. The inspected client paths do not add a catalog source, change library or collection identity, or confer additional authority. Backend exposure is not independently established.

Trust Boundaries and Controls

  • observed — The catalog transport includes the query in its continuation request key and rejects continuation reuse after a query change. It invokes the existing identity-policy transport and attaches the available authentication scope to GET and POST requests. This demonstrates client control wiring, not verified backend authorization enforcement.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Release Date sort option to the Android TV library.
Description check ✅ Passed The description directly explains the Release Date and Year sort changes, affected screens, validation, and known unrelated test failure.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Quick104
Quick104 merged commit d7d8580 into Silo-Server:main Oct 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants