From 38dc9b80e20d22da3e08defbfb85abb373db7b57 Mon Sep 17 00:00:00 2001 From: cyph3rasi Date: Mon, 13 Jul 2026 06:40:05 -0700 Subject: [PATCH] Label track search results as Songs, remove the home-only search eyebrow, and keep Heavy rotation exclusive to the unfiltered home view. Hop-State: A_06FNQD6K116P1K9BB54GZAG Hop-Proposal: R_06FNQD5C2X5HW2388XX74QR Hop-Task: T_06FNQCQPFA437RBCP725WJG Hop-Attempt: AT_06FNQCQPFBGSEHJ0RNKFMP0 --- src/App.test.tsx | 10 ++++++++++ src/App.tsx | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/App.test.tsx b/src/App.test.tsx index 64bf949..229ac94 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -98,6 +98,16 @@ describe("App bootstrap", () => { expect(screen.queryByRole("button", { name: "Profile" })).toBeNull(); }); + it("labels track search results as Songs instead of Heavy rotation", async () => { + await renderDemoApp(); + + fireEvent.change(screen.getByPlaceholderText("Search your library"), { target: { value: "Violet" } }); + + const songsHeading = screen.getByRole("heading", { level: 2, name: "Songs" }); + expect(songsHeading.closest(".track-section")?.querySelector(".eyebrow")).toBeNull(); + expect(screen.queryByRole("heading", { level: 2, name: "Heavy rotation" })).toBeNull(); + }); + it("defaults Albums and Songs to A–Z and remembers reordered views", async () => { await renderDemoApp(); diff --git a/src/App.tsx b/src/App.tsx index a5af68e..7037f0d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -670,7 +670,7 @@ export default function App() { } {view !== "albums" &&
-
{view === "favorites" ? "Kept close" : view === "songs" ? "Every track" : query ? "Matching your search" : "Most played by listen count"}

{view === "favorites" ? "Favorite tracks" : view === "songs" ? "Songs" : "Heavy rotation"}

{view === "home" && !query ? hasHeavyRotation ? "By play count" : "Still learning" : `${visibleTracks.length} tracks`}{view === "songs" && }
+
{!(view === "home" && query) && {view === "favorites" ? "Kept close" : view === "songs" ? "Every track" : "Most played by listen count"}}

{view === "favorites" ? "Favorite tracks" : view === "songs" || query ? "Songs" : "Heavy rotation"}

{view === "home" && !query ? hasHeavyRotation ? "By play count" : "Still learning" : `${visibleTracks.length} tracks`}{view === "songs" && }
{view === "home" && !query && !hasHeavyRotation ?

Heavy rotation is still taking shape

Finish a few songs more than once and your most-played tracks will appear here.

: view === "favorites" && visibleTracks.length === 0 ?

No favorite tracks yet

Use the heart beside a song to keep it here.

:
{displayedTracks.map((track, index) => { const justQueued = queuedTrackIds.has(track.id); const favoritePending = favoritePendingIds.has(track.id); return
{track.album} void toggleFavorite(track)}>{formatTime(track.duration)} addTrackToQueue(track)}>{justQueued ? : }
; })}
} {queueAnnouncement.message}
}