[TV] Stop seeding the default playlists on TV - #5665
Conversation
|
Claude finished @sztomek's task in 1m 57s —— View job PR Review: Stop seeding the default playlists on TVI reviewed the full diff against Verified
Minor observations (non-blocking)
Overall this looks correct and ready. The points above are optional polish. Nice work isolating the change so
|
Project manifest changes for appThe following changes in the --- ./build/reports/diff_manifest/app/release/base_manifest.txt 2026-07-28 15:38:36.048039377 +0000
+++ ./build/reports/diff_manifest/app/release/head_manifest.txt 2026-07-28 15:38:37.413163484 +0000
@@ -798,9 +798,6 @@
android:authorities="au.com.shiftyjelly.pocketcasts.androidx-startup"
android:exported="false" >
<meta-data
- android:name="au.com.shiftyjelly.pocketcasts.repositories.playlist.DefaultPlaylistsStartupInitializer"
- android:value="androidx.startup" />
- <meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-dataGo to https://buildkite.com/automattic/pocket-casts-android/builds/17894/canvas?sid=019fa95f-96fb-4f30-91d3-04bd2facc536, click on the |
Project manifest changes for wearThe following changes in the --- ./build/reports/diff_manifest/wear/release/base_manifest.txt 2026-07-28 15:38:44.303201474 +0000
+++ ./build/reports/diff_manifest/wear/release/head_manifest.txt 2026-07-28 15:38:45.508319731 +0000
@@ -177,9 +177,6 @@
android:authorities="au.com.shiftyjelly.pocketcasts.androidx-startup"
android:exported="false" >
<meta-data
- android:name="au.com.shiftyjelly.pocketcasts.repositories.playlist.DefaultPlaylistsStartupInitializer"
- android:value="androidx.startup" />
- <meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-dataGo to https://buildkite.com/automattic/pocket-casts-android/builds/17894/canvas?sid=019fa95f-96fb-4f30-91d3-04bd2facc536, click on the |
Project manifest changes for automotiveThe following changes in the --- ./build/reports/diff_manifest/automotive/release/base_manifest.txt 2026-07-28 15:38:51.209941039 +0000
+++ ./build/reports/diff_manifest/automotive/release/head_manifest.txt 2026-07-28 15:38:52.453246395 +0000
@@ -124,9 +124,6 @@
android:authorities="au.com.shiftyjelly.pocketcasts.androidx-startup"
android:exported="false" >
<meta-data
- android:name="au.com.shiftyjelly.pocketcasts.repositories.playlist.DefaultPlaylistsStartupInitializer"
- android:value="androidx.startup" />
- <meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-dataGo to https://buildkite.com/automattic/pocket-casts-android/builds/17894/canvas?sid=019fa95f-96fb-4f30-91d3-04bd2facc536, click on the |
|
Claude finished @sztomek's task in 1m 58s —— View job PR Review: Stop seeding the default playlists on TVI reviewed the full diff against Verified ✅
Minor observations (non-blocking) — posted as inline comments
Nits (optional)
Overall this is correct and ready — the points above are optional polish. Nice isolation work keeping
|
| } | ||
|
|
||
| private companion object { | ||
| const val CREATED_KEY = "createdDefaultPlaylists" |
There was a problem hiding this comment.
The test re-declares CREATED_KEY = "createdDefaultPlaylists" locally, duplicating the private const val CREATED_DEFAULT_PLAYLISTS_KEY in DefaultPlaylistsInitializerImpl. If the production key ever changes, settings.getBooleanForKey(...)/setBooleanForKey(...) in the impl would use the new key while these tests keep stubbing/verifying the old string — the tests would still pass and silently give false confidence. Consider making the source constant internal and referencing it here so the two can't drift.
| private fun setupApp() { | ||
| LogBuffer.i("Application", "App started. ${settings.getVersion()} (${settings.getVersionCode()})") | ||
|
|
||
| applicationScope.launch { defaultPlaylistsInitializer.initialize() } |
There was a problem hiding this comment.
Non-blocking, and not a regression (the old DefaultPlaylistsStartupInitializer used the same bare launch): initialize() does DB writes, and this bare applicationScope.launch { } has no try/catch. The scope uses SupervisorJob() (so siblings survive) but has no CoroutineExceptionHandler, so a throw here reaches the default uncaught-exception handler and can crash startup. Wear already wraps its call in runStartupStep("default playlists seeding") { … }. Since you're touching these call sites anyway, aligning phone + automotive with wear's wrapping would make failures contained/logged rather than fatal.
|
Claude finished @sztomek's task in 1m 1s —— View job PR Review: Stop seeding the default playlists on TVRe-reviewed the latest state (including Prior feedback — resolved ✅
Verified ✅
Nits (optional, non-blocking)
Overall: correct, well-isolated, and ready to merge. Nice work keeping
|
Description
Apple TV never seeds the default "New Releases" / "In Progress" playlists — its database only contains what sync brings down, so a signed-out session shows the Playlists empty state. On Android the shared
repositoriesmodule seeded them on every app's first launch via an androidx-startup initializer, andUserManager.signOutAndClearDatare-seeded them withforce = true, which made the TV empty state unreachable.This PR makes default-playlist seeding a per-platform decision:
DefaultPlaylistsInitializerbecomes an interface with the existing logic inDefaultPlaylistsInitializerImpland aNoOpDefaultPlaylistsInitializer. Each app binds it in its own DI module: phone/automotive/wear bind the real implementation, TV binds the no-op.UserManagerkeeps injecting the same type, so itsforce = truere-seed resolves to the no-op on TV with no diff inUserManager.initialize()explicitly fromApplication.onCreate, before its blocking startup work so the timing matches the old content-provider trigger. TV launches nothing.Phone, automotive, and wear behavior is unchanged: same seeding logic, same guard key, same scope/dispatcher, same sign-out re-seed.
Testing Instructions
Screenshots or Screencast
Not applicable — no UI changes.
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml