Skip to content

Apple parity sweep, playback gap closure, and v0.2.5 feedback fixes - #38

Merged
RXWatcher merged 10 commits into
Silo-Server:mainfrom
RXWatcher:fix/v026-deep-dive-followups
Jul 7, 2026
Merged

RXWatcher merged 10 commits into
Silo-Server:mainfrom
RXWatcher:fix/v026-deep-dive-followups

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One branch covering three arcs: the reported v0.2.5 player regressions, the Apple-parity feature sweep (SiloCast wire compat, metadata AI, live home refresh, MPV subtitle styling, admin dashboard), and closure of the playback capability gaps vs the Apple clients. Everything is client-only and safe against stock servers; all changes are additive with the existing fallback ladder intact.

Player fixes (user-reported)

  • Menu no longer disappears while navigating — any key while the transport overlay is up re-arms the 5s auto-hide (Apple rearmAutoHideOnFocusMove parity), and D-pad Left/Right fall through to focus navigation while the overlay or Up Next is visible. Hidden-controls Left/Right = seek is preserved.
  • Start Over actually starts over — an explicit 0.0 override is treated as start-from-beginning (Apple models this as startFromBeginning) and honored verbatim after session resolution.
  • Backward seeks persist — local resume rows pick the newest write instead of the furthest position (also fixes multi-version staleness). Full determinism additionally needs the companion silo-server progress-LWW PR; without it the outbox path still lands the right value in most cases.

Apple parity

  • SiloCast: full wire rebuild to match shipped Apple clients — TLS-PSK (silo-cast-v1), Apple's JSON envelope and command names, hello/serverId authorization + watchdog, heartbeat, 500ms state cadence, graceful close frames, Apple TXT records. Protocol pinned by golden-JSON tests. Cross-device interop (iPhone↔Android TV) still needs an on-device pass.
  • Metadata AI description translation: /metadata/ai/status capability store, POST-then-poll controller on Apple's backoff schedule, detail-screen affordances (button + once-latched auto), metadata-language profile setting on both platforms.
  • Live home refresh: events websocket (user_state + catalog) with 2s debounce, foreign-profile filtering, foreground-gated lifecycle; TV Home gains an on-resume refresh (previously had no freshness path at all).
  • Subtitle styling on MPV: the shared SubtitleAppearance now translates to MPV sub-* properties (box/shadow/outline/position per Apple's semantics); authored ASS stays as-authored (sub-ass-override=no).
  • Admin: stats dashboard exposed to acting admins via Settings on phone + TV (Apple's dashboard design; Android's screen was already a 1:1 mirror). Users/sessions/logs/scans stay unlinked.

Playback capability gaps closed

  • Codec floor — AV1/VP9/MPEG-4/VC-1 without hardware decoders now advertise and route to MPV software decode (Apple codec-tail parity) instead of silently transcoding. MPV device floor still absolute; recovery ladder unchanged.
  • WMV/ASF direct-play via MPV.
  • DV Profile 7 unblocked — native DV on multi-instance-HEVC hardware, MPV base-layer HDR10 elsewhere. The DV remux rung stays closed client-side until servers advertise RPU-strip support (server-independent by design).
  • Styled-sub burn-in on sub-floor devices during full transcodes only (never remux, never MPV devices, never plain text tracks).

Infrastructure

  • Cleartext HTTP opt-in (fixes "can't connect to a local IP" — Android 9+ blocked plain-HTTP LAN servers).
  • CI now runs the unit test suite on PRs and main pushes; release APK assembly depends on it.
  • DownloadSubscriptionWorker periodic scheduling (background monitored downloads never ran before).
  • Deleted ~530 LOC of dead legacy readers; fixed the duplicated deep-link scheme check; corrected FEATURES/README drift.

Testing

  • Full unit suite green across all four modules (new tests: SiloCast golden wire fixtures, metadata-AI store/controller, home realtime decode/trigger, MPV subtitle mapping, codec-floor selector, start-over resolution, progress recency, burn-in policy).
  • Needs on-device verification: D-pad/menu behavior, Start Over, backward resume, AV1-on-non-AV1-device, a P7 title, ASS subs on an API 24 device, and Android↔Apple casting.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added live Requests on Android phone and TV (profile-gated).
    • Added admin stats access from Settings for acting admins.
    • Added AI description translation on item detail screens, plus Metadata Language selection in subtitle settings (when enabled).
    • Enabled Picture-in-Picture on both phone and TV.
    • Improved subtitle styling/behavior for MPV-based playback (including styled rendering).
  • Bug Fixes

    • More reliable resume-position selection (newest write wins).
    • Improved realtime home refresh behavior and safer playback/cast interactions.

…ixes

Player fixes (user-reported):
- Re-arm the 5s controls auto-hide on any key while the overlay is up
  (Apple TVPlayerControls parity) so the menu can't vanish mid-navigation
- D-pad Left/Right no longer swallowed while the transport overlay or
  Up Next is on screen; hidden-controls seek behavior is preserved
- Start Over: an explicit 0.0 resume override is honored verbatim through
  session resolution (was falling back to stale detail progress)
- Resume: newest local progress write wins (recency, not furthest), so
  deliberate backward seeks stick; multi-version staleness fixed

Apple parity features:
- SiloCast rebuilt wire-compatible with silo-apple SiloControl: TLS-PSK
  transport, camelCase envelope, hello/serverId authorization with auth
  watchdog, ping/pong heartbeat, 500ms state cadence, graceful close,
  Apple TXT records (golden-JSON protocol tests)
- Metadata AI description translation: capability store, translate-and-
  poll controller, detail-screen affordances (button/auto), metadata
  language setting on phone + TV
- Live home refresh: events websocket (user_state/catalog) with debounce,
  profile filtering, foreground lifecycle; TV Home also refreshes on resume
- MPV subtitle styling: SubtitleAppearance now translates to sub-* options
  (box/shadow/outline/position); authored ASS renders as-authored
- Admin stats dashboard exposed to acting admins on phone + TV (Settings
  entry), matching Apple's dashboard; richer admin screens stay unlinked
- Requests exposure docs corrected (feature was already live, server-gated)

Playback capability gaps vs Apple (all additive, fallback ladder intact):
- Codec floor: AV1/VP9/legacy codecs without hardware decoders now
  advertise + route to MPV software decode instead of transcoding
- WMV/ASF containers direct-play via MPV
- DV P7 unblocked: native DV on multi-instance-HEVC hardware, MPV
  base-layer HDR10 elsewhere (recovery-planned); server-independent
- Styled (ASS/SSA) subtitles burn in server-side during full transcodes
  on devices below the MPV floor

Infrastructure and cleanup:
- Cleartext HTTP opt-in so plain-IP LAN servers connect on Android 9+
- CI runs the unit test suite on PRs/main; APK assembly gated on it
- DownloadSubscriptionWorker scheduled periodically (was never enqueued)
- Deleted dead legacy readers (EpubReader/FictionBookReader/TextReader)
- Fixed duplicated deep-link scheme check; doc drift (PiP, version)

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@RXWatcher, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e8b390c-a8cc-4d59-ac47-bc1740c728cb

📥 Commits

Reviewing files that changed from the base of the PR and between d9caa72 and c760880.

📒 Files selected for processing (9)
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadWorker.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/auth/ServerSetupScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/auth/ServerSetupViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SettingsViewModel.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/auth/ServerSetupCandidateUrlsTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/auth/ServerSetupCleartextWarningTest.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvServerSetupScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvServerSetupViewModel.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/auth/TvServerSetupCleartextWarningTest.kt
📝 Walkthrough

Walkthrough

This PR updates cast transport and protocol handling, adds metadata-AI translation and admin-navigation wiring, changes playback routing for software-only codecs and subtitle styling, introduces home realtime refresh and download scoping updates, and removes legacy reader implementations.

Changes

Cast transport and protocol rework

Layer / File(s) Summary
Wire schema and session transport
shared/src/commonMain/kotlin/org/siloserver/silo/cast/SiloCastMessage.kt, shared/src/commonTest/kotlin/org/siloserver/silo/cast/SiloCastMessageTest.kt, android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt
Cast messages now use nested Hello/Control payloads and Apple-compatible wire models; TLS-PSK client/server sessions are added and tested.
Advertiser, browser, and controller/receiver wiring
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/cast/SiloCastNsdAdvertiser.kt, SiloCastNsdBrowser.kt, androidApp/.../SiloCastController.kt, androidTvApp/.../TvSiloCastReceiver.kt, .../TvSiloCastPlayerAdapter.kt, DI files
NSD discovery and advertising track server/session state, while phone and TV cast control paths switch to TLS sessions and new command/track shapes.

Playback routing and MPV styling

Layer / File(s) Summary
Codec capability and backend selection
android-shared/.../PlaybackCapabilityDetector.kt, backend/VideoPlaybackBackendRequest.kt, backend/VideoPlaybackBackendSelector.kt, video/MpvSoftwareVideoCodecs.kt, video/PlaybackContainerPolicy.kt, video/VideoPlaybackStartResult.kt, video/VideoPlayerUiState.kt, tests
Software-decodable codec detection, backend routing, and capability propagation add MPV-only handling for software codecs and legacy containers.
MPV subtitle styling and playback updates
android-shared/.../mpv/MpvSubtitleStyle.kt, mpv/MpvPlayer.kt, PlaybackSessionManager.kt, PlaybackRecoveryPlanner.kt, PlaybackStartPosition.kt, RoomUserItemStateRepository.kt, tests
Subtitle appearance translation, burn-in decisions, resume selection, and DV recovery behavior are updated around MPV support and start-over handling.
Mobile and TV player wiring
androidApp/.../player/*, androidTvApp/.../player/*
Player screens and view models propagate softwareOnlyVideoCodec, apply MPV subtitle styling, and adjust cast track/quality mapping and TV DPAD handling.

Metadata AI, admin, and home refresh

Layer / File(s) Summary
Metadata AI models, API, repository, and store
shared/src/commonMain/kotlin/org/siloserver/silo/model/metadata/MetadataAiModels.kt, network/api/MetadataAiApi.kt, repository/MetadataAiRepository.kt, model/feature/MetadataAiFeatureStore.kt, model/catalog/CatalogModels.kt, di/*, tests
Metadata translation status, request payloads, feature gating, and pending-translation item state are added and wired through DI and tests.
Translation controller and screens
shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt, androidApp/.../ui/screens/detail/*, androidTvApp/.../ui/screens/detail/*, tests
Viewer translation flow adds controller-driven polling, phase state, and Android/TV detail hero translation slots with metadata-language selection.
Admin exposure and settings navigation
shared/src/commonMain/kotlin/org/siloserver/silo/model/admin/AdminClientPolicy.kt, androidApp/.../ui/navigation/*, ui/screens/settings/*, androidTvApp/.../ui/screens/settings/*, tests
Admin stats visibility is enabled, Requests is removed from settings entry points, and Android/TV navigation now routes to Admin stats surfaces.
Home realtime refresh
shared/src/commonMain/kotlin/org/siloserver/silo/network/HomeRealtimeClient.kt, repository/HomeRealtimeCoordinator.kt, repository/ProfileRepository.kt, viewmodel/HomeViewModel.kt, androidApp/.../home/*, androidTvApp/.../home/*, tests
Realtime websocket refresh signals, profile-switch triggers, and foreground lifecycle starters are added for home content refresh on both Android surfaces.

Downloads, sync, and active playback state

Layer / File(s) Summary
Download scoping and periodic work
android-shared/.../downloads/DownloadSubscriptionWorker.kt, DownloadWorker.kt, DownloadSubscriptionEvaluator.kt, androidApp/.../downloads/AppWorkerFactory.kt, SiloApplication.kt, AndroidModule.kt, tests
Download subscription evaluation now resolves scope from active server/profile and can run periodically, while download UI pushes are gated by active scope.
Token/cache and sync conflict handling
EncryptedTokenManagerImpl.kt, ConflictPolicy.kt, SyncEngine.kt, tests
Registry-aligned token cache reloads, skew-tolerant conflict resolution, and terminal sync failure handling are added.
Playback file tracking and reclaim filtering
ActivePlaybackFile.kt, PlayerViewModel.kt, DownloadsViewModel.kt, MainActivity.kt, Reader/WebView cleanup tests
Active playback file tracking is used to keep reclaim planners and playback state consistent, with related UI and WebView lifecycle fixes.

Docs, build, and cleanup

Layer / File(s) Summary
Docs and exposure notes
AGENTS.md, FEATURES.md, README.md
Requests, admin, playback, and translation exposure notes are updated in product documentation.
Build and packaging
.github/workflows/android-build.yml, androidApp/build.gradle.kts, androidTvApp/build.gradle.kts, AndroidManifest.xml, gradle/libs.versions.toml, AndroidAppPackagingTest.kt
CI adds a unit-test job, packaging exclusions broaden, cleartext traffic is enabled, and dependency versions are bumped.
Legacy reader removal
EpubReader.kt, FictionBookReader.kt, TextReader.kt, tests
Legacy reader implementations and related tests are removed.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Phone as SiloCastController
  participant TLS as SiloCastTls
  participant TV as TvSiloCastReceiver
  participant Adapter as TvSiloCastPlayerAdapter
  Phone->>TLS: connect(host, port)
  TLS->>TV: TLS-PSK handshake
  Phone->>TV: Hello(serverId, deviceInfo)
  Phone->>TV: Control(command)
  TV->>Adapter: handle(command)
  Adapter-->>TV: playback update
  TV-->>Phone: State / Pong / Close
Loading
sequenceDiagram
  participant Screen as ItemDetailScreen
  participant ViewModel as ItemDetailViewModel
  participant Controller as DescriptionTranslationController
  participant Api as MetadataAiRepository
  participant Catalog as CatalogRepository
  Screen->>ViewModel: translateDescription(auto=true)
  ViewModel->>Controller: translate(contentId, targetLanguage)
  Controller->>Api: translateDescription(contentId, targetLanguage)
  loop poll pendingTranslationLanguage
    Controller->>ViewModel: refetchPendingLanguage()
    ViewModel->>Catalog: getItemDetail(contentId)
  end
  Controller-->>Screen: phase Idle / Failed
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main themes: Apple parity, playback capability gaps, and feedback-driven fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1baf0697c0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +80 to +84
val server = serverRegistry.activeEntry.value
advertiser.start(
port = socket.localPort,
serverId = server?.id,
serverName = server?.displayName,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh SiloCast TXT record after server switches

Because this snapshots activeEntry only when the receiver starts, the advertised server/serverName TXT values become stale if the user switches servers while the TV app stays foregrounded; the receiver remains running until MainTvActivity.onStop, so discovery clients that filter _silocast._tcp by the TXT server will either hide this TV for the new server or show it under the old one until the app is backgrounded/restarted. Re-advertise or observe activeEntry changes so the Bonjour record stays in sync.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed: the receiver now observes serverRegistry.activeEntry while running; a server switch re-registers the Bonjour record with the new server/serverName and also drops the live controller session, since its hello was authorized against the previous server.

Review follow-up (P2): the receiver snapshotted the active server only
at start, so a mid-session server switch left stale server/serverName
TXT values in the Bonjour record (phones filtering by server would hide
this TV or list it under the old server) — and the live controller
session stayed authorized against the previous server. The receiver now
observes activeEntry: on a switch it closes the controller session and
re-registers the advertisement with the new identity.

Co-Authored-By: Claude Fable 5 <[email protected]>

@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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt (1)

190-200: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Stale-connection error can clobber a freshly-established session's state.

The finally block correctly guards closeConnection() with session === activeSession, but the catch (t: Throwable) block above updates _state.error unconditionally. Since ensureConnected closes the old session synchronously before awaiting the new TLS handshake (which can take up to CONNECT_TIMEOUT_MS), the old read loop's exception handler can race with — and finish after — the new connection succeeding, overwriting a healthy session's error field with the stale closed-connection error.

🔧 Proposed fix: guard the error update the same way as closeConnection()
         } catch (e: CancellationException) {
             throw e
         } catch (t: Throwable) {
             Log.w(TAG, "SiloCast read loop ended", t)
-            _state.update { it.copy(error = t.message) }
+            if (session === activeSession) {
+                _state.update { it.copy(error = t.message) }
+            }
         } finally {
             if (session === activeSession) {
                 closeConnection()
             }
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt`
around lines 190 - 200, The stale-connection error update in
SiloCastController’s read loop is unguarded and can overwrite a newer healthy
session. In the `catch (t: Throwable)` path, update `_state.error` only when
`session === activeSession`, matching the existing `finally` guard around
`closeConnection()`. Keep the `CancellationException` handling unchanged and
preserve the current logging in `SiloCastController`.
🧹 Nitpick comments (10)
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt (2)

80-80: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use an import instead of a fully-qualified reference.

org.siloserver.silo.model.settings.SubtitlePositionPreset.Bottom is fully qualified inline while the file already imports sibling symbols from the same package (SubtitleBackgroundStylePreset, legacyPosition, pointSize). Adding the missing import would be more consistent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt`
at line 80, The subtitle position check in MpvSubtitleStyle uses a fully
qualified reference inline instead of the existing import style. Add the missing
import for SubtitlePositionPreset.Bottom in MpvSubtitleStyle and update the
props["sub-use-margins"] assignment to use the imported symbol, matching the
other sibling imports in this file.

45-53: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Rounding truncates instead of rounds for outline size.

(a.fontSize.pointSize * 0.08).coerceIn(2.0, 4.0).toInt() truncates toward zero rather than rounding, so e.g. 3.9 becomes 3 instead of 4. Minor precision loss on a cosmetic sizing value.

💡 Proposed fix
-        (a.fontSize.pointSize * 0.08).coerceIn(2.0, 4.0).toInt().toString()
+        (a.fontSize.pointSize * 0.08).coerceIn(2.0, 4.0).roundToInt().toString()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt`
around lines 45 - 53, The outline size calculation in MpvSubtitleStyle should
round instead of truncate, since `toInt()` on the `outlineSize` expression
floors values like 3.9 to 3. Update the `outlineSize` logic to round the clamped
`a.fontSize.pointSize * 0.08` result before converting it to a string, keeping
the existing `a.textOutline` guard and `props["sub-border-size"]` assignment
intact.
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/home/TvHomeScreen.kt (1)

42-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use imports instead of fully-qualified references.

LocalLifecycleOwner, DisposableEffect, LifecycleEventObserver, and Lifecycle.Event.ON_RESUME are all fully-qualified inline, which is inconsistent with idiomatic Compose code elsewhere in the file.

♻️ Suggested imports
+import androidx.compose.runtime.DisposableEffect
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.LifecycleEventObserver
+import androidx.lifecycle.compose.LocalLifecycleOwner
...
-    val lifecycleOwner = androidx.lifecycle.compose.LocalLifecycleOwner.current
-    androidx.compose.runtime.DisposableEffect(lifecycleOwner) {
-        val observer = androidx.lifecycle.LifecycleEventObserver { _, event ->
-            if (event == androidx.lifecycle.Lifecycle.Event.ON_RESUME) {
+    val lifecycleOwner = LocalLifecycleOwner.current
+    DisposableEffect(lifecycleOwner) {
+        val observer = LifecycleEventObserver { _, event ->
+            if (event == Lifecycle.Event.ON_RESUME) {
                 viewModel.refreshFromRealtime()
             }
         }
As per coding guidelines, `{androidApp,androidTvApp,android-shared}/**/*.kt`: "Follow Compose idioms in Android UI code."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/home/TvHomeScreen.kt`
around lines 42 - 51, The TvHomeScreen Compose block uses fully-qualified
references instead of imports, which is inconsistent with the file’s idiomatic
style. Update the imports for LocalLifecycleOwner, DisposableEffect,
LifecycleEventObserver, and Lifecycle.Event.ON_RESUME, then use the unqualified
symbols in the lifecycle observer setup inside TvHomeScreen. Keep the existing
refreshFromRealtime behavior unchanged.

Source: Coding guidelines

shared/src/commonMain/kotlin/org/siloserver/silo/cast/SiloCastMessage.kt (1)

186-203: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Companion command constants use PascalCase instead of camelCase.

Play, Pause, PlayPause, Seek, Stop, SelectAudioTrack, ..., PlayNext are const val properties. As per path instructions for {androidApp,androidTvApp,android-shared,shared}/**/*.kt: "functions and properties must use camelCase."

♻️ Proposed rename (sample)
-        const val Play = "play"
-        const val Pause = "pause"
-        const val PlayPause = "play_pause"
-        const val Seek = "seek"
-        const val Stop = "stop"
-        const val SelectAudioTrack = "select_audio_track"
-        const val SelectSubtitleTrack = "select_subtitle_track"
-        const val SetPlaybackSpeed = "set_playback_speed"
-        const val SetQuality = "set_quality"
-        const val SetVideoGravity = "set_video_gravity"
-        const val SetHdrEnabled = "set_hdr_enabled"
-        const val SetSubtitleSyncMs = "set_subtitle_sync_ms"
-        const val SetSubtitlePosition = "set_subtitle_position"
-        const val SetVolume = "set_volume"
-        const val SetMuted = "set_muted"
-        const val PlayNext = "play_next"
+        const val play = "play"
+        const val pause = "pause"
+        const val playPause = "play_pause"
+        const val seek = "seek"
+        const val stop = "stop"
+        const val selectAudioTrack = "select_audio_track"
+        const val selectSubtitleTrack = "select_subtitle_track"
+        const val setPlaybackSpeed = "set_playback_speed"
+        const val setQuality = "set_quality"
+        const val setVideoGravity = "set_video_gravity"
+        const val setHdrEnabled = "set_hdr_enabled"
+        const val setSubtitleSyncMs = "set_subtitle_sync_ms"
+        const val setSubtitlePosition = "set_subtitle_position"
+        const val setVolume = "set_volume"
+        const val setMuted = "set_muted"
+        const val playNext = "play_next"

(rename all call sites accordingly)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/src/commonMain/kotlin/org/siloserver/silo/cast/SiloCastMessage.kt`
around lines 186 - 203, The companion object command constants in
SiloCastMessage use PascalCase, which violates the camelCase property naming
rule. Rename the const val properties in SiloCastMessage.Companion (such as
Play, Pause, PlayPause, Seek, Stop, SelectAudioTrack, SetPlaybackSpeed, and
PlayNext) to camelCase, and update all references/call sites accordingly so the
API remains consistent.

Source: Path instructions

androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt (1)

222-224: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider extracting the shared start-over/software-codec logic.

suppressRewind and softwareOnlyVideoCodec are computed with byte-for-byte identical expressions in both MobileVideoPlaybackStarter and TvVideoPlaybackStarter. Extracting a small shared helper (e.g., in the android-shared player/video package alongside isMpvSoftwareDecodableVideoCodec) would remove the duplication and guarantee both clients stay in sync as this logic evolves.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt`
around lines 222 - 224, The `softwareOnlyVideoCodec` and `suppressRewind` checks
are duplicated between `MobileVideoPlaybackStarter` and
`TvVideoPlaybackStarter`, so extract the shared play-method/codec capability
logic into a small helper in the shared player/video area near
`isMpvSoftwareDecodableVideoCodec`. Update both call sites to use that helper so
the start-over and software-codec behavior stays in sync and only needs to be
changed in one place.
.github/workflows/android-build.yml (1)

5-9: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

LGTM! Trigger/job restructuring reads correctly — unit-tests runs unconditionally on push/PR while build-debug is correctly gated to tag pushes and manual dispatch, satisfying its needs: unit-tests dependency in both cases.

Optional: consider adding timeout-minutes to the new unit-tests job (and build-debug) so a hung Gradle run doesn't tie up a runner indefinitely.

Also applies to: 25-68

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/android-build.yml around lines 5 - 9, Add timeout-minutes
to the new unit-tests and build-debug jobs in the Android workflow so a stuck
Gradle execution cannot hold a runner indefinitely; update the job definitions
for unit-tests and build-debug directly in the workflow while keeping their
existing trigger and needs structure unchanged.
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/AccountSection.kt (1)

131-137: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Admin row reuses the same icon as "Manage Sessions".

Both rows use Icons.Default.Security with the same gray badge, making them visually indistinguishable at a glance. Consider a distinct icon (e.g. Icons.Default.AdminPanelSettings) for the Admin row.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/AccountSection.kt`
around lines 131 - 137, The Admin entry in AccountSection is visually too
similar to Manage Sessions because it reuses the same Security icon and gray
badge. Update the SettingsRowLabel call for the Admin row to use a distinct icon
via the existing onAdmin block, preferably a more specific admin symbol such as
AdminPanelSettings, while keeping the rest of the row behavior unchanged.
shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt (1)

71-76: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

String-concat key risks collision on |-containing ids.

"$contentId|$targetLanguage" could theoretically collide across different (contentId, targetLanguage) pairs if either value contains |. Low real-world likelihood given IDs/language codes, but a Pair key would be unambiguous.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt`
around lines 71 - 76, The auto-fire tracking in DescriptionTranslationController
uses a concatenated string key in shouldAutoFire and markAutoFired, which can
collide if contentId or targetLanguage contains the separator. Replace the
string-based membership tracking with an unambiguous key type such as a Pair for
autoFired, and update both methods to use the same structured key when checking
and recording fired entries.
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt (1)

187-234: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Avoid reallocating 64KB scratch buffers on every read/write/drain call.

chunk in read() is allocated even on the fast path where it's unused, and drainOutputLocked() allocates a fresh buffer on every write()/flush() call. Since reads/writes run continuously on separate threads during casting, hoisting these to lock-guarded instance fields avoids per-call GC churn.

♻️ Proposed fix: reuse buffers
 class SiloCastTlsSession(
     private val socket: Socket,
     private val protocol: TlsServerProtocol,
     private val rawIn: InputStream,
     private val rawOut: OutputStream,
 ) {
+    private val readChunk = ByteArray(64 * 1024)
+    private val writeChunk = ByteArray(64 * 1024)
+
     val input: InputStream = object : InputStream() {
         private val one = ByteArray(1)

         override fun read(): Int {
             val n = read(one, 0, 1)
             return if (n <= 0) -1 else one[0].toInt() and 0xff
         }

         override fun read(b: ByteArray, off: Int, len: Int): Int {
-            val chunk = ByteArray(64 * 1024)
             while (true) {
                 synchronized(protocol) {
                     if (protocol.availableInputBytes > 0) {
                         return protocol.readInput(b, off, len)
                     }
                 }
-                val read = rawIn.read(chunk)
+                val read = rawIn.read(readChunk)
                 if (read < 0) return -1
                 if (read == 0) continue
                 synchronized(protocol) {
-                    protocol.offerInput(chunk, 0, read)
+                    protocol.offerInput(readChunk, 0, read)
                     drainOutputLocked()
                 }
             }
         }
     }
     ...
     private fun drainOutputLocked() {
-        val out = ByteArray(64 * 1024)
         while (protocol.availableOutputBytes > 0) {
-            val read = protocol.readOutput(out, 0, out.size)
+            val read = protocol.readOutput(writeChunk, 0, writeChunk.size)
             if (read <= 0) break
-            rawOut.write(out, 0, read)
+            rawOut.write(writeChunk, 0, read)
         }
         rawOut.flush()
     }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt`
around lines 187 - 234, The read/write path in SiloCastTls is allocating new
64KB scratch buffers on every call, causing avoidable GC churn. Hoist the
temporary buffers used by read() and drainOutputLocked() into reusable instance
fields on the SiloCastTls stream wrapper, and reuse them under the same protocol
synchronization so the fast path in read() and the output draining in
write()/flush() no longer allocate per invocation.
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvPlayer.kt (1)

1097-1113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Silently swallowed property-set failures.

Each mpv.setPropertyString call here is wrapped in runCatching { } with the result discarded, unlike setOption() in this same class which logs failures via Log.e. Since these values come from user-configurable subtitle appearance settings, a bad value (e.g. malformed hex color) would fail silently with no diagnostic trail.

🩹 Proposed fix: log failures like `setOption` does
         for ((name, value) in subtitleAppearanceToMpvProperties(appearance, nativeAssTrack = nativeAss)) {
-            runCatching { mpv.setPropertyString(name, value) }
+            runCatching { mpv.setPropertyString(name, value) }
+                .onFailure { e -> Log.w(TAG, "Failed to set subtitle style property: $name = $value", e) }
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvPlayer.kt`
around lines 1097 - 1113, The property updates in applySubtitleAppearance are
swallowing mpv.setPropertyString failures with discarded runCatching results, so
bad subtitle appearance values fail silently. Update this loop to handle the
Result the same way setOption does elsewhere in MpvPlayer: keep the existing
per-property iteration, but log any exception with a clear message and the
property name/value context instead of ignoring it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt`:
- Around line 173-224: The SiloCastTlsSession close path is mutating the TLS
engine without the same protocol lock used by input.read, output.write, and
output.flush, which can race concurrent access. Update
SiloCastTlsSession.close() so protocol.close() runs inside
synchronized(protocol), keeping all TlsServerProtocol interactions serialized,
then close the socket after that block.
- Around line 51-73: `SiloCastTls.accept()` leaves the accepted `Socket` open
when the TLS handshake fails, which can leak file descriptors. Update the
handshake flow so any exception thrown while using
`TlsServerProtocol`/`CastPskTlsServer` closes the socket before rethrowing,
similar to the cleanup behavior in `connect()`. Keep the timeout restoration in
place, but ensure socket cleanup happens for timeout, EOF, and malformed
ClientHello failures before returning `SiloCastTlsSession`.

In
`@shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt`:
- Around line 39-68: The translate() flow in DescriptionTranslationController
can leave _phase stuck in Translating if refetchPendingLanguage(),
onTranslated(), or cancellation interrupts the polling loop. Wrap the
translate() body in a try/finally (or equivalent structured cleanup) so _phase
is always moved out of Translating on failure/cancellation, and keep the success
path setting Idle after a completed translation. Make sure the fix preserves the
existing Failed state for real translation errors while preventing the
early-return guard in translate() from blocking future calls indefinitely.

In
`@shared/src/commonMain/kotlin/org/siloserver/silo/network/HomeRealtimeClient.kt`:
- Around line 62-89: The cancellation handling in HomeRealtimeClient.connect()
is too broad because the catch-all block converts normal flow cancellation into
HomeRealtimeEvent.Closed(e.message) instead of letting it propagate. Add a
dedicated catch for CancellationException in connect() that rethrows
immediately, then keep the existing broad catch for real failures and preserve
the current Closed event behavior for non-cancellation errors.

In `@shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeViewModel.kt`:
- Around line 53-69: `refreshFromRealtime()` in `HomeViewModel` is not truly
single-flight because it relies on `_uiState.value.isRefreshing`, which is only
managed by `refresh()` and not by the realtime path. Add dedicated in-flight
tracking for the realtime fetch inside `refreshFromRealtime()`/`fetchSections()`
(or reuse the same guard with a shared state) so the `refreshSignals.collect`
loop cannot start a second `viewModelScope.launch { fetchSections() }` while one
is already running.

---

Outside diff comments:
In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt`:
- Around line 190-200: The stale-connection error update in SiloCastController’s
read loop is unguarded and can overwrite a newer healthy session. In the `catch
(t: Throwable)` path, update `_state.error` only when `session ===
activeSession`, matching the existing `finally` guard around
`closeConnection()`. Keep the `CancellationException` handling unchanged and
preserve the current logging in `SiloCastController`.

---

Nitpick comments:
In @.github/workflows/android-build.yml:
- Around line 5-9: Add timeout-minutes to the new unit-tests and build-debug
jobs in the Android workflow so a stuck Gradle execution cannot hold a runner
indefinitely; update the job definitions for unit-tests and build-debug directly
in the workflow while keeping their existing trigger and needs structure
unchanged.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt`:
- Around line 187-234: The read/write path in SiloCastTls is allocating new 64KB
scratch buffers on every call, causing avoidable GC churn. Hoist the temporary
buffers used by read() and drainOutputLocked() into reusable instance fields on
the SiloCastTls stream wrapper, and reuse them under the same protocol
synchronization so the fast path in read() and the output draining in
write()/flush() no longer allocate per invocation.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvPlayer.kt`:
- Around line 1097-1113: The property updates in applySubtitleAppearance are
swallowing mpv.setPropertyString failures with discarded runCatching results, so
bad subtitle appearance values fail silently. Update this loop to handle the
Result the same way setOption does elsewhere in MpvPlayer: keep the existing
per-property iteration, but log any exception with a clear message and the
property name/value context instead of ignoring it.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt`:
- Line 80: The subtitle position check in MpvSubtitleStyle uses a fully
qualified reference inline instead of the existing import style. Add the missing
import for SubtitlePositionPreset.Bottom in MpvSubtitleStyle and update the
props["sub-use-margins"] assignment to use the imported symbol, matching the
other sibling imports in this file.
- Around line 45-53: The outline size calculation in MpvSubtitleStyle should
round instead of truncate, since `toInt()` on the `outlineSize` expression
floors values like 3.9 to 3. Update the `outlineSize` logic to round the clamped
`a.fontSize.pointSize * 0.08` result before converting it to a string, keeping
the existing `a.textOutline` guard and `props["sub-border-size"]` assignment
intact.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt`:
- Around line 222-224: The `softwareOnlyVideoCodec` and `suppressRewind` checks
are duplicated between `MobileVideoPlaybackStarter` and
`TvVideoPlaybackStarter`, so extract the shared play-method/codec capability
logic into a small helper in the shared player/video area near
`isMpvSoftwareDecodableVideoCodec`. Update both call sites to use that helper so
the start-over and software-codec behavior stays in sync and only needs to be
changed in one place.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/AccountSection.kt`:
- Around line 131-137: The Admin entry in AccountSection is visually too similar
to Manage Sessions because it reuses the same Security icon and gray badge.
Update the SettingsRowLabel call for the Admin row to use a distinct icon via
the existing onAdmin block, preferably a more specific admin symbol such as
AdminPanelSettings, while keeping the rest of the row behavior unchanged.

In
`@androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/home/TvHomeScreen.kt`:
- Around line 42-51: The TvHomeScreen Compose block uses fully-qualified
references instead of imports, which is inconsistent with the file’s idiomatic
style. Update the imports for LocalLifecycleOwner, DisposableEffect,
LifecycleEventObserver, and Lifecycle.Event.ON_RESUME, then use the unqualified
symbols in the lifecycle observer setup inside TvHomeScreen. Keep the existing
refreshFromRealtime behavior unchanged.

In `@shared/src/commonMain/kotlin/org/siloserver/silo/cast/SiloCastMessage.kt`:
- Around line 186-203: The companion object command constants in SiloCastMessage
use PascalCase, which violates the camelCase property naming rule. Rename the
const val properties in SiloCastMessage.Companion (such as Play, Pause,
PlayPause, Seek, Stop, SelectAudioTrack, SetPlaybackSpeed, and PlayNext) to
camelCase, and update all references/call sites accordingly so the API remains
consistent.

In
`@shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt`:
- Around line 71-76: The auto-fire tracking in DescriptionTranslationController
uses a concatenated string key in shouldAutoFire and markAutoFired, which can
collide if contentId or targetLanguage contains the separator. Replace the
string-based membership tracking with an unambiguous key type such as a Pair for
autoFired, and update both methods to use the same structured key when checking
and recording fired entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 20d5e436-e08a-4570-b387-3d61d6e1d630

📥 Commits

Reviewing files that changed from the base of the PR and between 443d0f1 and 1baf069.

📒 Files selected for processing (101)
  • .github/workflows/android-build.yml
  • AGENTS.md
  • FEATURES.md
  • README.md
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/cast/SiloCastNsdAdvertiser.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/repository/RoomUserItemStateRepository.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadSubscriptionWorker.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetector.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackRecoveryPlanner.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackSessionManager.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/backend/VideoPlaybackBackendRequest.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/backend/VideoPlaybackBackendSelector.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvPlayer.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyle.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/MpvSoftwareVideoCodecs.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/PlaybackContainerPolicy.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlaybackSessionCoordinator.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlaybackStartResult.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/video/VideoPlayerUiState.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/data/repository/LatestProgressTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/downloads/DownloadSubscriptionScopeTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackRecoveryPlannerTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/StyledSubtitleBurnInTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/backend/MpvSoftwareVideoCodecPolicyTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/backend/VideoPlaybackBackendSelectorTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/mpv/MpvSubtitleStyleTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/video/PlaybackContainerPolicyTest.kt
  • androidApp/src/androidMain/AndroidManifest.xml
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/SiloApplication.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/di/AndroidModule.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/downloads/AppWorkerFactory.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/home/HomeRealtimeForegroundStarter.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/MainScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastRemoteScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/DescriptionTranslationSection.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/DetailSharedComponents.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/ItemDetailScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/ItemDetailViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/MovieDetailContent.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/SeriesDetailContent.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/MobileVideoPlaybackStarter.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/EpubReader.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/FictionBookReader.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/TextReader.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/AccountSection.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SettingsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SettingsViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SubtitleSettings.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/navigation/ClientSurfaceVisibilitySourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/admin/AdminEntryViewModelTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/detail/MobileDetailActionsSourceTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/reader/FictionBookReaderTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/reader/ReaderEngineHostSourceTest.kt
  • androidTvApp/src/androidMain/AndroidManifest.xml
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/MainTvActivity.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/SiloTvApplication.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/TvSiloCastPlayerAdapter.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/TvSiloCastReceiver.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/home/HomeRealtimeForegroundStarter.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDescriptionTranslationSection.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDetailHero.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/home/TvHomeScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerRemoteKeyAction.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvVideoPlaybackStarter.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/settings/TvSettingsViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerRemoteKeyActionTest.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/cast/SiloCastMessage.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/di/NetworkModule.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/di/RepositoryModule.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/admin/AdminClientPolicy.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/catalog/CatalogModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/feature/MetadataAiFeatureStore.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/metadata/MetadataAiModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/playback/PlaybackModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/playback/PlaybackStartPosition.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/profile/ProfileModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/HomeRealtimeClient.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/api/MetadataAiApi.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/HomeRealtimeCoordinator.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/MetadataAiRepository.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeViewModel.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/cast/SiloCastMessageTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/metadata/DescriptionTranslationControllerTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/admin/AdminClientPolicyTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/feature/MetadataAiFeatureStoreTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/playback/PlaybackStartOverTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/network/HomeRealtimeDecodeTest.kt
💤 Files with no reviewable changes (5)
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/TextReader.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/reader/FictionBookReaderTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/FictionBookReader.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/ui/screens/reader/ReaderEngineHostSourceTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/EpubReader.kt

RXWatcher and others added 7 commits July 7, 2026 18:48
- SiloCastTls.accept() closes the socket on handshake failure so a LAN
  probe storm can't leak file descriptors (connect() already did)
- SiloCastTlsSession.close() takes the protocol lock like every other
  engine access, so teardown can't race a concurrent read/write
- DescriptionTranslationController resolves the Translating phase on
  throwing refetch/onTranslated (Failed) and on cancellation (Idle +
  rethrow) instead of stranding the single-flight latch; regression test
- HomeViewModel.refreshFromRealtime() is actually single-flight via an
  in-flight guard (isRefreshing is only set by manual refresh)
- HomeRealtimeClient rethrows CancellationException ahead of the broad
  catch so flow cancellation propagates instead of becoming Closed

Co-Authored-By: Claude Fable 5 <[email protected]>
Review-body follow-ups: the controller's old read loop could outlive a
reconnect and clobber the fresh session's state with its stale error —
now guarded like closeConnection(). The TLS session also reallocated
64KB scratch buffers on every read/drain in the streaming hot path;
they're hoisted (reader is single-consumer, drain buffer only touched
under the protocol lock). Remaining style nitpicks (FQN imports,
constant casing, icon reuse) intentionally skipped.

Co-Authored-By: Claude Fable 5 <[email protected]>
media3 1.10.1, navigation 2.9.8, work 2.11.2, datastore 1.2.1,
lifecycle 2.10.0, activity-compose 1.12.4, security-crypto 1.1.0
(off the alpha), bouncycastle 1.84, zxing 3.5.4, robolectric 4.16.1.
BouncyCastle 1.84 ships duplicate OSGi manifests under
META-INF/versions/17 — the packaging exclusion is now version-glob.

Deliberately deferred to a coordinated toolchain branch: Kotlin 2.4 +
KSP + Compose Multiplatform 1.11 + AGP 9.2 (breaking major) + Ktor 3.5
+ coroutines/serialization 1.11 + Koin 4.2 (needs Kotlin 2.2+ metadata)
+ lifecycle 2.11/activity 1.13 (need AGP 9.1) + tv-compose 1.1.0.

Full unit suite green; both debug APKs assemble.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sync/data:
- Outbox: a malformed payload is dropped terminally per-op instead of
  rethrowing and permanently stalling the entire scope's sync (HIGH)
- Token reads verify the cache against the live registry id so a direct
  ServerRegistry.switchTo() can't send server A credentials to server B
- ConflictPolicy tolerates bounded clock skew so a backward-skewed
  device doesn't see its own edits reverted on refresh
- latestProgress gains a deterministic final tiebreak (fileId)
- Home realtime reconnect observes ProfileRepository.profileSwitches
  instead of piggybacking on the notifications reset signal

Downloads:
- Subscription evaluations are globally serialized (periodic worker and
  manual run live in different WorkManager namespaces and could overlap,
  double-downloading episodes); the periodic worker also aborts on a
  mid-run server/profile switch
- DownloadWorker's in-memory UI pushes are scope-guarded so a background
  scope's worker can't paint progress onto the wrong scope's records
- Reclaim Watched excludes the file the player is currently using
  (ActivePlaybackFile tracker; reachable via PiP -> Downloads)

Playback:
- MPV resumes after transient audio-focus loss (the resume guard read
  playWhenReady after it was already zeroed — playback stayed paused
  forever after any notification sound) and no longer arms auto-resume
  on permanent loss (HIGH)
- MPV subtitle styling re-applies on subtitle track switches so ASS<->SRT
  changes re-evaluate the native-ASS override
- An audio switch that forces a server transcode resumes at the request
  cut point instead of the original start, and keeps the playback plan
- TV gains the phone's one-shot engine-switch-failure guard

Cast/LAN:
- Goodbye frames go through the session write mutex (no more torn frames
  against the 500ms state pusher) and off the receiver monitor (HIGH)
- Session epochs: handshakes in flight across a server switch or newer
  accept can no longer register as the active controller
- Phone controller connect/teardown is serialized behind a mutex
- NSD: lost-service removal matches the mDNS instance name; serviceType
  comparison tolerates Android's trailing-dot form
- Receiver start no longer races a quick background into advertising

UI/lifecycle:
- TV deep links and phone notification routes are queued until the
  authenticated graph is showing instead of pushing over Login
- TV account/admin header keeps its previous snapshot on transient /me
  failures instead of flickering out
- Feature-store generation guards are volatile; reflow WebView drops
  post-dispose JS callbacks; cold-start filesystem/health checks moved
  off the main dispatcher

Full suite green; both debug APKs assemble.

Co-Authored-By: Claude Fable 5 <[email protected]>
Adversarial self-review of the 23-fix commit:
- ActivePlaybackFile.set() was only called in the transcode-recovery
  fallback, leaving the Reclaim-Watched guard INERT on normal/offline
  playback (the exact scenario it protects). Now mirrored from every
  load path via a uiState observer on both phone and TV VMs. (HIGH)
- SiloCastTls.close() took the protocol monitor before closing the
  socket; a write blocked on a frozen-but-open peer (no socket write
  timeout) deadlocked teardown forever. Close the socket first. (MED)
- getProfileToken() missed the ensureCacheMatchesRegistryLocked() guard
  its siblings got, so realtime/player callers could send server A's
  profile token to server B across a direct switchTo(). (MED)
- TvSiloCastReceiver: bump sessionEpoch unconditionally (a handshake in
  flight during a switch, activeSession still null, could register); and
  stop() now closes the session directly so its goodbye isn't cancelled.
- Phone deep-link gate completed to the full pre-auth route set (was an
  incomplete blacklist vs TV's Main-graph whitelist).

Ship-UX audit:
- TV Home: focusedRowIndex no longer keyed on `rows`, so a quiet realtime
  / on-resume refetch can't reset focus to the menu bar. (BLOCKER)
- Phone metadata-language setting stored display labels ("English") where
  the server expects ISO 639-1 ("en"), making the whole new phone surface
  dead — now stores codes with a label map, matching TV. (BLOCKER)
- TV "Translate description" keeps a disabled focusable button while
  translating so pressing it doesn't bounce D-pad focus to the hero.
- Phone AdminStats surfaces refresh failures via snackbar; TvAdminScreen
  gains an explicit empty-state retry branch.
- SiloCast remote: misleading fake-tappable error chip -> plain error text.

Full unit suite green (--rerun-tasks); both release APKs build under R8
with serializers intact.

Co-Authored-By: Claude Fable 5 <[email protected]>
Informational-only note in the server-add flow (phone + TV) when the
entered address resolves to plaintext HTTP — an explicit http scheme or
http:// prefix. Never blocks connecting: LAN/plain-IP servers still work
exactly as before (the whole point of the cleartext opt-in). Auto mode
isn't pre-warned since it tries HTTPS first. Pure helper, unit-tested on
both platforms.

Addresses the security review's cleartext finding without re-breaking
plain-IP connectivity.

Co-Authored-By: Claude Fable 5 <[email protected]>
The phone setup screen's port placeholder said 8096 — Jellyfin's port,
relevant only to the jellycompat layer. Silo clients talk to the server
directly on 8090 (matching DefaultSiloServerPort and the Auto-mode probe
candidate). Test fixtures aligned.

Co-Authored-By: Claude Fable 5 <[email protected]>

@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: 2

🧹 Nitpick comments (2)
android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/SyncEngine.kt (1)

90-102: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Catching Throwable also swallows Error subclasses.

Converting any Throwable — including OutOfMemoryError/StackOverflowError — into a silently-dropped op could mask serious runtime failures behind a normal-looking drop count. Consider narrowing to Exception so unrecoverable JVM errors still propagate.

Proposed narrowing
                 val outcome = try {
                     dispatch(op, scope)
                 } catch (e: kotlinx.coroutines.CancellationException) {
                     throw e
-                } catch (t: Throwable) {
+                } catch (t: Exception) {
                     android.util.Log.w("SyncEngine", "op ${op.id} (${op.opKind}) failed to dispatch; dropping", t)
                     WriteOutcome.TERMINAL
                 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/SyncEngine.kt`
around lines 90 - 102, The try/catch in SyncEngine.dispatchOutcome handling is
too broad because it catches Throwable and can swallow unrecoverable Error
types. Narrow the non-cancellation catch in SyncEngine so only recoverable
exceptions are treated as terminal drops, while fatal JVM errors still
propagate; keep the CancellationException rethrow path unchanged and update the
android.util.Log.w fallback around dispatch(op, scope) accordingly.
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SubtitleSettings.kt (1)

8-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider hoisting metadataLanguageOptions to a shared module.

The comment already flags this list must stay "in lockstep with the TV list" — moving it into android-shared/shared/commonMain (alongside the similar subtitle-language options) would eliminate the manual-sync risk between phone and TV instead of relying on convention.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SubtitleSettings.kt`
around lines 8 - 22, Move metadataLanguageOptions out of SubtitleSettings into a
shared source set/module used by both Android and TV so the list is defined once
with the existing subtitle-language options. Update the SubtitleSettings screen
to consume the shared constant instead of its own local copy, and ensure the
shared location uses the same symbols/shape as the current
metadataLanguageOptions list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadWorker.kt`:
- Around line 69-73: `uiPushAllowed()` is letting `scope()` exceptions flow into
`doWork()` and even into the error-handling path, which can turn a transient
UI-scope lookup failure into a download failure or crash. Update
`uiPushAllowed()` in `DownloadWorker` to catch failures from
`activeScope`/`scope()` and treat them as “not allowed” (or otherwise skip UI
pushing), so the download’s main success/failure logic stays independent. Also
make sure the `doWork()` catch path that re-checks UI push behavior uses the
same safe helper and cannot throw from `scope()`.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SettingsViewModel.kt`:
- Around line 71-73: The comment on SettingsViewModel.metadataLanguage is stale
and still mentions the old "Off" sentinel, which no longer matches the actual
empty-string default. Update the nearby metadataLanguage documentation to
describe "" as the server/library default (or remove the outdated line entirely)
so the comment matches the current behavior.

---

Nitpick comments:
In
`@android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/SyncEngine.kt`:
- Around line 90-102: The try/catch in SyncEngine.dispatchOutcome handling is
too broad because it catches Throwable and can swallow unrecoverable Error
types. Narrow the non-cancellation catch in SyncEngine so only recoverable
exceptions are treated as terminal drops, while fatal JVM errors still
propagate; keep the CancellationException rethrow path unchanged and update the
android.util.Log.w fallback around dispatch(op, scope) accordingly.

In
`@androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SubtitleSettings.kt`:
- Around line 8-22: Move metadataLanguageOptions out of SubtitleSettings into a
shared source set/module used by both Android and TV so the list is defined once
with the existing subtitle-language options. Update the SubtitleSettings screen
to consume the shared constant instead of its own local copy, and ensure the
shared location uses the same symbols/shape as the current
metadataLanguageOptions list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b174269-3da8-4d34-bd8d-9602c3a3f121

📥 Commits

Reviewing files that changed from the base of the PR and between 1baf069 and d9caa72.

📒 Files selected for processing (50)
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/cast/SiloCastNsdBrowser.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/repository/RoomUserItemStateRepository.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/ConflictPolicy.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/sync/SyncEngine.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadSubscriptionEvaluator.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadSubscriptionWorker.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadWorker.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/ActivePlaybackFile.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/mpv/MpvPlayer.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/data/sync/ConflictPolicyTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/data/sync/SyncEngineTest.kt
  • androidApp/build.gradle.kts
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/MainActivity.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/SiloApplication.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/downloads/AppWorkerFactory.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/home/HomeRealtimeForegroundStarter.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/admin/AdminStatsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastRemoteScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/downloads/DownloadsViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reader/reflow/ReflowWebView.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SettingsViewModel.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/SubtitleSettings.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/packaging/AndroidAppPackagingTest.kt
  • androidTvApp/build.gradle.kts
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/MainTvActivity.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/SiloTvApplication.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/TvSiloCastReceiver.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/home/HomeRealtimeForegroundStarter.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvSkylineSectionFeed.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/admin/TvAdminScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDescriptionTranslationSection.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/shell/TvMainShell.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/components/TvSkylineSectionFeedSourceTest.kt
  • gradle/libs.versions.toml
  • shared/src/androidMain/kotlin/org/siloserver/silo/network/EncryptedTokenManagerImpl.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/feature/MetadataAiFeatureStore.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/feature/RequestsFeatureStore.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/HomeRealtimeClient.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/ProfileRepository.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeViewModel.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/metadata/DescriptionTranslationControllerTest.kt
🚧 Files skipped from review as they are similar to previous changes (15)
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastRemoteScreen.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/feature/MetadataAiFeatureStore.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/SiloTvApplication.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/SiloApplication.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/home/HomeRealtimeForegroundStarter.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/HomeRealtimeClient.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDescriptionTranslationSection.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerScreen.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/data/repository/RoomUserItemStateRepository.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeViewModel.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/metadata/DescriptionTranslationController.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/downloads/DownloadSubscriptionWorker.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/lan/SiloCastTls.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/TvSiloCastReceiver.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt

- DownloadWorker.uiPushAllowed() wraps the active-scope resolution in
  runCatching: it runs inside doWork()'s outer catch, so a throw there
  would escape uncaught and could abort a healthy download. A resolution
  failure now means "not the active scope" (skip the UI push), which is
  the safe default.
- Drop a stale comment line referencing the old "Off" metadata-language
  sentinel (the field now uses "").

Co-Authored-By: Claude Fable 5 <[email protected]>
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.

1 participant