Skip to content

feat(dashboard): default the video library to newest first - #61

Merged
murdore merged 1 commit into
mainfrom
feat/videos-default-sort-newest
Aug 18, 2026
Merged

feat(dashboard): default the video library to newest first#61
murdore merged 1 commit into
mainfrom
feat/videos-default-sort-newest

Conversation

@murdore

@murdore murdore commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What

The video library (/videos) opened on Best first — tier → quality → date. The first screen was therefore dominated by high-scoring items from months earlier (2026-05, 2024-04, 2025-10), while videos saved in the last 48 hours sat well below the fold. For a feed of saved content the question on arrival is "what came in recently", and answering it meant changing the sort on every visit.

Default is now date-desc (Newest first).

What did not change

  • No sort option was added, removed, or relabelled — Best first is still there, one click away, and still ranks tier → quality → date
  • The best branch of the sort switch is untouched
  • Homepage ordering is untouched: it still leads with topLearnings by quality, which is deliberate and documented in that component

Why five places

The default is coupled across five sites in videos/+page.svelte, and changing only the first would have shipped two visible bugs:

Site Consequence if missed
$state initial value
URL fallback sp.get('sort') ?? … reverts to best on any navigation or reload
URL-omission check leaves a stale sort=best in every shared link
reset handler "Clear filters" restores the old default
hasFilters indicator Clear button permanently lit on a default view

Testing

  • npm --prefix web run check — 490 files, 0 errors, 0 warnings
  • Rebuilt bundle verified to carry the new default: get(\sort`)??`date-desc`, with **0** remaining ??`best`` fallbacks
  • Served live from the dashboard server: /videos → 200, data regenerated at 478 videos
  • npm test — 476 tests across 55 files pass

Built SPA output under dashboard/ is committed, matching this repo's existing convention (those bundles are already biome-formatted in main).

The library opened on 'Best first' (tier → quality → date), so the first screen
was dominated by high-scoring items from months earlier — 2026-05, 2024-04,
2025-10 — while videos saved in the last 48 hours sat far below the fold. For a
feed of saved content the question on arrival is "what came in recently", and
answering it required knowing to change the sort every visit.

Default is now 'date-desc'. Quality ranking is unchanged and one click away as
'Best first'; no sort option was added, removed, or reordered.

The default flows through five coupled places — initial state, the URL fallback,
the URL-omission check that keeps the default out of the querystring, the reset
handler, and the has-filters indicator that decides whether "Clear" lights up.
Changing only the first would have left a stale 'sort=best' in shared links and
a permanently-active filter badge.
@github-actions

Copy link
Copy Markdown

Single Commit Policy — COMPLIANT

Status: 1 commit | Valid format | No merge commits | Ready for merge

Commit details
  • Hash: 3fe09cb2d877e153d0ab691ac737968d29aee2b4
  • Message: feat(dashboard): default the video library to newest first
  • Author: Sachin Sharma

Automated validation — dopamine single-commit enforcement

@murdore
murdore merged commit 1421f30 into main Aug 18, 2026
12 checks passed
@murdore
murdore deleted the feat/videos-default-sort-newest branch August 18, 2026 19:13
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