Skip to content

Add watch time, completion and trends to the data top list - #10

Open
bluebird42 wants to merge 1 commit into
feat/data-engagement-breakdownsfrom
feat/data-top-list-engagement
Open

bluebird42 wants to merge 1 commit into
feat/data-engagement-breakdownsfrom
feat/data-top-list-engagement

Conversation

@bluebird42

@bluebird42 bluebird42 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

The top list only showed views for this year, so a video with many short views looked the same as one people watch to the end.

The top list now follows the period switch and shows, per video:

  • Views, watch time and average completion, each sortable (?sort=watch_time or ?sort=completion; views by default).
  • A small trend line of views per hour, day or month across the period.

The ranking query moves from Analytics.space_top_videos/2 (added in #7) to Analytics.Overview.top_videos/4, so the list uses the same definition of a view as the overview. Deleted videos are still left out.

Stacked on #9.

Top list for the last 30 days (synthetic data):

Top list with watch time, completion and trend

Validation:

  • Analytics.Overview tests cover ranking, watch time, completion, the per-period trend and leaving out views outside the period.
  • LiveView tests cover the ranking with a deleted video and sorting by watch time while keeping the period.
  • mix compile --warnings-as-errors, mix format --check-formatted, Credo and git diff --check passed.
  • Full Core suite: 1,200 of 1,204 passed; the four StoragePolicyTest failures also occur on main in my local setup.

No migration is needed.

The top list follows the selected period and shows watch time, average
completion and a views trend per video next to views. Views, watch time
and completion columns sort the list. The ranking query moves into
Analytics.Overview so it shares the overview's definition of a view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant