Skip to content

Improve SiloCast remote UI and reliability - #253

Merged
Quick104 merged 10 commits into
mainfrom
t3code/improve-remote-ui-ux
Aug 30, 2026
Merged

Quick104 merged 10 commits into
mainfrom
t3code/improve-remote-ui-ux

Conversation

@Quick104

@Quick104 Quick104 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • bring the Android SiloCast remote UI in line with the Apple improvements from feat(ios): center remote controls and map hardware volume silo-apple#199
  • add responsive artwork, transport, scrubber, target, and volume controls, including phone hardware-volume support and optimistic reconciliation
  • retain and synchronize remote volume on Android TV, and canonicalize server identity for more reliable remote connections
  • avoid the foreground-service watchdog crash by letting Media3 promote ongoing sessions after a normal foreground-app service start

Validation

  • ./gradlew test :androidApp:assembleDebug :androidTvApp:assembleDebug
  • focused SiloCastMediaSessionStarterTest regression coverage
  • installed the arm64 debug APK on a Pixel 11 Pro running Android 17
  • launched with existing app data and observed for 50 seconds beyond the previous ~32-second crash window; process remained alive with no new crash-buffer entries

Summary by CodeRabbit

  • New Features

    • Added responsive hardware volume-button controls for remote playback.
    • Improved volume synchronization between the Android app and TV, including mute-state preservation and restoration of the last audible level.
    • Added capability-aware Aspect Ratio and HDR controls to the remote’s top menu.
    • Improved remote layout across screen sizes and font scales, with clearer volume indicators and more consistent control spacing.
  • Bug Fixes

    • Server targets now match reliably across equivalent URL formats, including capitalization and default ports.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 24 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 105 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

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).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e119609d-7453-426a-b150-deb2b6b35a87

📥 Commits

Reviewing files that changed from the base of the PR and between 4f963d2 and 96770ff.

📒 Files selected for processing (114)
  • android-shared/build.gradle.kts
  • android-shared/gradle.lockfile
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/cards/CardPresentationLocals.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/di/PlayerInfraModule.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsCoordinator.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsImageHealth.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsInstrumentation.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsManualCapture.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsModule.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsPerformanceRecorder.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/diagnostics/ExitInfoCollector.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/images/SiloImageLoader.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/network/AndroidDeviceMetadataProvider.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetector.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/seek/PlaybackTimelineSeekPolicy.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/CardPresentationStore.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/ServerDrivenConfigRefresher.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/ui/components/ThumbhashImage.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsBundleBuilderTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsCoordinatorTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsImageHealthTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsInstrumentationTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsPerformanceRecorderTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/DiagnosticsPrivacyIntegrationTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/diagnostics/ExitInfoCollectorTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackCapabilityDetectorDolbyVisionTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/seek/PlaybackTimelineSeekPolicyTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/settings/ServerDrivenConfigRefresherTest.kt
  • androidApp/build.gradle.kts
  • androidApp/gradle.lockfile
  • 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/RemoteVolumeReconciler.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastMediaSessionService.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/di/AndroidModule.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/components/BackdropCard.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/components/MediaCard.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/components/MediaRow.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/components/Skeleton.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/MainScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/audiobook/AudiobookDetailContent.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/book/BookDetailContent.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/browse/CatalogGrid.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/calendar/CalendarScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/collections/CollectionDetailScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/collections/LibraryCollectionsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/CastCrewSection.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/detail/SimilarRail.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/downloads/DownloadsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/home/HomeScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/libraries/LibrariesScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/notifications/InboxScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/people/PersonDetailScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/personal/PersonalMediaGridContent.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/player/PlayerNextUpScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/reading/ReadingHubScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/recommendations/RecommendationsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/MyRequestsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestComponents.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestDetailScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/search/RequestSearchSection.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/search/SearchResults.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/settings/MediaCardsSettings.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/androidUnitTest/kotlin/org/siloserver/silo/android/cast/RemoteVolumeReconcilerTest.kt
  • androidTvApp/build.gradle.kts
  • androidTvApp/gradle.lockfile
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/SiloTvApplication.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvCatalogGrid.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvEpisodeCard.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvMediaCard.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/components/TvMediaRow.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/browse/TvBrowseScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/calendar/TvCalendarScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvDetailEpisodeRail.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryCollectionDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/library/TvLibraryDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/people/TvPersonDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/personal/TvPersonalScreens.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/requests/TvRequestComponents.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/requests/TvRequestDetailScreen.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/theme/CardPresentationDimens.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerRemoteKeyActionTest.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerWindowFactInvalidationTest.kt
  • baselineprofile-tv/gradle.lockfile
  • baselineprofile/gradle.lockfile
  • gradle/libs.versions.toml
  • gradle/verification-metadata.xml
  • shared/src/androidMain/kotlin/org/siloserver/silo/network/SiloHttpClient.android.kt
  • shared/src/androidMain/kotlin/org/siloserver/silo/network/SiloOkHttp.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/playback/PlaybackProtocolV3.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/CardPresentation.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/settings/SettingValueModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/AuthInterceptorImpl.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/DeviceMetadataProvider.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/SettingsRepository.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeDiagnostics.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/HomeViewModel.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/settings/CardPresentationTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/viewmodel/HomeViewModelCacheIdentityTest.kt

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1966aa21-9613-4ab6-a2b6-691efdad45ad

📥 Commits

Reviewing files that changed from the base of the PR and between 73d8979 and 4f963d2.

📒 Files selected for processing (15)
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/network/AndroidServerIdentityTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/MainActivity.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/RemoteVolumeReconciler.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastController.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastMediaSessionStarter.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastRemoteScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastTargetPickerSheet.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/cast/RemoteVolumeReconcilerTest.kt
  • androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/cast/SiloCastMediaSessionStarterTest.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/RemotePlaybackIdentityManager.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/SiloCastVolumeTracker.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/TvSiloCastReceiver.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt
  • androidTvApp/src/androidUnitTest/kotlin/org/siloserver/silo/tv/ui/screens/player/TvSiloCastVolumeStateTest.kt
  • shared/src/androidMain/kotlin/org/siloserver/silo/network/AndroidServerRegistry.kt

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The change adds canonical server identity matching, serialized cast commands, optimistic volume reconciliation, retained TV volume state, hardware volume control, adaptive remote layouts, and simplified media service startup behavior.

Changes

Cast control and identity

Layer / File(s) Summary
Server identity normalization and validation
shared/src/androidMain/..., android-shared/src/androidUnitTest/..., androidApp/src/androidMain/..., androidTvApp/src/androidMain/...
Server IDs now support exact HTTP(S) round trips and canonical matching for scheme, host, and default ports. Android and TV authorization, launch validation, target filtering, and persistence use normalized identity matching.
Serialized commands and optimistic volume control
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/..., androidApp/src/androidMain/kotlin/org/siloserver/silo/android/MainActivity.kt, androidApp/src/androidUnitTest/...
Cast commands use a transport-bound queue. Volume updates apply optimistic state, reconcile inbound playback frames, and support hardware volume steps. Tests cover burst, reversal, timeout, and clearing behavior.
TV volume retention and playback reporting
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/cast/..., androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerScreen.kt, androidTvApp/src/androidUnitTest/...
The TV retains audible volume and mute state across player changes and publishes the resolved state in playback snapshots.
Remote controls and adaptive layout
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/cast/SiloCastRemoteScreen.kt
The remote adds capability-gated aspect-ratio and HDR controls, adaptive now-playing layout behavior, revised volume icons, centered transport controls, and full-width secondary chips.
Media service lifecycle
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/cast/SiloCastMediaSessionStarter.kt, androidApp/src/androidUnitTest/kotlin/org/siloserver/silo/android/cast/SiloCastMediaSessionStarterTest.kt
Media service startup now uses startService. Foreground promotion and the obsolete needsForegroundStart state are removed. Tests validate the simplified action mapping.

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

Merge Risk: ⚪ Minimal · up to 4f963

The PR improves remote controls, volume synchronization, server identity handling, and service reliability; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant MainActivity
  participant SiloCastController
  participant RemoteVolumeReconciler
  participant ControlTransport
  participant TV
  MainActivity->>SiloCastController: stepVolumeOptimistic(step)
  SiloCastController->>RemoteVolumeReconciler: record requested volume
  SiloCastController->>ControlTransport: enqueue volume command
  ControlTransport->>TV: write control frame
  TV-->>SiloCastController: publish playback state
  SiloCastController->>RemoteVolumeReconciler: reconcile inbound volume
Loading

Suggested reviewers: rxwatcher

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 78 functions across 15 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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the pull request's main changes: improvements to the SiloCast remote UI and reliability. It is concise and specific enough for project history.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/improve-remote-ui-ux

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: 4f963d2673

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +38 to +41
if (currentVolume != null) {
val clamped = currentVolume.coerceIn(0.0, 1.0)
muted = clamped <= SILENT_VOLUME
if (!muted) retainedVolume = clamped

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 Preserve explicit mute state until the player catches up

When handling a mute or unmute command, recordMuted updates muted immediately, but the state provider then calls resolve with the MediaController's current volume. If that asynchronous controller has not reflected the just-issued volume change yet, these lines immediately reverse the explicit state—for example, recordMuted(true, 0.42) followed by resolve(0.42) reports unmuted. The TV consequently sends a contradictory acknowledgement and the remote can flicker or require another interaction; retain the requested mute state until the controller observes the corresponding volume.

Useful? React with 👍 / 👎.

Comment on lines +906 to +908
message.state.copy(
volume = volumeReconciler.reconcile(message.state.volume, now),
)

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 Reconcile optimistic mute updates alongside volume

When the user toggles mute while an older periodic state frame is already in flight, this copies the inbound isMuted unchanged even though setMuted just updated it optimistically; only volume is reconciled. The stale frame can therefore undo the toggle, and a quick second tap sends the same command again instead of unmuting. Track pending mute requests or otherwise preserve the optimistic isMuted value until its acknowledgement arrives, as is already done for volume.

Useful? React with 👍 / 👎.

Quick104 and others added 8 commits August 28, 2026 19:22
…work presentation during scroll (#256)

- Replace coil-network-ktor3 with coil-network-okhttp and register the
  fetcher explicitly: new SiloOkHttp foundation shares one ConnectionPool
  between the Ktor API clients and Coil, with per-client tuned dispatchers
  so image bursts and API fan-outs never queue behind each other. Loader
  config is unified in buildSiloImageLoader so phone and TV cannot drift.
- Extend Home's existing artwork-presentation deferral to all artwork
  scroll surfaces via DeferImagePresentationWhileScrolling: freshly decoded
  images hold their thumbhash until the scroll settles (memory-cache hits
  still present instantly), now covering horizontal rows, grids, detail
  feeds, and vertical-scroll columns.
- Fix stale-capture load-more triggers in CatalogGrid and SearchResults:
  keyless remember { derivedStateOf } froze first-composition
  hasMore/isLoading values, breaking pagination in some entry states.
- Declare ktor-client-core explicitly in android-shared/androidApp (it was
  only reaching the compile classpath transitively via the old Coil
  artifact); regenerate dependency locks and verification metadata and
  drop stale TV lock pins.

Co-authored-by: Claude Fable 5 <[email protected]>
…e-anchoring + map seek input + fix second press for seek (#259)

* fix(tv): prefer the mounted transport for quick skips instead of re-anchoring

Server plans for growing-HLS transcodes and copy-remux transports publish
an open-ended seek window with can_seek_anywhere=false, so every quick
skip went through a protocol-V3 seek_reanchor: buffering UI, an API
round trip, and a full restream, even when the target sat inside content
the player already had mounted.

decideSeek now accepts an optional mountedSeekableSourceRange: the
source-time extent the currently mounted transport provably covers. The
TV screen reports the Media3 window's seekability and extent alongside
its existing position poll, and a target inside that range is a plain
Player.seekTo. Targets the mounted transport cannot serve (before the
stream origin, past the produced manifest head, or a growing progressive
copy remux with no known length) still reanchor, and the existing
same-route reanchor recovery remains the fallback for native seeks that
fail with 404/410/416.

* fix(tv): route media rewind and fast-forward keys through the player bridge

The remote's rewind/fast-forward keys (plus SKIP_BACKWARD/SKIP_FORWARD)
were unmapped, so the player bridge's null-action branch only revealed
the transport controls and swallowed the first press - users had to
press twice to seek - and the second press fell through to Media3's
session-level seekBack/seekForward, bypassing the app's route-aware
seek path and the Watch Together room transport gate.

Map them to SkipBack/SkipForward like D-pad left/right. They ignore
dpadHorizontalSeek because they are never focus navigation, and UP
halves and auto-repeats are consumed so the system media-key fallback
cannot seek a second time.

* fix(tv): invalidate mounted-window seek facts when the transport is replaced

The mounted-window facts feeding decideSeek's mountedSeekableSourceRange hint describe one Media3 item, but they were neither suppressed during a transport handoff nor cleared when a mount won. After a reanchor/replan/content switch, the previous transport's window end mapped through the new plan's timelineOffsetSeconds overstates the new transport's extent, and a quick skip inside that window could take a native path that clamps to the new item's short window - a silent, wrong-position seek with no error and no self-heal. The sharpest instance: onTransportMountApplied re-evaluates pendingNativeSeekAfterMount at exactly that moment of maximal staleness.

Drop onPlayerWindowChanged reports while transportMountGate is suppressing (the same guard onPositionChanged applies), and clear both facts at the top of the applied(nonce) branch before the queued-seek re-evaluation. The next poll tick (<=500ms) repopulates from the mounted item; until then the hint is absent, which at worst costs an unnecessary reanchor.

* docs(tv): document the seek-hint and media-key contracts

KDoc for tvPlayerRemoteKeyAction (the full key-to-action mapping incl. why unmapped keys only reveal controls) and executeSeekTarget (the seek-commit routing ladder), plus one-line contracts on the new test functions. Addresses CodeRabbit's docstring-coverage pre-merge check on PR #259.

---------

Co-authored-by: Quick <[email protected]>
returnRestoreRequest is bumped when a restore ladder starts and never
reset for the feed's lifetime, while detailReturnPending is re-armed by
every focus move. After the first detail round trip, every later focus
move therefore re-fired TvMediaRow's restore effect and its instant
scrollToItem, which cancels the rail pin's animated glide — the carousel
snapped instead of scrolling until the feed was disposed again.

Pass the restore request only while a ladder is actually in flight
(restorationsInFlight > 0): the instant row scroll exists solely to
compose a ladder's destination into the horizontal window. Also log
restore scrolls through TvFocusLog so a regression is visible in logcat
instead of only on screen.
#257)

* feat(android): server-driven card presentation presets on phone and TV

Adds the "Cards & Posters" preference to both Android clients, porting the
iOS/tvOS feature built on the canonical `ui.card_presentation` setting.
The value is the contract's whole two-field object -- `poster_size`
(compact/standard/large) and `caption` (title_metadata/title/artwork) --
surfaced as the same four presets Apple and the web UI offer (Balanced,
Compact, Cinema, Artwork Only) plus per-axis pickers, with a synthetic
"Custom" entry when the pair matches no preset.

Per-device preferences: writes land at `profile_client` by default so a
choice roams between like devices (Android TV joins the `tv` family, phone
`mobile`, tablet `tablet` via a new X-Silo-Client-Family header), and an
"Only this device" toggle writes at `profile_device` instead, which the
server resolves ahead of the family and profile layers. Turning it off
deletes that row so resolution falls back.

Rendering follows Apple's semantics: rails and standalone cards scale
0.86/1.0/1.2, fixed grids shift a column either way, adaptive grids scale
their min cell width, and the caption axis gates the title and metadata
lines. The TV Skyline row band height is now derived from the scaled card
height and caption rows rather than a fixed 0.50 fraction, so large cards
have room without clipping the marquee -- reproducing today's band exactly
at the standard preset.

State lives in a new CardPresentationStore (android-shared), capability-
gated on the settings contract, cached per server/profile/family/device for
a jump-free cold start, with optimistic writes, latest-wins coalescing, and
rollback on failure. It refreshes on foreground and reconnect alongside the
existing overlay prefs, and clears on sign-out and on profile/server switch.

Closes #163.

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

* feat(diagnostics): expand Android client evidence (#261)

* fix(playback): advertise native Media3 HLS (#262)

* fix(tv): prefer native mounted transport for quick skips instead of re-anchoring + map seek input + fix second press for seek (#259)

* fix(tv): prefer the mounted transport for quick skips instead of re-anchoring

Server plans for growing-HLS transcodes and copy-remux transports publish
an open-ended seek window with can_seek_anywhere=false, so every quick
skip went through a protocol-V3 seek_reanchor: buffering UI, an API
round trip, and a full restream, even when the target sat inside content
the player already had mounted.

decideSeek now accepts an optional mountedSeekableSourceRange: the
source-time extent the currently mounted transport provably covers. The
TV screen reports the Media3 window's seekability and extent alongside
its existing position poll, and a target inside that range is a plain
Player.seekTo. Targets the mounted transport cannot serve (before the
stream origin, past the produced manifest head, or a growing progressive
copy remux with no known length) still reanchor, and the existing
same-route reanchor recovery remains the fallback for native seeks that
fail with 404/410/416.

* fix(tv): route media rewind and fast-forward keys through the player bridge

The remote's rewind/fast-forward keys (plus SKIP_BACKWARD/SKIP_FORWARD)
were unmapped, so the player bridge's null-action branch only revealed
the transport controls and swallowed the first press - users had to
press twice to seek - and the second press fell through to Media3's
session-level seekBack/seekForward, bypassing the app's route-aware
seek path and the Watch Together room transport gate.

Map them to SkipBack/SkipForward like D-pad left/right. They ignore
dpadHorizontalSeek because they are never focus navigation, and UP
halves and auto-repeats are consumed so the system media-key fallback
cannot seek a second time.

* fix(tv): invalidate mounted-window seek facts when the transport is replaced

The mounted-window facts feeding decideSeek's mountedSeekableSourceRange hint describe one Media3 item, but they were neither suppressed during a transport handoff nor cleared when a mount won. After a reanchor/replan/content switch, the previous transport's window end mapped through the new plan's timelineOffsetSeconds overstates the new transport's extent, and a quick skip inside that window could take a native path that clamps to the new item's short window - a silent, wrong-position seek with no error and no self-heal. The sharpest instance: onTransportMountApplied re-evaluates pendingNativeSeekAfterMount at exactly that moment of maximal staleness.

Drop onPlayerWindowChanged reports while transportMountGate is suppressing (the same guard onPositionChanged applies), and clear both facts at the top of the applied(nonce) branch before the queued-seek re-evaluation. The next poll tick (<=500ms) repopulates from the mounted item; until then the hint is absent, which at worst costs an unnecessary reanchor.

* docs(tv): document the seek-hint and media-key contracts

KDoc for tvPlayerRemoteKeyAction (the full key-to-action mapping incl. why unmapped keys only reveal controls) and executeSeekTarget (the seek-commit routing ladder), plus one-line contracts on the new test functions. Addresses CodeRabbit's docstring-coverage pre-merge check on PR #259.

---------

Co-authored-by: Quick <[email protected]>

* fix(tv): keep the skyline rail gliding after a detail round trip (#260)

returnRestoreRequest is bumped when a restore ladder starts and never
reset for the feed's lifetime, while detailReturnPending is re-armed by
every focus move. After the first detail round trip, every later focus
move therefore re-fired TvMediaRow's restore effect and its instant
scrollToItem, which cancels the rail pin's animated glide — the carousel
snapped instead of scrolling until the feed was disposed again.

Pass the restore request only while a ladder is actually in flight
(restorationsInFlight > 0): the instant row scroll exists solely to
compose a ladder's destination into the horizontal window. Also log
restore scrolls through TvFocusLog so a regression is visible in logcat
instead of only on screen.

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Co-authored-by: blurbery <[email protected]>
Co-authored-by: evulhotdog <[email protected]>

@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: 132305a220

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +364 to +366
_state.update { state ->
state.copy(playbackState = state.playbackState?.copy(volume = clamped))
}

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 Reconcile mute state when setting volume

When the slider is moved while playback is muted, this optimistic update changes only volume, so clearing volumePreview immediately renders the slider at zero again because RemoteVolumeRow derives its displayed value from isMuted. The TV's recordVolume treats a positive level as unmuted (and zero as muted), but the phone does not reflect that until the asynchronous state reply arrives, causing the control to snap back or briefly expose the wrong mute action. Update the optimistic mute state consistently with the requested volume.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T19:29:02.813263Z 96770ff New commits
ℹ️ 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.

@Quick104
Quick104 merged commit 003ef4e into main Aug 30, 2026
3 checks passed
@Quick104
Quick104 deleted the t3code/improve-remote-ui-ux branch August 30, 2026 19:39
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.

3 participants