Skip to content

feat(browse): add Release Date library sort - #567

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 #22 (Browse: sort + filter), #23 (Browse: sort + filter), #337 C1, #338 C1

Library browse on iOS, tvOS, and macOS can sort by Year but not by release date, while the web app and Android phone offer Release Date. Year orders titles by year alone, so two movies from the same year come back in title order instead of the order they came out. This change adds Release Date to the library sort menu on all three platforms.

Approach

CatalogSortKey gets a Release Date key that sends the server's existing release_date sort field, so the server needs no change. It defaults to newest first, uses the same Newest/Oldest direction label as Year, and sits between Date Added and Year for movie, series, and mixed libraries. Year stays as its own option, and audiobook libraries are unchanged.

Android TV gets the same option in Silo-Server/silo-android#433.

Validation

  • CatalogQueryBuilderTests on an iOS simulator: pass. The new test checks that Release Date sends -release_date and is offered for movie, series, and mixed libraries but not audiobooks.
  • tvOS (SiloTV) and macOS (SiloMac) builds: pass.
  • Manual on iPhone 17 Pro and Apple TV 4K simulators (26.5) 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, and on iOS selecting Release Date again switched to oldest first.
  • Not run: the full SiloTests suite, and a manual check of the macOS app, which uses the same browse code as iOS.

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 Android TV change. None reported findings.

Note

Add releaseDate sort key to browse library sorting

Adds a releaseDate case to CatalogSortKey that maps to the server's signed release_date field, labeled Release Date with Oldest/Newest direction labels and descending order by default. It is offered for movie, series, and mixed libraries but not audiobook libraries, per CatalogSortKey.swift.

Macroscope summarized 6ac5958.

Library browse on iOS, tvOS, and macOS only offered Year, which orders
titles by year alone. Add a Release Date key that sends the server's
release_date field, newest first by default, for movie, series, and
mixed libraries.
@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: 78c12498-6ba2-413d-bb5d-1bf226d647c2

📥 Commits

Reviewing files that changed from the base of the PR and between 09e5eb7 and 6ac5958.

📒 Files selected for processing (2)
  • iosApp/Tests/CatalogQueryBuilderTests.swift
  • iosApp/iosApp/Screens/Browse/Filtering/CatalogSortKey.swift

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 catalog sort options add release-date sorting for movie, series, and mixed libraries. The option defaults to descending order and uses “Oldest” and “Newest” direction labels. Audiobook sort options are unchanged.

Changes

Catalog sorting

Layer / File(s) Summary
Release-date sort option
iosApp/iosApp/Screens/Browse/Filtering/CatalogSortKey.swift, iosApp/Tests/CatalogQueryBuilderTests.swift
Adds the release_date sort key, descending default, display and direction labels, and availability for movie, series, and mixed libraries. A test checks the -release_date parameter and supported library types.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: quick104

Merge Risk: ⚪ Minimal · up to 6ac59

The client sends the release-date sort value, and current upstream supports it for video catalogs. The deployed server version is not identified, but no concrete failure is established, so no merge-blocking issue is indicated.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 6ac59

The new fixed sort option reuses existing authenticated catalog requests without changing library scope or privileges. No material security risk was identified. Compatibility with every deployed server version remains unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated client-side exposure is one additional ordering token on existing authenticated catalog reads. The traced change does not expand request authority or library scope; server-side enforcement is outside the verified evidence.

Trust Boundaries and Controls

  • observed — Route-supplied sort text is converted through CatalogSortKey with a title fallback. The new accepted value is a fixed token, not arbitrary query text. Serialization separately validates the unsigned sort format and direction before adding the descending prefix.

Resilience and Maintainability Implications

  • observed — The reused browse path generation-checks responses before publication, resets continuation on a new query, and distinguishes cached pages by library, sort field, and effective direction. Preferences are scoped by server, profile, and library. Release Date follows these existing containment controls.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Release Date sort option to browse libraries.
Description check ✅ Passed The description directly explains the Release Date sort change, affected platforms and library types, implementation approach, validation, and limitations.
  • 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 ce5bde5 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