Skip to content

fix(detail): open the standard edition before comparing quality - #996

Merged
Quick104 merged 1 commit into
mainfrom
fix/default-edition-by-name
Nov 18, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/default-edition-by-name

Conversation

@Quick104

@Quick104 Quick104 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none passed. The Detail case of #7 and #8 ("edition label shown") still holds; only the edition the page opens on changes.

Other clients: Web Silo-Server/silo-server#4511; Apple Silo-Server/silo-apple#1220; Roku Silo-Server/silo-roku#98

When a viewer opens a movie or episode with several editions and has no history for it, the phone and TV detail pages pick the edition by file quality, with the edition name only breaking ties. A movie with "Standard" at 1080p SDR and "Extended Cut" at 2160p Dolby Vision therefore opens on Extended Cut. This change picks the edition by name first, so that page opens on Standard. The edition decides which film you watch; quality only decides how it looks.

Approach

The no-history rule in the shared DetailVersionSelector now runs in this order, matching the web change in Silo-Server/silo-server#4511:

  1. Each edition gets a name class: 0 for an unnamed edition or one named standard or default, 1 for a theatrical cut, 2 for anything else.
  2. Only editions in the lowest class present compete.
  3. Among those, the existing quality comparison picks one (fits the quality cap, then resolution, then HDR, then server order), and Version Auto picks the file inside it as before.

An edition the viewer picked, last_edition_key, and the edition of last_file_id still take precedence, unchanged. Phone and TV both call the shared selector, so both get the change. The phone code changes only in a doc comment that describes the rule.

Validation

  • ./gradlew :shared:testDebugUnitTest: passed, including the updated selector test (Standard 1080p SDR vs Extended 2160p HDR with no history opens Standard).
  • ./gradlew :androidApp:testDebugUnitTest --tests '*detail*' and ./gradlew :androidTvApp:testDebugUnitTest --tests '*detail*': passed.
  • ./gradlew :androidApp:lintDebug: no new findings.
  • Not run: the full testDebugUnitTest across all modules, the other lint tasks, and the app builds. No device or emulator check.

Evidence

No device capture. The change is in shared selection logic, so I checked it with unit tests: the shared selector test covers the no-history cases (name class first, then quality within a class), and the phone and TV detail tests pass on commit ade7029.

Risks

Viewers with no history on a multi-edition title will now see a different default edition when a non-standard cut has the better file. History and explicit picks are unaffected.

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 how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Prefer the standard edition before comparing quality in openingEdition

Changes no-history edition selection in openingEdition (DetailVersionSelector.kt). The candidate set is now editions with the lowest preference value (e.g. the standard or unnamed cut), picked by name before comparing Auto-file fit, resolution, HDR, and server order. Quality comparisons still apply within the same preference class. Updates the selector tests and the docs in MediaSelectors.kt. Risk: no-history playback may open a lower-quality preferred cut instead of the highest-quality file.

Macroscope summarized ade7029.

With no history, the detail page now picks the edition by name first:
unnamed or standard, then theatrical, then any other cut. Only the cuts
in the best class present compete on quality (fit, resolution, HDR,
server order), so a 2160p HDR Extended Cut no longer wins over a 1080p
Standard edition. Matches the web change in Silo-Server/silo-server#4511.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 18, 2026
@silo-kody

silo-kody Bot commented Nov 18, 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 ❌

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T19:18:52.347983Z ade7029 PR opened
🔒 Security Review ✅ Completed 2026-11-18T19:20:44.810209Z ade7029 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The opening edition selector now applies edition preference before comparing Auto files. The documentation and tests describe this selection order and the quality criteria used within the preferred edition class.

Changes: Edition Selection

Layer / File(s) Summary
Preferred edition and Auto file selection
shared/src/commonMain/kotlin/org/siloserver/silo/playback/DetailVersionSelector.kt, shared/src/commonTest/kotlin/org/siloserver/silo/playback/DetailVersionSelectorTest.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/MediaSelectors.kt
openingEdition filters editions to the minimum preference class before comparing Auto files by fit, resolution rank, HDR, and server order. The documentation and tests describe preferred-cut selection and quality comparisons within that preference class.

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

Change: Bug fix

Possibly related PRs

  • Silo-Server/silo-android#899: Adds the shared detail playback version resolver and defines edition, Auto-file, and last-played edition selection in the same selector.

Suggested reviewers: rxwatcher, rhainland

Merge Risk: Minimal · up to ade70

With no viewing history, the default edition is now chosen by cut name first, so a non-standard cut with a better file may no longer open by default. This is intended behavior, and the tests cover it. No merge-blocking risk was found.

Security architecture risk: Minimal · up to ade70

The change alters which existing edition opens by default while preserving explicit selections and playback-history precedence. No introduced or worsened architecture-level security risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the no-history detail page now opens the standard edition (by name class) before comparing file quality. It matches the shared DetailVersionSelector change and the sel…
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.
Description check Passed The description states the problem (no-history edition selection opens on the highest-quality cut), the approach (name class first, then quality within the lowest class in the shared DetailVersionSele…
Full details: Title check

Explanation

The title names the main change: the no-history detail page now opens the standard edition (by name class) before comparing file quality. It matches the shared DetailVersionSelector change and the selector test rename, so it is related to the changeset.

Full details: Description check

Explanation

The description states the problem (no-history edition selection opens on the highest-quality cut), the approach (name class first, then quality within the lowest class in the shared DetailVersionSelector), validation runs, and risks. It is clearly related to the changeset, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: 26ae3768-5794-4b77-a1fd-4d849bda67f2
Commits

Reviewing files that changed from the base of the PR and between bb59172 and ade7029.

Files selected for processing: 3

  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/MediaSelectors.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/playback/DetailVersionSelector.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/playback/DetailVersionSelectorTest.kt

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@macroscopeapp

macroscopeapp Bot commented Nov 18, 2026

Copy link
Copy Markdown

Visible effect missing evidence: shared/src/commonMain/kotlin/org/siloserver/silo/playback/DetailVersionSelector.kt changes the no-history edition selected on detail pages (and therefore the edition/version displayed and played) on Android phone, tablet, foldable folded and open, and Android TV. The Evidence section reports tests but has no before-and-after captures; add screenshots of the same detail page with the same data for each device, naming the device and commit, with separate folded and open foldable captures.

Suggested fix: No diff; add the requested captures to the Evidence section.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@Quick104 Quick104 added the evidence-not-needed A maintainer waived the Evidence check, for example for an automated dependency update label Nov 18, 2026
@Quick104
Quick104 merged commit e158795 into main Nov 18, 2026
11 checks passed
@Quick104
Quick104 deleted the fix/default-edition-by-name branch November 18, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working evidence-not-needed A maintainer waived the Evidence check, for example for an automated dependency update priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant