- /liked: switch Laravel paginate(12) to cursorPaginate(24). Cursor
pagination matches the Phase 2 feed endpoint pattern: stable across
inserts (unlike ?page=N which can duplicate or skip rows when a new
like lands between page fetches) and loads a bounded slice no matter
how many thousands of likes the user accumulates.
- /history: switch from a get()-all plus in-memory sort to a joined
simplePaginate(48) at the DB layer. A heavy user who's watched
thousands of videos would previously fetch every video row into
memory on each history page load — now the query selects a bounded
page of (video_views + videos) pairs. Duplicates within a page
collapse via collect()->unique('id').
Channel videos tab stays non-paginated for now — it needs a dedicated
JSON endpoint before it can share the Phase 2 /videos/feed/more
infinite-scroll wiring. Flagged as follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>