[TV] Playlist analytics - #5738
Conversation
|
@claude please review this |
|
Claude finished @sztomek's task in 3m 39s —— View job Review
Overall this looks solid and consistent with the Your Podcasts PR it stacks on — the 1. Smart playlists can get stuck showing archived episodes (behavioural, from commit 07d543e)
// TvPlaylistDetailsViewModel.kt:74
private val isShowingArchivedFlow = MutableStateFlow(preferences.isPlaylistShowingArchived(playlistUuid))and Suggested fix — ignore the pref for the type that can't express it: private val isShowingArchivedFlow = MutableStateFlow(
playlistType == Playlist.Type.Manual && preferences.isPlaylistShowingArchived(playlistUuid),
)2.
|
3061664 to
0fc0af0
Compare
77c6a7b to
0bbc85f
Compare
|
Claude finished @sztomek's task in 2m 55s —— View job Review
Note on this run: the trigger was a 1. Smart playlists can get permanently stuck showing archived episodes
|
0fc0af0 to
3018745
Compare
0bbc85f to
f82412c
Compare
|
Claude finished @sztomek's task in 2m 11s —— View job Review
Previous points — status✅ 1. Smart playlists stuck showing archived episodes — fixed// TvPlaylistDetailsViewModel.kt:74-76
private val isShowingArchivedFlow = MutableStateFlow(
playlistType == Playlist.Type.Manual && preferences.isPlaylistShowingArchived(playlistUuid),
)Correct: a previously-persisted ✅ 2.
|
Description
Third screen of the Android TV → Apple TV analytics parity program (EventHorizon only): the Playlists tab (list + detail). Stacked on the Your Podcasts analytics PR. Verified against the tvOS app across every tracking layer — all direct
Analytics.track, no hidden helper layer.filter_list_shownFilterListShownEventfilter_countfilter_create_button_tappedFilterCreateButtonTappedEventfilter_shownFilterShownEventfilter_typefilter_show_archived_tapped/filter_hide_archived_tappedfilter_play_all_tappedFilterPlayAllTappedEventfilter_typefilter_play_all_replace_and_play_tappedFilterPlayAllReplaceAndPlayTappedEventfilter_type, save_up_nextfilter_play_all_dismissedFilterPlayAllDismissedEventfilter_typefilter_type=manual/smart, derived fromPlaylist.Type.analyticsValue(→PlaylistType), matching iOS'sisManual ? "manual" : "smart".Archive toggle is manual-only for analytics, matching iOS (
PlaylistDetailView.swift:225gates the archive menu behindif model.isManual) — sofilter_show/hide_archived_tappedfires only for manual playlists.Archive toggle is now manual-only in the UI too. A review surfaced that the Android TV archive-filter toggle was shown for smart playlists as well, whereas Apple TV only shows it for manual (
PlaylistDetailView.swift:225). A second commit hides the toggle for smart playlists (with the Play-All left-focus preserved on the sort button), closing both the analytics and the feature gap.Faithful to tvOS: show-vs-hide-archived is chosen by the new value;
filter_play_all_tappedonly fires when there are episodes (mirrors iOS'sguard !episodes.isEmpty); the replace/dismiss events carry the samesave_up_next/filter_typepayloads. All wired into the existing VM methods (toggleArchiveFilter,playAll,replaceUpNextAndPlay) plusCallOnceforfilter_shownand a dismiss hook on the confirmation modal.Testing Instructions
./gradlew :tv:installDebug; open the Playlists tab → confirm onefilter_list_shownwithfilter_countinadb logcat.filter_create_button_tapped(+ the download-app modal).filter_shownwithfilter_type. Toggle the archived filter →filter_show_archived_tapped/filter_hide_archived_tapped.filter_play_all_tapped; if it prompts to replace Up Next: save →filter_play_all_replace_and_play_tapped save_up_next=true; without saving →save_up_next=false; cancel →filter_play_all_dismissed.Screenshots or Screencast
Checklist
./gradlew spotlessApply)