From e334cd51c2ce3ca5332105c5b9c8ae5d82b3f9e2 Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Tue, 28 Jul 2026 19:15:15 -0500 Subject: [PATCH] now playing: collapse to a rail, and rebuild the panel around the record The right-hand panel disappeared when you closed it. It collapses to a rail now, exactly as the left nav does -- same 0.28s curve, same crossfade clock for its contents -- so the record, its progress and its transfer stay on screen at 64px instead of sliding off. THE RAIL carries the album as a full-height bleed behind a real glass bar (the app's own recipe: rgba(20,20,24,.28), blur(12px) saturate(1.7), 46px), with the expand chevron in that bar, a left-edge progress line, the cover, an equaliser while playing, stacked icons badged with what is behind them -- tracks left, releases -- and the title set vertically. THE PANEL stops saying "Now playing", which was the only permanently visible line it had and told you nothing. It names what you are playing FROM, and carries the transfer as a hairline along the glass bar's bottom edge -- the same object in both states, so a download reads identically whether the panel is open or collapsed. The hairline fills linearly (it tracks progress rather than easing past it), sweeps indeterminately while there is no byte count to be honest about, and fades out when cached rather than sitting full forever. Hovering the header drops the whole detail: peer, transferred, rate, and saving what you are streaming. A library track has no peer, so none of it appears -- zeroes would read as a stalled transfer. Below the record, one long undifferentiated scroll becomes four shallow panes -- Queue, Lyrics, Artist, About -- behind a sticky segmented control. Sticky because keeping your scroll position across a switch is worthless if the control you just used has scrolled out of reach. Queue gains an up-next card, library ticks, and per-track Last.fm listeners past 396px; Artist has the artist as one full-width pill whose figures spread once there is room, the same branded social circles the artist page draws, releases with Show all, and fans-also-like; About carries the record's description and the album page's RELEASED block verbatim, so a record reads the same in both places. Lyrics is a placeholder -- there is no source in the app and pretending otherwise would be worse than saying so. The panel is drag-resizable from its left edge, 272-560, with a 10px magnet at the default and a width tag while dragging; the width is remembered, because one you set by hand and lost every launch is worse than not being able to set it. Five things this fixed on the way, four of them mine: - `playerArtSource` resolved a "better" cover by ARTIST + TITLE. A name cannot identify a record: every self-titled Weezer album is "Weezer", the resolver returned whichever one the provider answered with, and all of them played back showing the Green Album's art. The substitution is gone; the record's own asset is rewritten to its 1000x1000 variant instead -- a real quality win, no identity risk, and more than the panel needs even at its widest. Verified: Blue and Green now resolve to their own hashes. - The panel body was torn down 300ms after closing, an optimisation from when it slid off-screen. The rail shows that artwork, so it blanked the rail's cover and its bleed. - An inline --nowplaying-width would have outranked the collapse rule and made the panel un-collapsible; the dragged width goes through a --np-open-width indirection instead. - The segmented control was an opaque strip painted straight over the album bleed, reading as a grey band across the artwork. It is glass now. - The waveform was a picture of a scrubber with no way to seek, while the player bar carried the only one. It seeks now, on the same semantics (75ms throttle dragging, exact seek on release), and the second time reads remaining rather than total -- the total is already implied by the bar's length. `soulseek:stream` reports {received, total, done} and no rate, unlike the download path's speed_bps, so the speed behind the hairline is measured here: a rolling 1.5s window, because a per-event delta reads as a number flickering between 0 and several MB/s rather than a speed. There is deliberately no "queued at peer" state -- the streaming path reports no queue place, and the panel will not claim to know one. `discovery` keeps the artist page's socials rather than discarding them; they were already being fetched. 29 CSS rules for the removed sections are gone with them. Verified in the running app over CDP: collapse to exactly 64px and back, rail contents and bleed at blur(17px), all four panes, sticky segments, social chips carrying the artist page's own brand tints, the release grid going to three columns past 430px and the pill's stats spreading past 372px, and About reading "Released May 9, 1994 - 10 tracks - 41 min / DGC - Alternative Rock". 85 JS tests pass, production build clean with no unused selectors. The drag gesture itself is not CDP-drivable and wants a hands-on check. --- src/App.svelte | 14 +- src/components/NowPlaying.svelte | 1716 ++++++++++++++++++++++++------ src/lib/state.svelte.js | 124 ++- src/styles/global.css | 3 + 4 files changed, 1528 insertions(+), 329 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 08b4b2b..9df72e4 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -64,6 +64,7 @@ class:np-open={ui.nowPlaying} class:sidebar-collapsed={ui.sidebarCollapsed} class:preview-open={previewUi.open} + style="--np-open-width: {ui.nowPlayingWidth}px" > +{#snippet artistChip()} + +{/snippet} + +