Repository navigation
Add overview and top list tabs to the data page - #7
Open
bluebird42 wants to merge 1 commit into
Open
bluebird42 wants to merge 1 commit into
bluebird42 wants to merge 1 commit into
Conversation
Reuse the settings tab bar on the data page. Overview keeps the existing statistics; the new top list ranks the space's videos by views this year, counted per video with the same one-second threshold as the overview. Deleted videos are left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
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.
The data page only showed space-wide totals, so there was no way to see which videos drive the views. The page now reuses the settings tab bar with two tabs:
/data) keeps the existing numbers, history and sources unchanged./data/top-list) ranks the space's 25 most viewed videos this year, with each row linking to the video.Views per video use the same definition as the overview: a session counts once it has watched at least one second. The new
Analytics.space_top_videos/2query groups by embed and session, andEmbeds.dashboard_videos_by_hash/2resolves names and dashboard ids within the current space only. Deleted videos keep their events, so the query fetches up to 50 rows and the page drops anything that no longer resolves before taking the top 25. The shared trial space returns an empty list, matchingspace_data/1. When a space cannot view statistics, the existing notice moves into the tab bar and both tabs show empty states.Both scoped (
/:space_id/data/top-list) and unscoped routes are added, andDashboardRoutes.data_top_list_path/2builds them.Overview tab:
Top list tab (synthetic data):
Validation:
mix compile --warnings-as-errors,mix format --check-formattedand Credo passed./v1/events.No migration is needed; the query reads the existing
eventstable.