From a4b66954bd48f7a27894cf4703e68f6cdd25cddd Mon Sep 17 00:00:00 2001 From: cyph3rasi Date: Mon, 13 Jul 2026 03:20:52 -0700 Subject: [PATCH] Make shuffle reorder and restore the play queue, add off/all/one repeat playback, and remove Resonant Radio UI. Hop-State: A_06FNNZKG8MKNEJA6QXQ1ZER Hop-Proposal: R_06FNNZJMKS1Z9RBS9ADD3ER Hop-Task: T_06FNNXTJEGA5TEAZ2GA55X0 Hop-Attempt: AT_06FNNXTJEHPH9SQPGKC0P9G --- src/App.tsx | 18 ++-- src/hooks/usePlayer.test.ts | 63 ++++++++++++ src/hooks/usePlayer.ts | 191 +++++++++++++++++++++++++++++------- src/lib/playback.test.ts | 25 +++++ src/lib/playback.ts | 18 ++++ src/styles.css | 3 +- 6 files changed, 274 insertions(+), 44 deletions(-) create mode 100644 src/hooks/usePlayer.test.ts create mode 100644 src/lib/playback.test.ts create mode 100644 src/lib/playback.ts diff --git a/src/App.tsx b/src/App.tsx index 45ac2c2..c1b3e92 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -17,7 +17,8 @@ import { Play, Power, Plus, - Radio, + Repeat1, + Repeat2, Search, Server, Settings, @@ -54,8 +55,8 @@ function Cover({ album, size = "medium" }: { album: Pick void; active?: boolean; className?: string }) { - return ; +function IconButton({ label, children, onClick, active = false, pressed, className = "" }: { label: string; children: React.ReactNode; onClick?: () => void; active?: boolean; pressed?: boolean; className?: string }) { + return ; } const navItems: Array<{ view: View; label: string; icon: React.ReactNode }> = [ @@ -95,6 +96,11 @@ export default function App() { }); const player = usePlayer(libraryTracks); const hasLibraryTracks = libraryTracks.length > 0; + const repeatLabel = player.repeatMode === "off" + ? "Turn repeat all on" + : player.repeatMode === "all" + ? "Repeat all is on; turn repeat one on" + : "Repeat one is on; turn repeat off"; const visibleTracks = useMemo(() => { const needle = query.trim().toLowerCase(); @@ -326,8 +332,6 @@ export default function App() { {item.icon}{item.label} ))} -

Discover

- +
Picked from your library

Let it find you again.

{player.current.artist} has been in your rotation lately. Start here, then let the queue wander.