From 54dd95884b04ee5a1ffe4a40260e37784f023583 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Mon, 24 Aug 2026 21:24:30 +0200 Subject: fix(hub): show what's actually playing in the queue panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The panel's header said "Playing now" but only the panel itself was named that — the current track was just a highlighted row you had to spot in the list, easy to miss on a long queue and often scrolled out of view entirely on open. Now shows the track's own title/artist right under the header and scrolls the highlighted row into view when the panel opens. --- .../src/meshbay_hub/static/music-player.js | 24 ++++++++++++++++++++++ .../meshbay-hub/src/meshbay_hub/static/style.css | 11 ++++++++++ 2 files changed, 35 insertions(+) (limited to 'packages') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/music-player.js b/packages/meshbay-hub/src/meshbay_hub/static/music-player.js index b75d73c..7a3978c 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/music-player.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/music-player.js @@ -99,7 +99,22 @@ function saveRepeat(v) { // switching tabs or hunting for the album/folder it came from. Works the // same regardless of how the queue was built (an album, a consolidated // misc/loose bucket, a single standalone track). +// +// The header alone ("Playing now") named the *panel*, not the track — on a +// long queue the highlighted row can be scrolled out of view entirely, so +// opening this told you nothing you didn't already know. It now shows the +// current track's own title/artist right under the header, and scrolls the +// highlighted row into view on open rather than leaving it to be found. function QueuePanel({ tracks, order, pos, onSelect, onClose }) { + const activeRowRef = useRef(null); + useEffect(() => { + if (activeRowRef.current) { + activeRowRef.current.scrollIntoView({ block: 'center' }); + } + }, []); + + const current = tracks[order[pos]]; + return html`
{ if (e.target.classList.contains('video-overlay')) onClose(); @@ -110,10 +125,19 @@ function QueuePanel({ tracks, order, pos, onSelect, onClose }) {
+ ${current && html` +
+ + ${current.display_title || current.name} + ${current.artist && html` + — ${current.artist}`} +
+ `}
${order.map((idx, i) => html`