Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
60f4945
docs(tv): design navigation remediation
RXWatcher Jul 27, 2026
daf2933
docs(tv): plan navigation remediation
RXWatcher Jul 27, 2026
0ed7ba5
perf(android): hydrate inline home sections once
RXWatcher Jul 27, 2026
f0627c5
perf(tv): make marquee prefetch cache first
RXWatcher Jul 27, 2026
2060871
perf(tv): defer skyline work until focus settles
RXWatcher Jul 27, 2026
408fd36
fix(tv): enter for-you rows from filter controls
RXWatcher Jul 27, 2026
a69b5c0
fix(tv): close cold navigation review gaps
RXWatcher Jul 27, 2026
e7939f3
fix(tv): settle prefetch without caller races
RXWatcher Jul 27, 2026
e32ced5
docs(tv): define navigation follow-up behavior
RXWatcher Jul 27, 2026
4c411aa
docs(tv): plan navigation follow-up fixes
RXWatcher Jul 27, 2026
1a295a1
docs(tv): test navigation behavior at real boundaries
RXWatcher Jul 27, 2026
ccf2e37
fix(tv): stop held up at the first home row
RXWatcher Jul 27, 2026
2a21361
fix(tv): unify for-you saved-list routes
RXWatcher Jul 27, 2026
f08aec6
docs(tv): summarize navigation remediation
RXWatcher Jul 27, 2026
e3dec4d
fix(tv): focus applied for-you selection
RXWatcher Jul 27, 2026
4eef154
docs(tv): design active header focus and editorial hero
RXWatcher Jul 28, 2026
b1742c4
docs(tv): plan active header focus and editorial hero
RXWatcher Jul 28, 2026
2fc204c
fix(tv): restore active header focus from content
RXWatcher Jul 28, 2026
0482bd9
fix(tv): show editorial metadata in browse heroes
RXWatcher Jul 28, 2026
7098914
docs(android): extend editorial heroes to phone
RXWatcher Jul 28, 2026
41bbe4e
docs(android): extend hero plan to phone
RXWatcher Jul 28, 2026
59ad7f1
fix(android): align editorial browse hero metadata
RXWatcher Jul 28, 2026
9c25129
fix(tv): avoid home focus fallback on secondary routes
RXWatcher Jul 28, 2026
a28d10f
docs(android): report task 4 verification
RXWatcher Jul 28, 2026
6478528
fix(tv): return calendar controls up to active tab
RXWatcher Jul 28, 2026
ade712c
fix(shared): scope home requests to identity
RXWatcher Jul 28, 2026
d6f2c15
fix(tv): keep repeated up in content
RXWatcher Jul 28, 2026
e922af0
docs(android): design fixed library chrome inset
RXWatcher Jul 28, 2026
e156e76
docs(android): plan fixed library chrome inset
RXWatcher Jul 28, 2026
677a0e7
fix(android): keep library content below chrome
RXWatcher Jul 28, 2026
469f217
docs(android): trim library inset spec
RXWatcher Jul 28, 2026
b55f6a6
fix(tv): bound top menu focus retries
RXWatcher Jul 28, 2026
c9de4b7
docs(android): plan release audit fixes
RXWatcher Jul 28, 2026
c812e06
fix(shared): keep cache writes identity scoped
RXWatcher Jul 28, 2026
e4d4ae9
fix(android): keep library results and browse chrome current
RXWatcher Jul 28, 2026
1fbcda4
fix(shared): propagate cache write ownership
RXWatcher Jul 28, 2026
18fba48
fix(android): keep browse filters query scoped
RXWatcher Jul 28, 2026
1ae0e46
docs(android): extend cache ownership plan to home
RXWatcher Jul 28, 2026
e098749
fix(shared): keep home cache writes identity scoped
RXWatcher Jul 28, 2026
e1b4b6e
test(android): retain deferred library requests
RXWatcher Jul 28, 2026
3717c9d
docs(android): plan final release ledger fixes
RXWatcher Jul 28, 2026
e4b086e
fix(watch-together): reconcile rooms and surface lobby errors
RXWatcher Jul 28, 2026
14c06a6
fix(android): finalize audiobook sessions asynchronously
RXWatcher Jul 28, 2026
b02ea4f
fix(tv): preserve subtitle title-safe positions
RXWatcher Jul 28, 2026
fc13dfe
chore(shared): remove unused no-op auth plugin
RXWatcher Jul 28, 2026
576c2a6
fix(watch-together): wait for session attach echo
RXWatcher Jul 28, 2026
632a3f0
fix(android): clear failed download progress
RXWatcher Jul 28, 2026
ff8b648
fix(watch-together): bind attach echoes to connection epoch
RXWatcher Jul 28, 2026
f822d22
test(tv): keep subtitle cleanup scheduler single-threaded
RXWatcher Jul 27, 2026
a49170a
docs: specify PR 126 review remediation
RXWatcher Jul 28, 2026
3b57abb
docs: plan PR 126 review remediation
RXWatcher Jul 28, 2026
7f87291
docs: correct marquee review assertion
RXWatcher Jul 28, 2026
fac001c
docs: use available shared test task
RXWatcher Jul 28, 2026
cd43af9
fix(tv): close reviewed focus routing gaps
RXWatcher Jul 28, 2026
5d0d44b
test(tv): make focus wiring anchors fail closed
RXWatcher Jul 28, 2026
5a93c22
fix(android): bound hero metadata and marquee identity
RXWatcher Jul 28, 2026
3b757fd
refactor(watch-together): make delivery keys explicit
RXWatcher Jul 28, 2026
d916238
refactor(android): clarify reviewed request guards
RXWatcher Jul 28, 2026
98e5b7b
docs: resolve PR 126 review findings
RXWatcher Jul 28, 2026
4d18591
docs: remove remaining local paths
RXWatcher Jul 28, 2026
f2bba1c
docs: generalize tester artifact destinations
RXWatcher Jul 28, 2026
77c8711
fix(tv): close final PR 126 review findings
RXWatcher Jul 28, 2026
615ff87
test(android): fail closed room source anchors
RXWatcher Jul 28, 2026
21ab78b
test(tv): keep subtitle adoption on test scheduler
RXWatcher Jul 28, 2026
58a2485
test(android): await transient library request siblings
RXWatcher Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Task 4 Report: Android TV Focus and Phone/TV Hero Verification

Date: 2026-07-28
Worktree: `fix/tv-for-you-cold-navigation worktree`
Final local HEAD: `9c251293dc321385ea9be205a0732cc7b14b1251`

## Summary

Task 4 verification found one Important review issue in the previously approved Task 1 focus path. I fixed it locally in `9c251293` by preventing non-Search secondary routes from falling through to Home focus when `selectedRoot == null`. The repeat independent review approved the updated diff.

Automated tests, supply-chain checks, release builds, APK signing verification, and artifact packaging completed. Dedicated emulator smoke did not produce a fully clean pass, so I did not push or update PR #126.

## Local Commits Added

- `9c251293 fix(tv): avoid home focus fallback on secondary routes`

## Verification Commands

Focused TV regressions:

```bash
./gradlew :androidTvApp:testDebugUnitTest \
--tests "org.siloserver.silo.tv.ui.shell.TvTopMenuFocusRequestTest" \
--tests "org.siloserver.silo.tv.ui.shell.TvShellFocusStateTest" \
--tests "org.siloserver.silo.tv.ui.components.TvSkylineUpNavigationTest" \
--tests "org.siloserver.silo.tv.ui.components.TvFocusMarqueeModelTest" \
--rerun-tasks --max-workers=2 --no-daemon
```

Result: `BUILD SUCCESSFUL`, 68 tasks executed.

Focused phone regression:

```bash
./gradlew :androidApp:testDebugUnitTest \
--tests "org.siloserver.silo.android.ui.screens.home.FeaturedHeroMetadataTest" \
--rerun-tasks --max-workers=2 --no-daemon
```

Result: `BUILD SUCCESSFUL`, 80 tasks executed.

Supply-chain checks:

```bash
./scripts/test-check-build-supply-chain.sh
./scripts/check-build-supply-chain.sh
```

Result: both exited 0. Self-test output: `All supply-chain policy self-tests passed`.

Full release gate:

```bash
./gradlew \
:androidApp:testDebugUnitTest \
:androidTvApp:testDebugUnitTest \
:androidApp:assembleRelease \
:androidTvApp:assembleRelease \
-PallowDebugReleaseSigning=true \
--rerun-tasks --max-workers=2 --no-daemon
```

Result: `BUILD SUCCESSFUL in 6m 29s`, 313 tasks executed.

The test XML directory immediately after the full release gate only contained focused suites, so I reran the unfiltered unit-test tasks explicitly:

```bash
./gradlew :androidApp:testDebugUnitTest :androidTvApp:testDebugUnitTest \
--rerun-tasks --max-workers=2 --no-daemon
```

Result: `BUILD SUCCESSFUL in 1m 20s`, 104 tasks executed.

XML totals after explicit unfiltered rerun:

- `androidApp/build/test-results/testDebugUnitTest`: 85 suites, 477 tests, 0 skipped, 0 failures, 0 errors.
- `androidTvApp/build/test-results/testDebugUnitTest`: 88 suites, 646 tests, 0 skipped, 0 failures, 0 errors.

Diff hygiene:

```bash
git diff --check origin/main...HEAD
git status --short --branch
git log --oneline origin/main..HEAD
```

Result before writing this report: no whitespace errors; branch ahead of `origin/fix/tv-for-you-cold-navigation`.

## Independent Review

Initial review finding:

- Important: non-Search secondary routes could call `requestMenuFocus(null)` and fall through to Home in `TvTopMenuBar`.

Fix:

- Added `TvShellFocusState.requestMenuFocusIfAvailable`.
- Updated content-Up routing in `TvMainShell` to allow null targeting only for Search.
- Added regression coverage in `TvShellFocusStateTest`.

Repeat review result:

- No blocking findings. Approved.
- Residual risk noted by reviewer: the content-Up fix is covered by state/helper unit tests, not a full Compose focus integration test.

## Emulator Smoke

Physical device safety:

- ADB showed an unapproved physical TV device; I did not target it.
- TV smoke used the dedicated TV emulator.
- Phone smoke used the dedicated phone emulator.

TV smoke on final TV APK:

- Installed `androidTvApp/build/outputs/apk/release/androidTvApp-universal-release.apk`
on the dedicated TV emulator.
- Home: from content card, fresh Up focused the Home top pill. Pass.
- Movies library: from first content card, first Up left focus on the content card; second Up focused the Movies pill. Not a clean pass.
- For You: from content, fresh Up focused the For You control. Pass.
- Calendar: targeted Calendar and entered content; Up focused the in-page `Following` control rather than the top Calendar pill. Not a clean top-pill pass.
- Hold-Up from lower row: not cleanly completed after the caveats above.
- Search route focus: not completed after the caveats above.
- TV hero metadata: visual/UIAutomator dumps showed editorial hero metadata for focused content and no technical badges in the large hero; content cards still show technical badges outside the hero.

Phone smoke on final phone APK:

- Installed `androidApp/build/outputs/apk/release/androidApp-universal-release.apk`
on the dedicated phone emulator.
- Opened Libraries > Movies. The Movies library Recommended hero displayed editorial chips `2004`, `7.3`, `War`, `R`, with no generic `Movie` chip, and Play / More Info visible.
- The selected movie did not show a runtime chip in the UIAutomator dump, so the requested movie smoke is partial rather than a full pass.
- Episode carousel page smoke was not completed.
- Narrow viewport wrapping was not completed beyond the default `1080x2400` phone emulator viewport.

Smoke conclusion: not fully green. PR #126 was not pushed or updated.

## APK Artifacts

Built universal minified release APKs from local HEAD `9c251293` with `-PallowDebugReleaseSigning=true`.

Signing caveat: these are debug-signed release builds. They only upgrade installations signed with the same debug certificate.

Copied artifacts:

- `Silo-Phone-Universal-0.3.11-FocusHeroFix-9c251293.apk`
- `Silo-TV-Universal-0.3.11-TVFocusHeroFix-9c251293.apk`

SHA-256:

- Phone: `0c4c68d15d47c28de41ef1fc1db080ba266f899aa2c3dad663a20fdb5dd5ed50`
- TV: `9e135e3cdad20f1b000ae2ef55573ceb6070e1412718d4ebde47a1977e492a09`

`apksigner verify --verbose` on copied APKs:

- Phone: verifies; v2 scheme true; number of signers 1.
- TV: verifies; v2 scheme true; number of signers 1.

`apkanalyzer` status:

- `apkanalyzer` failed with `IllegalStateException: Cannot locate latest build tools`, even with `ANDROID_HOME` and `ANDROID_SDK_ROOT` set.
- Used SDK `aapt` as fallback for package/version/ABI metadata.

`aapt dump badging` metadata:

- Phone: `applicationId=org.siloserver.silo`, `versionCode=14`, `versionName=0.3.11`, native ABIs `arm64-v8a, armeabi-v7a, x86, x86_64`.
- TV: `applicationId=org.siloserver.silo`, `versionCode=15`, `versionName=0.3.11`, native ABIs `arm64-v8a, armeabi-v7a, x86, x86_64`.

## PR Status

No push performed.

No PR #126 description update performed because the required emulator smoke was not fully green.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import org.siloserver.silo.model.catalog.SeasonsResponse
import org.siloserver.silo.model.personal.UserLibrary
import org.siloserver.silo.model.section.ResolvedSection
import org.siloserver.silo.network.AuthScopeSnapshot
import org.siloserver.silo.network.DefaultIdentityTransitionBarrier
import org.siloserver.silo.network.IdentityTransitionBarrier
import org.siloserver.silo.repository.port.CatalogCachePort
import org.siloserver.silo.repository.port.CatalogCacheWriteLease
import kotlinx.serialization.json.Json

/**
Expand All @@ -21,51 +24,92 @@ import kotlinx.serialization.json.Json
class RoomCatalogCacheRepository(
db: SiloDatabase,
private val snapshotProvider: suspend () -> AuthScopeSnapshot?,
private val identityTransitions: IdentityTransitionBarrier = DefaultIdentityTransitionBarrier(),
private val now: () -> Long = { System.currentTimeMillis() },
) : CatalogCachePort {

private val dao = db.catalogCacheDao()
private val json = Json { ignoreUnknownKeys = true }

override suspend fun cacheLibraries(libraries: List<UserLibrary>) =
put(KEY_LIBRARIES, json.encodeToString(libraries))
cacheLibraries(libraries, currentWriteLease())

override suspend fun cacheLibraries(libraries: List<UserLibrary>, lease: CatalogCacheWriteLease) =
put(KEY_LIBRARIES, json.encodeToString(libraries), lease)

override suspend fun getCachedLibraries(): List<UserLibrary>? =
get(KEY_LIBRARIES)?.let { runCatching { json.decodeFromString<List<UserLibrary>>(it) }.getOrNull() }

override suspend fun cacheDefaultLibraryPage(libraryId: Int, response: CatalogResponse) =
put(libraryKey(libraryId), json.encodeToString(response))
cacheDefaultLibraryPage(libraryId, response, currentWriteLease())

override suspend fun cacheDefaultLibraryPage(
libraryId: Int,
response: CatalogResponse,
lease: CatalogCacheWriteLease,
) = put(libraryKey(libraryId), json.encodeToString(response), lease)

override suspend fun getCachedDefaultLibraryPage(libraryId: Int): CatalogResponse? =
get(libraryKey(libraryId))?.let { runCatching { json.decodeFromString<CatalogResponse>(it) }.getOrNull() }

override suspend fun cacheLibrarySections(libraryId: Int, sections: List<ResolvedSection>) =
put(librarySectionsKey(libraryId), json.encodeToString(sections))
cacheLibrarySections(libraryId, sections, currentWriteLease())

override suspend fun cacheLibrarySections(
libraryId: Int,
sections: List<ResolvedSection>,
lease: CatalogCacheWriteLease,
) = put(librarySectionsKey(libraryId), json.encodeToString(sections), lease)

override suspend fun getCachedLibrarySections(libraryId: Int): List<ResolvedSection>? =
get(librarySectionsKey(libraryId))?.let { runCatching { json.decodeFromString<List<ResolvedSection>>(it) }.getOrNull() }

override suspend fun cacheItemDetail(contentId: String, detail: ItemDetail) =
put(itemDetailKey(contentId), json.encodeToString(detail))
cacheItemDetail(contentId, detail, currentWriteLease())

override suspend fun cacheItemDetail(
contentId: String,
detail: ItemDetail,
lease: CatalogCacheWriteLease,
) = put(itemDetailKey(contentId), json.encodeToString(detail), lease)

override suspend fun getCachedItemDetail(contentId: String): ItemDetail? =
get(itemDetailKey(contentId))?.let { runCatching { json.decodeFromString<ItemDetail>(it) }.getOrNull() }

override suspend fun cacheSeasons(seriesId: String, response: SeasonsResponse) =
put(seasonsKey(seriesId), json.encodeToString(response))
cacheSeasons(seriesId, response, currentWriteLease())

override suspend fun cacheSeasons(
seriesId: String,
response: SeasonsResponse,
lease: CatalogCacheWriteLease,
) = put(seasonsKey(seriesId), json.encodeToString(response), lease)

override suspend fun getCachedSeasons(seriesId: String): SeasonsResponse? =
get(seasonsKey(seriesId))?.let { runCatching { json.decodeFromString<SeasonsResponse>(it) }.getOrNull() }

override suspend fun cacheEpisodes(seriesId: String, seasonNumber: Int, response: EpisodesResponse) =
put(episodesKey(seriesId, seasonNumber), json.encodeToString(response))
cacheEpisodes(seriesId, seasonNumber, response, currentWriteLease())

override suspend fun cacheEpisodes(
seriesId: String,
seasonNumber: Int,
response: EpisodesResponse,
lease: CatalogCacheWriteLease,
) = put(episodesKey(seriesId, seasonNumber), json.encodeToString(response), lease)

override suspend fun getCachedEpisodes(seriesId: String, seasonNumber: Int): EpisodesResponse? =
get(episodesKey(seriesId, seasonNumber))?.let { runCatching { json.decodeFromString<EpisodesResponse>(it) }.getOrNull() }

private suspend fun put(cacheKey: String, jsonStr: String) {
private suspend fun put(
cacheKey: String,
jsonStr: String,
lease: CatalogCacheWriteLease,
) {
if (lease.identityGeneration != identityTransitions.generation.value) return
val snapshot = snapshotProvider() ?: return
val profileId = snapshot.profileId ?: return
if (lease.identityGeneration != identityTransitions.generation.value) return
// A Room row must fit SQLite's ~2MB CursorWindow or the *read* throws
// SQLiteBlobTooBigException. Big library pages can exceed it, so don't
// store an unreadable row — drop any prior row for this key and skip.
Expand All @@ -84,6 +128,9 @@ class RoomCatalogCacheRepository(
)
}

private fun currentWriteLease() =
CatalogCacheWriteLease(identityTransitions.generation.value)

private suspend fun get(cacheKey: String): String? {
val snapshot = snapshotProvider() ?: return null
val profileId = snapshot.profileId ?: return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import org.siloserver.silo.common.data.db.SiloDatabase
import org.siloserver.silo.common.data.db.entity.HomeCacheEntity
import org.siloserver.silo.model.section.ResolvedSection
import org.siloserver.silo.network.AuthScopeSnapshot
import org.siloserver.silo.network.DefaultIdentityTransitionBarrier
import org.siloserver.silo.network.IdentityTransitionBarrier
import org.siloserver.silo.repository.port.HomeCachePort
import org.siloserver.silo.repository.port.HomeCacheSnapshot
import org.siloserver.silo.repository.port.HomeCacheWriteLease
import kotlinx.serialization.json.Json

/**
Expand All @@ -19,15 +22,28 @@ import kotlinx.serialization.json.Json
class RoomHomeCacheRepository(
db: SiloDatabase,
private val snapshotProvider: suspend () -> AuthScopeSnapshot?,
private val identityTransitions: IdentityTransitionBarrier = DefaultIdentityTransitionBarrier(),
private val now: () -> Long = { System.currentTimeMillis() },
) : HomeCachePort {

private val dao = db.homeCacheDao()
private val json = Json { ignoreUnknownKeys = true }

override suspend fun cacheHome(sections: List<ResolvedSection>) {
cacheHome(
sections = sections,
lease = HomeCacheWriteLease(identityTransitions.generation.value),
)
}

override suspend fun cacheHome(
sections: List<ResolvedSection>,
lease: HomeCacheWriteLease,
) {
if (lease.identityGeneration != identityTransitions.generation.value) return
val snapshot = snapshotProvider() ?: return
val profileId = snapshot.profileId ?: return
if (lease.identityGeneration != identityTransitions.generation.value) return
val sectionsJson = json.encodeToString(sections)
// A Room row must fit SQLite's ~2MB CursorWindow or the *read* throws
// SQLiteBlobTooBigException. Large reorganized home layouts can exceed
Expand Down
Loading
Loading