feat(dashboard): default the video library to newest first - #61
Merged
Conversation
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.
Single Commit Policy — COMPLIANTStatus: 1 commit | Valid format | No merge commits | Ready for merge Commit details
Automated validation — dopamine single-commit enforcement |
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.
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
Best firstis still there, one click away, and still ranks tier → quality → datebestbranch of the sort switch is untouchedtopLearningsby quality, which is deliberate and documented in that componentWhy five places
The default is coupled across five sites in
videos/+page.svelte, and changing only the first would have shipped two visible bugs:$stateinitial valuesp.get('sort') ?? …beston any navigation or reloadsort=bestin every shared linkhasFiltersindicatorTesting
npm --prefix web run check— 490 files, 0 errors, 0 warningsget(\sort`)??`date-desc`, with **0** remaining??`best`` fallbacks/videos→ 200, data regenerated at 478 videosnpm test— 476 tests across 55 files passBuilt SPA output under
dashboard/is committed, matching this repo's existing convention (those bundles are already biome-formatted inmain).