From aaaaf56bd703cc324742bacce2c39e4fc0a72aea Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sun, 30 Aug 2026 09:31:45 -0400 Subject: [PATCH] fix(music): report the whole queue size, not the loaded page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the track lists page in, the panel's header and footer were counting only what had loaded so far — a platform with 321 tracks read "200 tracks" next to a sidebar saying 321. The panel now takes the queue's total and reports that. The running time stays hidden until every page is in, since only loaded tracks have durations; short queues that arrive in one page are unchanged. Co-Authored-By: Claude Opus 5 (1M context) --- .../src/v2/components/Soundtrack/Panel.vue | 22 ++++++++++++++----- frontend/src/v2/views/Jukebox/BrowseMode.vue | 1 + frontend/src/v2/views/Jukebox/SessionMode.vue | 1 + 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/frontend/src/v2/components/Soundtrack/Panel.vue b/frontend/src/v2/components/Soundtrack/Panel.vue index e5df9ae2c..2495f2def 100644 --- a/frontend/src/v2/components/Soundtrack/Panel.vue +++ b/frontend/src/v2/components/Soundtrack/Panel.vue @@ -50,6 +50,8 @@ const props = defineProps<{ loading?: boolean; /** True while the next page is in flight, for the list's footer spinner. */ loadingMore?: boolean; + /** Size of the whole queue when `tracks` is only the loaded window. */ + totalTracks?: number; startShuffled?: boolean; /** Cover shown when the active track has no art of its own. */ fallbackArtUrl?: string; @@ -222,6 +224,12 @@ const totalDurationSeconds = computed(() => ), ); +const trackCount = computed(() => props.totalTracks ?? tracks.value.length); + +// Only the loaded window has durations, so the running time is withheld until +// the whole queue is in rather than reported as a total it is not. +const isFullyLoaded = computed(() => trackCount.value === tracks.value.length); + // Reloading the queue whenever the input list changes keeps "next" pointing at // what the panel is showing, without the host having to drive the store. watch( @@ -347,9 +355,7 @@ function seekValueText(v: number): string { {{ isPlaying ? t("rom.now-playing") : t("rom.paused") }} - {{ - t("rom.tracks-n", tracks.length, { named: { n: tracks.length } }) - }} + {{ t("rom.tracks-n", trackCount, { named: { n: trackCount } }) }}

@@ -483,14 +489,20 @@ function seekValueText(v: number): string {