Commit 26606975 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Update Roadmap: ID3 streaming fix and Settings toggle fix

Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 2db3c721
...@@ -101,6 +101,7 @@ const BACKEND_DONE: DoneGroup[] = [ ...@@ -101,6 +101,7 @@ const BACKEND_DONE: DoneGroup[] = [
'Search the shared library (2026-09-06): POST /library/shared/search matches title/artist/genre the same way the existing owner-scoped search does, but across every user\'s library - the collective pool already described for Discovery\'s "someone else already has this" hand-off, just reached by typing a search instead of a mic listen. Deduped by (title, artist) so a song several users have separately uploaded doesn\'t show up once per owner, and excludes anything matching a song the searcher already has (by that same identity, not just their own literal row) - the point is surfacing music that\'s new to them. Song-level only, no album groupings: merging albums across different owners (whose coverart wins, mismatched track subsets) needs a real Album entity this app doesn\'t have, so that was deliberately left out rather than half-solved. POST /library/shared/claim turns a result into an actual playable copy - give_from_shared_library (the exact mechanism behind Discovery\'s own hand-off) moved out of discovery.py into a shared services module so both routers call the same code instead of one importing the other\'s private function; picked up a drive-by fix while it moved (track_number wasn\'t being copied, so a claimed song lost its real album order).', 'Search the shared library (2026-09-06): POST /library/shared/search matches title/artist/genre the same way the existing owner-scoped search does, but across every user\'s library - the collective pool already described for Discovery\'s "someone else already has this" hand-off, just reached by typing a search instead of a mic listen. Deduped by (title, artist) so a song several users have separately uploaded doesn\'t show up once per owner, and excludes anything matching a song the searcher already has (by that same identity, not just their own literal row) - the point is surfacing music that\'s new to them. Song-level only, no album groupings: merging albums across different owners (whose coverart wins, mismatched track subsets) needs a real Album entity this app doesn\'t have, so that was deliberately left out rather than half-solved. POST /library/shared/claim turns a result into an actual playable copy - give_from_shared_library (the exact mechanism behind Discovery\'s own hand-off) moved out of discovery.py into a shared services module so both routers call the same code instead of one importing the other\'s private function; picked up a drive-by fix while it moved (track_number wasn\'t being copied, so a claimed song lost its real album order).',
'Favorites / Liked Songs (2026-10-06): PUT/DELETE /library/{id}/favorite add or remove a song from the caller\'s own auto-created "Liked Songs" playlist - a Playlist row flagged structurally via a new is_liked_playlist column, not matched by name (a user could rename or duplicate a playlist called that), lazily created on first favorite rather than on every read. is_liked is a computed field (not a stored column) added to every endpoint that returns the caller\'s own songs; GET /playlists sorts the liked playlist first, and it\'s the one playlist that can\'t be deleted.', 'Favorites / Liked Songs (2026-10-06): PUT/DELETE /library/{id}/favorite add or remove a song from the caller\'s own auto-created "Liked Songs" playlist - a Playlist row flagged structurally via a new is_liked_playlist column, not matched by name (a user could rename or duplicate a playlist called that), lazily created on first favorite rather than on every read. is_liked is a computed field (not a stored column) added to every endpoint that returns the caller\'s own songs; GET /playlists sorts the liked playlist first, and it\'s the one playlist that can\'t be deleted.',
'Better search, deliberately rules-based rather than an LLM call (2026-10-06, explicit product direction - search predates AI, so it should work the way search used to): album added to the existing title/artist/genre match; a curated mood/vibe-to-genre synonym table (e.g. "party" -> Dance/Pop/Hip Hop/EDM) and a "new"/"latest" recency modifier that orders by added_at instead of being searched as literal text; a difflib.SequenceMatcher typo-tolerance fallback (classic edit-distance spell-correction, not ML) that only runs when the literal+mood pipeline returns nothing, so a normal search pays no extra cost. Zero new dependencies, zero model calls.', 'Better search, deliberately rules-based rather than an LLM call (2026-10-06, explicit product direction - search predates AI, so it should work the way search used to): album added to the existing title/artist/genre match; a curated mood/vibe-to-genre synonym table (e.g. "party" -> Dance/Pop/Hip Hop/EDM) and a "new"/"latest" recency modifier that orders by added_at instead of being searched as literal text; a difflib.SequenceMatcher typo-tolerance fallback (classic edit-distance spell-correction, not ML) that only runs when the literal+mood pipeline returns nothing, so a normal search pays no extra cost. Zero new dependencies, zero model calls.',
'Streamed audio now skips embedded ID3v2 cover art (2026-10-07): uploaded mp3s carry an ID3v2 tag that\'s almost entirely embedded artwork - tens to hundreds of KB a player had to get through before reaching the first real audio frame, even though the player already gets artwork from the separate coverart field and never touches the embedded copy. Reported as "still slow to start" after the earlier direct-streaming fix below confirmed the transport itself was fast. New shared stream_audio_file() helper (src/services/media_stream.py) computes the tag\'s byte offset and serves everything after it as the logical resource - Range math included, so seeking is unaffected - and replaced plain FileResponse on all 5 playback-stream endpoints (library, soundmarks, posts, live-location, rooms). Also added a year-long Cache-Control, since every file lives at a unique generated path and is never rewritten after upload.',
], ],
}, },
{ {
...@@ -171,6 +172,7 @@ const FRONTEND_DONE: DoneGroup[] = [ ...@@ -171,6 +172,7 @@ const FRONTEND_DONE: DoneGroup[] = [
'Second full visual redesign (2026-10-07): swapped onto a real shadcn/ui preset (style "maia", blue theme, DM Sans body / Outfit headings, large radius, Base UI primitives - `npx shadcn init --preset b311momZs0`) rather than the cobalt/Space-Grotesk system from 2026-08-23 below, after that one wasn\'t landing well. Done as a token bridge, not a per-component rewrite: every one of the ~40 existing Material-3-style token names (bg-surface-container-low, text-on-primary, etc.) stayed exactly as-is in every component file - only their underlying CSS values in src/index.css changed, from hardcoded hex to `var()` references into the shadcn preset\'s own :root/.dark variables. Zero page/component files touched; every existing page automatically re-themed for free. A few tokens have no direct shadcn equivalent (no "hover-lightened primary" token exists) - those use `color-mix()` against the nearest real token instead of a new hardcoded color that wouldn\'t track light/dark. Border radius needed no bridging at all: the app never overrode Tailwind\'s stock rounded-* scale, so shadcn\'s own --radius-* tokens (which directly define rounded-sm/md/lg/xl/etc.) applied cleanly with zero collision the moment they were defined.', 'Second full visual redesign (2026-10-07): swapped onto a real shadcn/ui preset (style "maia", blue theme, DM Sans body / Outfit headings, large radius, Base UI primitives - `npx shadcn init --preset b311momZs0`) rather than the cobalt/Space-Grotesk system from 2026-08-23 below, after that one wasn\'t landing well. Done as a token bridge, not a per-component rewrite: every one of the ~40 existing Material-3-style token names (bg-surface-container-low, text-on-primary, etc.) stayed exactly as-is in every component file - only their underlying CSS values in src/index.css changed, from hardcoded hex to `var()` references into the shadcn preset\'s own :root/.dark variables. Zero page/component files touched; every existing page automatically re-themed for free. A few tokens have no direct shadcn equivalent (no "hover-lightened primary" token exists) - those use `color-mix()` against the nearest real token instead of a new hardcoded color that wouldn\'t track light/dark. Border radius needed no bridging at all: the app never overrode Tailwind\'s stock rounded-* scale, so shadcn\'s own --radius-* tokens (which directly define rounded-sm/md/lg/xl/etc.) applied cleanly with zero collision the moment they were defined.',
'Real light/dark mode (2026-10-07), the app\'s first - previously deliberately dark-only with no toggle at all, which is exactly why plugging in the shadcn preset directly (its CSS defines genuinely different light vs. dark values) would have silently broken without this: the preset\'s `.dark` class was never applied anywhere, so background/primary/secondary would have resolved to its light-mode values sitting next to the rest of the still-dark-styled app. New ThemeContext (light/dark/system, persisted to localStorage) toggles `.dark` on <html>; a blocking inline script in index.html applies the right class before React even mounts, avoiding a flash - and defaults a first-time visitor with no stored preference to dark specifically (not "system"), so a returning user on a light-mode OS doesn\'t get surprised by their familiar dark app turning white. New "Appearance" segmented control (Light/Dark/System) on the Settings page, a local-only preference with no backend round trip, next to the existing privacy toggles.', 'Real light/dark mode (2026-10-07), the app\'s first - previously deliberately dark-only with no toggle at all, which is exactly why plugging in the shadcn preset directly (its CSS defines genuinely different light vs. dark values) would have silently broken without this: the preset\'s `.dark` class was never applied anywhere, so background/primary/secondary would have resolved to its light-mode values sitting next to the rest of the still-dark-styled app. New ThemeContext (light/dark/system, persisted to localStorage) toggles `.dark` on <html>; a blocking inline script in index.html applies the right class before React even mounts, avoiding a flash - and defaults a first-time visitor with no stored preference to dark specifically (not "system"), so a returning user on a light-mode OS doesn\'t get surprised by their familiar dark app turning white. New "Appearance" segmented control (Light/Dark/System) on the Settings page, a local-only preference with no backend round trip, next to the existing privacy toggles.',
'Space Grotesk (Google Fonts, external CDN link in index.html) replaced by the preset\'s own DM Sans Variable / Outfit Variable, both self-hosted via @fontsource-variable - no external font request at all now, consistent with how the rest of the app avoids third-party runtime dependencies.', 'Space Grotesk (Google Fonts, external CDN link in index.html) replaced by the preset\'s own DM Sans Variable / Outfit Variable, both self-hosted via @fontsource-variable - no external font request at all now, consistent with how the rest of the app avoids third-party runtime dependencies.',
'Settings toggle switches no longer render their thumb outside the pill (fixed 2026-10-07, reported right after the above shipped): the thumb relied on left:auto plus a translate-x offset for its position, but the native <button>\'s text-align:center UA default - never neutralized by an explicit left - made the auto-resolved static position land near the pill\'s right edge regardless of checked state, so the translate pushed it visibly outside the pill in both states instead of sliding within it. Anchored with an explicit left-0.5 base position instead (the standard Tailwind switch recipe), so it no longer depends on the browser\'s static-position resolution for an auto-positioned box.',
'First full visual redesign (2026-08-23), sourced from a Stitch design export: cobalt/periwinkle-on-deep-ink Material-3-style token system (primary #b8c3ff / primary-container #2e5bff on #131313), Space Grotesk, sharp 4px-radius geometry - deliberately not the export\'s mint-green "Stax" variant, which read too close to an existing music app\'s brand color. Superseded by the shadcn swap above, but the token *names* and page structure it established are still exactly what every component uses today.', 'First full visual redesign (2026-08-23), sourced from a Stitch design export: cobalt/periwinkle-on-deep-ink Material-3-style token system (primary #b8c3ff / primary-container #2e5bff on #131313), Space Grotesk, sharp 4px-radius geometry - deliberately not the export\'s mint-green "Stax" variant, which read too close to an existing music app\'s brand color. Superseded by the shadcn swap above, but the token *names* and page structure it established are still exactly what every component uses today.',
'Tailwind v4 @theme tokens (bg-background, bg-surface-container*, text-on-surface*, bg-primary, etc.) replace the old ad-hoc neutral-900/emerald-500 classes app-wide, including UI primitives (Button, Input, EmptyState, Skeleton, ProgressBar)', 'Tailwind v4 @theme tokens (bg-background, bg-surface-container*, text-on-surface*, bg-primary, etc.) replace the old ad-hoc neutral-900/emerald-500 classes app-wide, including UI primitives (Button, Input, EmptyState, Skeleton, ProgressBar)',
'Desktop: 256px fixed sidebar with the full nav list. Mobile: 5-tab bottom bar (Library, Discover, Social, Soundmarks, Remix) + a "More" sheet for the rest - the export\'s own floating-pill nav only assumed ~4 destinations, not enough for this app\'s real feature count', 'Desktop: 256px fixed sidebar with the full nav list. Mobile: 5-tab bottom bar (Library, Discover, Social, Soundmarks, Remix) + a "More" sheet for the rest - the export\'s own floating-pill nav only assumed ~4 destinations, not enough for this app\'s real feature count',
...@@ -279,11 +281,6 @@ const FRONTEND_TODO: WorkItem[] = [ ...@@ -279,11 +281,6 @@ const FRONTEND_TODO: WorkItem[] = [
status: 'needs-design', status: 'needs-design',
note: "Noted 2026-10-06, not started - there's currently no first-run walkthrough at all; a brand-new account lands straight on Home/Library with no explanation of what Stax does or how to get music into it (Upload vs. Telegram linking vs. Discovery).", note: "Noted 2026-10-06, not started - there's currently no first-run walkthrough at all; a brand-new account lands straight on Home/Library with no explanation of what Stax does or how to get music into it (Upload vs. Telegram linking vs. Discovery).",
}, },
{
item: 'Investigate perceived slow-to-start playback',
status: 'needs-design',
note: "Reported 2026-10-06: songs feel slow to start playing, like they aren't streaming. Investigated the same day - the stream endpoint and the vite proxy both measured sub-50ms time-to-first-byte locally with full Range-request support confirmed working, and the claim-then-play round trip for a non-owned song (Home/shared search) is a few ms server-side. One real, measurable factor found: sample files carry a ~200KB ID3v2 tag (mostly embedded cover art) before the actual audio data begins, which a browser must download before it has anything playable - on a slow connection this alone could take a couple of seconds. Open question before building anything: strip embedded art from the streamed response (real-ish backend change, art already reaches the player separately via the `coverart` field) vs. this being mostly real-world network latency we can't fix in code.",
},
{ {
item: 'Delete buttons + confirm dialogs for playlists and playlist tracks', item: 'Delete buttons + confirm dialogs for playlists and playlist tracks',
status: 'ready', status: 'ready',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment