From 3815e4a0baeeebb0e349f79515582cfd05f9ca77 Mon Sep 17 00:00:00 2001 From: Stephan Terning Date: Sun, 8 Nov 2026 11:26:58 +0100 Subject: [PATCH 1/5] Add seekable progress bars to demo and release mini players --- app/components/release-player.tsx | 22 ++++++++++-- app/components/release-seek.tsx | 9 ++++- app/components/workspace-player.tsx | 20 +++++++++++ app/style.css | 54 +++++++++++++++++++++++++++-- docs/wavecase-specification.md | 2 +- 5 files changed, 100 insertions(+), 7 deletions(-) diff --git a/app/components/release-player.tsx b/app/components/release-player.tsx index 24dcdfb..59eb527 100644 --- a/app/components/release-player.tsx +++ b/app/components/release-player.tsx @@ -12,6 +12,7 @@ import { useMediaSession } from "./media-session"; import { setRepeatPreference, useRepeatPreference } from "./repeat-preference"; import { BufferedAudio } from "./buffered-audio"; import { MiniPlayer } from "./mini-player"; +import { ReleaseSeek } from "./release-seek"; import { useSpaceToggle } from "./use-space-toggle"; const PlaybackContext = createContext(null); @@ -39,8 +40,17 @@ export function ReleasePlayerProvider({ children }: { children: ReactNode }) { } function ReleasePlayer() { - const { playback, queue, index, status, error, seeking, media } = - useReleasePlayer(); + const { + playback, + queue, + index, + status, + error, + seeking, + media, + position, + duration, + } = useReleasePlayer(); const repeat = useRepeatPreference(); useEffect(() => { playback.setRepeat(repeat); @@ -92,6 +102,14 @@ function ReleasePlayer() { repeating={repeat} onRepeat={setRepeatPreference} > + {track && ( + + )} {track && ( <> {status === "loading" && Loading audio…} diff --git a/app/components/release-seek.tsx b/app/components/release-seek.tsx index 2f74b6e..f4caeb8 100644 --- a/app/components/release-seek.tsx +++ b/app/components/release-seek.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState, type CSSProperties } from "react"; import { formatClock } from "../domain/format"; export function ReleaseSeek({ @@ -45,11 +45,18 @@ export function ReleaseSeek({ { const next = event.currentTarget.valueAsNumber; if (event.nativeEvent.type === "input") { diff --git a/app/components/workspace-player.tsx b/app/components/workspace-player.tsx index f056834..55df863 100644 --- a/app/components/workspace-player.tsx +++ b/app/components/workspace-player.tsx @@ -13,6 +13,7 @@ import { type DemoPlayback } from "./demo-playback"; import { useMediaSession } from "./media-session"; import { setRepeatPreference, useRepeatPreference } from "./repeat-preference"; import { MiniPlayer } from "./mini-player"; +import { ReleaseSeek } from "./release-seek"; import { useSpaceToggle } from "./use-space-toggle"; const WorkspaceAudio = createContext(null); @@ -59,6 +60,16 @@ function WorkspacePlayer({ playback.getSnapshot, ); const repeat = useRepeatPreference(); + const [position, setPosition] = useState(0); + useEffect(() => { + const remember = () => setPosition(media?.currentTime ?? 0); + const events = ["timeupdate", "seeked", "wavecase-user-seeked"]; + remember(); + for (const event of events) media?.addEventListener(event, remember); + return () => { + for (const event of events) media?.removeEventListener(event, remember); + }; + }, [media]); useEffect(() => { playback.setRepeat(repeat); }, [playback, repeat]); @@ -74,6 +85,7 @@ function WorkspacePlayer({ return !!state.source || state.loading; }, toggle, + slider: true, }); useMediaSession( media, @@ -114,6 +126,14 @@ function WorkspacePlayer({ repeating={repeat} onRepeat={setRepeatPreference} > + {source && ( + playback.seek(source.versionId, next)} + /> + )} {loading && Loading audio…} {error && (

diff --git a/app/style.css b/app/style.css index 8b06405..7e3b438 100644 --- a/app/style.css +++ b/app/style.css @@ -537,10 +537,10 @@ button:hover:not(:disabled), /* Released music has its own artwork-led public presentation. */ :root:has(.release-mini) { - scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom)); + scroll-padding-bottom: calc(190px + env(safe-area-inset-bottom)); } body:has(.release-mini) { - padding-bottom: calc(150px + env(safe-area-inset-bottom)); + padding-bottom: calc(190px + env(safe-area-inset-bottom)); } .release-mini { position: fixed; @@ -593,6 +593,17 @@ body:has(.release-mini) { flex-basis: 100%; margin: 0; } +.release-mini .release-seek { + flex-basis: 100%; + display: flex; + align-items: center; + margin: 0; + white-space: nowrap; +} +.release-mini .release-seek input { + flex: 1; + min-width: 0; +} .release-public { max-width: 1120px; margin: 4vh auto; @@ -661,11 +672,48 @@ body:has(.release-mini) { font-size: var(--text-sm); } .release-seek input[type="range"] { - /* Text-field padding offsets the native thumb from the progress track. */ + appearance: none; + accent-color: var(--color-accent); padding: 0; border: 0; background: transparent; min-height: 44px; + cursor: pointer; +} +.release-seek input::-webkit-slider-runnable-track { + height: 6px; + border-radius: 3px; + background: linear-gradient( + to right, + var(--color-accent) var(--seek-progress), + var(--color-border-control) var(--seek-progress) + ); +} +.release-seek input::-webkit-slider-thumb { + appearance: none; + width: 16px; + height: 16px; + margin-top: -5px; + border: 0; + border-radius: 50%; + background: var(--color-accent); +} +.release-seek input::-moz-range-track { + height: 6px; + border-radius: 3px; + background: var(--color-border-control); +} +.release-seek input::-moz-range-progress { + height: 6px; + border-radius: 3px; + background: var(--color-accent); +} +.release-seek input::-moz-range-thumb { + width: 16px; + height: 16px; + border: 0; + border-radius: 50%; + background: var(--color-accent); } .service-links { display: grid; diff --git a/docs/wavecase-specification.md b/docs/wavecase-specification.md index 352b5f8..8398db2 100644 --- a/docs/wavecase-specification.md +++ b/docs/wavecase-specification.md @@ -118,7 +118,7 @@ The listening session also shares a 96 MB (96,000,000 byte) in-memory LRU of alr Ready seeks and playing demo version changes crossfade for at most 5 ms. A seek outside the prepared window briefly stops outgoing audio while fetching the target. During version preparation, keep the old version audible at its advancing position; failed preparation leaves it available for retry. Paused changes stay paused, and feedback timestamps override position preservation. Keep the current and most recently played demo version; the latter follows the current position with a shorter prepared window, including on mobile networks. Active playback has priority, and speculative transfers stop when its buffer runs low or playback pauses. The first switch to another version can require a short fetch; returning to a prepared version reuses its samples. Leaving the private workspace or learned revocation discards these caches. Audio ownership remains independent of waveform rendering. -The private workspace retains one active demo player across library, demo details, activity and other management pages. Opening another demo does not interrupt or replace the active track; pressing Play on it starts that track. Returning to the active demo reuses its version, position and prepared audio unless a version is explicitly requested. A bottom player shows the audible title and version, links back to that version, and offers play/pause and repeat. Space controls the active workspace player; editable fields and dialogs retain their keyboard behavior. Leaving the workspace, logout or account change stops playback. Listener share pages keep their own page-scoped player. +The private workspace retains one active demo player across library, demo details, activity and other management pages. Opening another demo does not interrupt or replace the active track; pressing Play on it starts that track. Returning to the active demo reuses its version, position and prepared audio unless a version is explicitly requested. A bottom player shows the audible title and version, links back to that version, and offers play/pause, repeat, elapsed/total time and a draggable position slider. Demo and release mini players share the release-page slider behavior, with mint progress and handles matching the site palette. Space controls the active workspace player, including with its position slider focused; editable fields and dialogs retain their keyboard behavior. Leaving the workspace, logout or account change stops playback. Listener share pages keep their own page-scoped player. Library rows have a separate play/pause button at the far left. Play chooses the newest ready version with available playback audio, matching an ordinary first visit to the demo; newer processing/failed/missing versions do not replace it. Tracks without playable audio have a disabled control. Playback buttons do not navigate, while the rest of the row opens the demo. No automatic demo queue is created, and owner playback creates no listener analytics. From ae538b997e2e87c090ce62a394cb8b8a4f86bbc9 Mon Sep 17 00:00:00 2001 From: Stephan Terning Date: Sun, 8 Nov 2026 11:52:36 +0100 Subject: [PATCH 2/5] Keep mini-player seeking inline with existing controls --- app/components/mini-player.tsx | 3 +++ app/components/release-player.tsx | 18 ++++++++++-------- app/components/workspace-player.tsx | 18 ++++++++++-------- app/style.css | 13 ++++++++++--- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/app/components/mini-player.tsx b/app/components/mini-player.tsx index 55963dd..28d1577 100644 --- a/app/components/mini-player.tsx +++ b/app/components/mini-player.tsx @@ -12,6 +12,7 @@ export function MiniPlayer({ repeatLabel, repeating, onRepeat, + seek, children, }: { label: string; @@ -30,6 +31,7 @@ export function MiniPlayer({ repeatLabel: string; repeating: boolean; onRepeat: (repeat: boolean) => void; + seek?: ReactNode; children?: ReactNode; }) { return ( @@ -56,6 +58,7 @@ export function MiniPlayer({ )} + {seek} {controls && ( <> + ) + } > - {track && ( - - )} {track && ( <> {status === "loading" && Loading audio…} diff --git a/app/components/workspace-player.tsx b/app/components/workspace-player.tsx index 55df863..ef2fb88 100644 --- a/app/components/workspace-player.tsx +++ b/app/components/workspace-player.tsx @@ -125,15 +125,17 @@ function WorkspacePlayer({ repeatLabel="Repeat demo" repeating={repeat} onRepeat={setRepeatPreference} + seek={ + source && ( + playback.seek(source.versionId, next)} + /> + ) + } > - {source && ( - playback.seek(source.versionId, next)} - /> - )} {loading && Loading audio…} {error && (

diff --git a/app/style.css b/app/style.css index 7e3b438..31f822c 100644 --- a/app/style.css +++ b/app/style.css @@ -537,10 +537,10 @@ button:hover:not(:disabled), /* Released music has its own artwork-led public presentation. */ :root:has(.release-mini) { - scroll-padding-bottom: calc(190px + env(safe-area-inset-bottom)); + scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom)); } body:has(.release-mini) { - padding-bottom: calc(190px + env(safe-area-inset-bottom)); + padding-bottom: calc(150px + env(safe-area-inset-bottom)); } .release-mini { position: fixed; @@ -594,7 +594,8 @@ body:has(.release-mini) { margin: 0; } .release-mini .release-seek { - flex-basis: 100%; + flex: 2; + min-width: 0; display: flex; align-items: center; margin: 0; @@ -604,6 +605,12 @@ body:has(.release-mini) { flex: 1; min-width: 0; } +@media (max-width: 600px) { + .release-mini .release-seek { + order: 1; + flex-basis: 100%; + } +} .release-public { max-width: 1120px; margin: 4vh auto; From 5937e49d6d25fb59e124d6b5cdceb8523932b438 Mon Sep 17 00:00:00 2001 From: Stephan Terning Date: Sun, 8 Nov 2026 12:32:41 +0100 Subject: [PATCH 3/5] Let mini-player progress fill the remaining row width --- app/style.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/style.css b/app/style.css index 31f822c..2dfac85 100644 --- a/app/style.css +++ b/app/style.css @@ -567,7 +567,8 @@ body:has(.release-mini) { object-fit: cover; } .release-mini-description { - flex: 1; + flex: 0 1 auto; + max-width: 30%; min-width: 0; } .release-mini-description a, @@ -594,7 +595,7 @@ body:has(.release-mini) { margin: 0; } .release-mini .release-seek { - flex: 2; + flex: 1; min-width: 0; display: flex; align-items: center; @@ -606,6 +607,10 @@ body:has(.release-mini) { min-width: 0; } @media (max-width: 600px) { + .release-mini-description { + flex: 1; + max-width: none; + } .release-mini .release-seek { order: 1; flex-basis: 100%; From 2e735c8b46a07bc3686b35c23582b803658858be Mon Sep 17 00:00:00 2001 From: Stephan Terning Date: Sun, 8 Nov 2026 13:19:43 +0100 Subject: [PATCH 4/5] Place mini-player play and pause controls over artwork --- app/components/mini-player.tsx | 66 +++++++++++++---------------- app/components/release-player.tsx | 1 - app/components/workspace-player.tsx | 1 - app/style.css | 26 +++++++++++- docs/wavecase-specification.md | 4 +- 5 files changed, 55 insertions(+), 43 deletions(-) diff --git a/app/components/mini-player.tsx b/app/components/mini-player.tsx index 28d1577..033e71a 100644 --- a/app/components/mini-player.tsx +++ b/app/components/mini-player.tsx @@ -21,8 +21,6 @@ export function MiniPlayer({ title: string; details: string; href: string; - /** Names the page the artwork link opens. */ - page: string; artwork?: string; }; controls?: boolean; @@ -39,45 +37,39 @@ export function MiniPlayer({ className={className ? `release-mini ${className}` : "release-mini"} aria-label={label} > + {(controls || track?.artwork) && ( +

+ {track?.artwork && ( + + )} + {controls && ( + + )} +
+ )} {track && ( - <> - - {track.artwork ? ( - - ) : ( - - )} - -
- {track.title} - {track.details} -
- +
+ {track.title} + {track.details} +
)} {seek} {controls && ( - <> - - onRepeat(!repeating)} - /> - + onRepeat(!repeating)} + /> )} {children} diff --git a/app/components/release-player.tsx b/app/components/release-player.tsx index cd4315c..3e88741 100644 --- a/app/components/release-player.tsx +++ b/app/components/release-player.tsx @@ -91,7 +91,6 @@ function ReleasePlayer() { title: track.title, details: track.artist, href: queue.url, - page: queue.title, artwork: queue.artwork?.src, } : undefined diff --git a/app/components/workspace-player.tsx b/app/components/workspace-player.tsx index ef2fb88..2a5fe3c 100644 --- a/app/components/workspace-player.tsx +++ b/app/components/workspace-player.tsx @@ -114,7 +114,6 @@ function WorkspacePlayer({ .filter(Boolean) .join(" · "), href, - page: source.title, artwork: source.artwork, } : undefined diff --git a/app/style.css b/app/style.css index 2dfac85..191491d 100644 --- a/app/style.css +++ b/app/style.css @@ -558,14 +558,36 @@ body:has(.release-mini) { border-top: 1px solid var(--color-border-control); box-shadow: 0 -8px 30px #0005; } -.release-mini-artwork { +.release-mini-transport { + position: relative; flex: 0 0 52px; height: 52px; } -.release-mini-artwork img { +.release-mini-transport img { + display: block; border-radius: 6px; object-fit: cover; } +.release-mini-transport:has(img) .play-toggle { + position: absolute; + inset: 0; + padding: 0; + border: 0; + border-radius: 6px; + background: transparent; +} +.release-mini-transport:has(img) .play-toggle svg { + box-sizing: content-box; + padding: 6px; + border: 1px solid var(--color-accent); + border-radius: 50%; + background: #090b0ae6; + box-shadow: 0 1px 6px #0008; +} +.release-mini-transport:has(img) .play-toggle:hover svg { + background: var(--color-surface); + border-color: var(--color-accent-strong); +} .release-mini-description { flex: 0 1 auto; max-width: 30%; diff --git a/docs/wavecase-specification.md b/docs/wavecase-specification.md index 8398db2..10cd9ed 100644 --- a/docs/wavecase-specification.md +++ b/docs/wavecase-specification.md @@ -118,7 +118,7 @@ The listening session also shares a 96 MB (96,000,000 byte) in-memory LRU of alr Ready seeks and playing demo version changes crossfade for at most 5 ms. A seek outside the prepared window briefly stops outgoing audio while fetching the target. During version preparation, keep the old version audible at its advancing position; failed preparation leaves it available for retry. Paused changes stay paused, and feedback timestamps override position preservation. Keep the current and most recently played demo version; the latter follows the current position with a shorter prepared window, including on mobile networks. Active playback has priority, and speculative transfers stop when its buffer runs low or playback pauses. The first switch to another version can require a short fetch; returning to a prepared version reuses its samples. Leaving the private workspace or learned revocation discards these caches. Audio ownership remains independent of waveform rendering. -The private workspace retains one active demo player across library, demo details, activity and other management pages. Opening another demo does not interrupt or replace the active track; pressing Play on it starts that track. Returning to the active demo reuses its version, position and prepared audio unless a version is explicitly requested. A bottom player shows the audible title and version, links back to that version, and offers play/pause, repeat, elapsed/total time and a draggable position slider. Demo and release mini players share the release-page slider behavior, with mint progress and handles matching the site palette. Space controls the active workspace player, including with its position slider focused; editable fields and dialogs retain their keyboard behavior. Leaving the workspace, logout or account change stops playback. Listener share pages keep their own page-scoped player. +The private workspace retains one active demo player across library, demo details, activity and other management pages. Opening another demo does not interrupt or replace the active track; pressing Play on it starts that track. Returning to the active demo reuses its version, position and prepared audio unless a version is explicitly requested. A bottom player shows the audible title and version, links back to that version, and offers play/pause, repeat, elapsed/total time and a draggable position slider. Demo and release mini players share the release-page slider behavior, with mint progress and handles matching the site palette. Play/pause sits over available artwork as an always-visible mint icon on a dark circular backing, with a full-cover hit area and a visible keyboard focus outline. Without artwork, show the ordinary play/pause button in its place. The title remains the navigation link. Space controls the active workspace player, including with its position slider focused; editable fields and dialogs retain their keyboard behavior. Leaving the workspace, logout or account change stops playback. Listener share pages keep their own page-scoped player. Library rows have a separate play/pause button at the far left. Play chooses the newest ready version with available playback audio, matching an ordinary first visit to the demo; newer processing/failed/missing versions do not replace it. Tracks without playable audio have a disabled control. Playback buttons do not navigate, while the rest of the row opens the demo. No automatic demo queue is created, and owner playback creates no listener analytics. @@ -191,7 +191,7 @@ Release, artist, and songwriter routes share one React Router layout and one pla - Track controls and the mini player share state. Pause/resume retains position/queue. Advance automatically; after the final track ends retain its metadata, then Play restarts the original queue from the first selected track. A playback error stops instead of silently skipping. - Dragging the public release position slider previews the target without seeking or fetching intermediate positions. Release commits one seek; canceling discards the preview. Click/tap commits on release, while keyboard and assistive changes retain immediate seeking. Ongoing playback and its normal buffering continue during the drag. - The mini player's Repeat track control loops the current track instead of advancing. Turning it off restores normal queue progression at the end of the track. Loops count as new plays; user seeks and pause/resume do not. -- After music is selected, the mini player appears across public music pages. Artwork/title link to the queued release; artist is plain text, using track artist then release artist fallback. Media Session uses that artist and release title as album; release artwork is a fitted/padded 512 × 512 JPEG derived from the current authorized cover. +- After music is selected, the mini player appears across public music pages. The title links to the queued release; artwork carries the shared play/pause control; artist is plain text, using track artist then release artist fallback. Media Session uses that artist and release title as album; release artwork is a fitted/padded 512 × 512 JPEG derived from the current authorized cover. - With music loaded, Space toggles the shared player even with another button or the position slider focused. Holding it toggles once without scrolling. Editing, other form inputs, selects, dialogs, composition, modifiers, and Enter retain native behavior; an empty player preserves normal Space behavior. - Leaving for management, accounts, library, or demos disposes playback and its media session. A full reload starts empty. Newly learned unavailability stops affected playback; server authorization always applies. Future public music views join this layout without moving management/demo routes into it. From 5e581cd2f5f6ad40c3e66e99267f0486586ae4c1 Mon Sep 17 00:00:00 2001 From: Stephan Terning Date: Sun, 8 Nov 2026 13:31:31 +0100 Subject: [PATCH 5/5] Keep playback position sliders fixed as the clock updates --- app/components/release-seek.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/components/release-seek.tsx b/app/components/release-seek.tsx index f4caeb8..fa88000 100644 --- a/app/components/release-seek.tsx +++ b/app/components/release-seek.tsx @@ -13,6 +13,8 @@ export function ReleaseSeek({ const [preview, setPreview] = useState(null); const input = useRef(null); const pending = useRef(null); + const elapsedTime = formatClock(preview ?? position); + const totalTime = formatClock(duration); function cancel() { pending.current = null; setPreview(null); @@ -41,11 +43,16 @@ export function ReleaseSeek({ }, [onSeek]); return (