From e2249154a59435265948889e2d6a7c475256c5e8 Mon Sep 17 00:00:00 2001 From: Blomios Date: Thu, 22 Oct 2026 22:43:29 +0200 Subject: [PATCH] feat(live): paginate catalog and search server-side (#49) Load Live channels from a filtered SQLite cursor API, keep navigation and guide consumers working across pages, and retain the QA reproduction coverage. Co-Authored-By: Claude Opus 4.8 --- public/css/main.css | 39 +- public/index.html | 3 +- public/js/api.js | 14 +- public/js/app.js | 1 + public/js/components/ChannelList.js | 556 ++++++++++---------- public/js/components/EpgGuide.js | 4 +- public/js/components/VideoPlayer.js | 26 +- public/js/pages/Guide.js | 71 ++- public/js/pages/HomePage.js | 114 ++-- server/db/sqlite.js | 3 + server/routes/channels.js | 14 + server/services/liveCatalog.js | 137 +++++ test/live-catalog-initial-load.test.js | 685 +++++++++++++++++++++++++ 13 files changed, 1280 insertions(+), 387 deletions(-) create mode 100644 server/services/liveCatalog.js create mode 100644 test/live-catalog-initial-load.test.js diff --git a/public/css/main.css b/public/css/main.css index c09a38c..16ade88 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -4819,4 +4819,41 @@ kbd { font-size: 0.7rem; max-width: 70px; } -} \ No newline at end of file +} +/* Keep Live catalogue controls reachable alongside the scrolling list. */ +.sidebar-header-row .search-wrapper { + min-width: 0; +} + +.live-catalog-status, +.live-catalog-more { + flex-shrink: 0; + margin: var(--space-sm); +} + +.live-catalog-status:empty { + display: none; +} + +.channel-sidebar.collapsed .live-catalog-status, +.channel-sidebar.collapsed .live-catalog-more { + display: none; +} + +.channel-tile-action { + min-height: 120px; + justify-content: center; + color: var(--color-text-primary); + background: var(--color-bg-tertiary); + border: 1px solid var(--color-border); + font: inherit; +} + +.channel-tile:focus-visible { + outline: 2px solid var(--color-primary); + outline-offset: 2px; +} + +.channel-tile-action[hidden] { + display: none; +} diff --git a/public/index.html b/public/index.html index 9105e16..4d1e12d 100644 --- a/public/index.html +++ b/public/index.html @@ -127,8 +127,9 @@