[PC TV] Add per-screen source to episode action analytics#4625
Draft
kean wants to merge 1 commit into
Draft
Conversation
tvOS episode-action events (mark as played, archive, add to Up Next, reorder) reported source=unknown because tvOS has no AnalyticsSourceProvider to merge a source like iOS does. Thread a per-screen AnalyticsSource into EpisodeRowViewModel and the discovery menus, push it onto the shared analytics helper before each action, and add `home`/`search` source cases for the tvOS-only screens. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
kean
commented
Jun 26, 2026
| .setFocus(section: DiscoverType.video.rawValue) | ||
| .contextMenu { | ||
| DiscoveryEpisodeMenuButtons(podcastUuid: model.episode.podcastUuid ?? "", episodeUuid: model.episode.uuid ?? "", showNotesEpisode: $showNotesEpisode) | ||
| DiscoveryEpisodeMenuButtons(podcastUuid: model.episode.podcastUuid ?? "", episodeUuid: model.episode.uuid ?? "", source: AnalyticsSource(rawValue: source) ?? .unknown, showNotesEpisode: $showNotesEpisode) |
Contributor
Author
There was a problem hiding this comment.
@SergioEstevao , is that what you are thinking in terms of action sources? How does this PR look?
Contributor
There was a problem hiding this comment.
This is looking good! You can move it for review. Thanks for doing this!
Base automatically changed from
sergio/pc-tv/add_missing_analytics_events
to
trunk
June 28, 2026 21:46
Contributor
|
Version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #4614, addressing review feedback.
tvOS has no
AnalyticsSourceProvider, so episode-action events (mark as played, archive, add to Up Next, reorder) were going out assource: unknown. This declares anAnalyticsSourceper screen where the episode row is built and attaches it to the existing events:podcast_screen,up_next,starred,listening_history,filters, plus newhome/searchcases. No events are double-fired; play/pause are unchanged (they fire from the player assource: player).To test
AnalyticsLoggingAdapterconsole output while using the tvOS app.podcast_screen, Up Next →up_next, Starred →starred, History →listening_history, Filter →filters, Home →home, Search →search.source: player.Checklist
CHANGELOG.mdif necessary.