1. 22 Aug, 2026 5 commits
  2. 19 Aug, 2026 1 commit
  3. 18 Aug, 2026 5 commits
  4. 16 Aug, 2026 5 commits
    • Aryan Noshirvnai's avatar
    • Aryan Noshirvnai's avatar
      Restructure Roadmap: split "what's next" into Backend/Frontend, each item with a status · f9c51957
      Aryan Noshirvnai authored
      Replaces the old Now/Next/Ideas/QOL columns with two lists - Backend and
      Frontend - so backend work (currently the priority; UI/UX is paused) is
      easy to see at a glance instead of interleaved with frontend items.
      
      Every item now carries a status instead of being a flat bullet:
      - Ready to start - clearly scoped, no blockers
      - Needs design - the idea is real but the approach isn't decided yet
        (e.g. Discovery->Library has no audio file to actually save; Discovery's
        confidence score is buried in a string for AcoustID and doesn't exist at
        all for Shazam matches)
      - Blocked - waiting on something else first (proxy-aware IP detection
        waits on a real load balancer existing; confirm dialogs wait on the
        backend delete endpoints landing)
      
      All prior items carried over, none dropped - "General QOL" folded into
      Frontend since every item in it already was frontend-only.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      f9c51957
    • Aryan Noshirvnai's avatar
      Add Playlist UI - the first item off the roadmap's "Next" column · 0f155d5e
      Aryan Noshirvnai authored
      Playlists have had a fully working backend (create, list, add-track) with
      zero frontend UI since much earlier in this project. Adds:
      
      - New page (/playlists, in nav): list playlists, create one inline, open
        one to see and play its tracks, back button to return to the list.
      - AddToPlaylistModal: a per-row action on the Library page to add a song
        to an existing playlist, or create a new one and add to it in one step -
        mirrors SongPicker's modal pattern. Stays open after a successful add so
        adding to several playlists doesn't mean reopening the picker each time.
      - Backend: new GET /playlists/{id} (stax_backend_api, separate commit) -
        the only endpoint actually missing; everything else already existed.
      
      Verified live end to end through the deployed proxy: create a playlist,
      add a real library song, fetch the playlist back with its track. Updated
      the Roadmap page to reflect this is done.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      0f155d5e
    • Aryan Noshirvnai's avatar
      Revert committing .env files - bake the correct default into code instead · d53c3623
      Aryan Noshirvnai authored
      Committing .env/.env.development/.env.production (previous commit) fixed
      the immediate symptom (fresh checkout had no working config) but broke a
      convention that exists for good reason: gitignoring .env means nobody has
      to judge whether a given line is sensitive before adding it. "Nothing in
      here is sensitive right now" is true but fragile - it only holds until
      someone adds a real secret to that file later without remembering the
      convention was bent for it.
      
      The actual problem was "a missing env override silently breaks the app
      with no error," not "the file isn't committed." Fixed properly: client.ts
      now defaults VITE_API_BASE_URL to '/api' (the same-origin proxy path both
      `vite dev` and `vite preview` already serve this app through) instead of
      requiring an env file to supply it - matching the pattern vite.config.ts
      already used for BACKEND_PROXY_TARGET. A fresh checkout now works
      correctly with zero env files at all, verified by rebuilding with none
      present and confirming '/api' is still what's baked into the bundle.
      
      .env/.env.development/.env.production deleted and re-gitignored;
      .env.example is back to being a pure template, documenting when you'd
      actually need to override either default (a different deployment
      topology), not real values to copy.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      d53c3623
    • Aryan Noshirvnai's avatar
      Stop gitignoring env config that holds no secrets - commit .env/.env.development/.env.production · 434f1a2e
      Aryan Noshirvnai authored
      .env, .env.development(.local), and .env.production(.local) have held zero
      actual secrets since the dev auto-login token pair was removed earlier
      today - just a backend URL and a proxy target, neither sensitive (the
      backend URL is already visible in the compiled JS bundle regardless).
      Gitignoring them anyway meant a fresh checkout had no working config at
      all, and specifically meant .env.development.local/.env.production.local
      (the overrides that route API calls through vite's same-origin proxy
      instead of an absolute http:// URL, avoiding mixed-content blocking) could
      silently go missing with zero server-side signal - exactly the failure
      mode that caused two separate "nothing works" incidents today.
      
      Renamed the two .local overrides to .env.development/.env.production
      (Vite's convention for committed, mode-specific config, as opposed to
      .local's convention for gitignored personal overrides) and committed all
      three files for real. *.local stays gitignored for genuine personal
      overrides (e.g. .env.local) going forward. .env.example now documents that
      the real values are already committed, not something to copy by hand.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      434f1a2e
  5. 15 Aug, 2026 14 commits
    • Aryan Noshirvnai's avatar
      Fix mixed-content-blocked API calls in the production build + harden auth-failure recovery · a631b91b
      Aryan Noshirvnai authored
      Two compounding bugs behind "cannot sign in" / protected pages showing a
      blank page instead of prompting to log in:
      
      1. The production build (vite build, mode=production) doesn't read
         .env.development.local - only .env - so it baked in the raw
         http://144.76.210.145:8000 absolute URL instead of the /api proxy path.
         Since the page is served over https:// (via vite preview, see
         stax_dev_mode_is_the_real_slowness in project memory), the browser
         silently blocked every single fetch as mixed content - no server-side
         error, just every API call failing client-side. Added
         .env.production.local (gitignored, documented in .env.example so a
         fresh checkout doesn't regress) with the same /api override
         .env.development.local already used for dev mode.
      
      2. AuthContext's role-fetch effect only recognized a clean 401 ApiError as
         "not authenticated" - a mixed-content-blocked fetch throws a raw
         TypeError instead, which the old check didn't recognize, so `role`
         stayed null forever and RequireRole rendered a blank page indefinitely
         instead of ever redirecting to /login. Now only a 5xx (a transient
         server hiccup) is treated as "stay logged in, don't overreact" -
         everything else, including a network-level failure, is treated as "not
         authenticated" so the user always gets a login prompt instead of
         silence.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      a631b91b
    • Aryan Noshirvnai's avatar
      Remove the dev auto-login shortcut - it kept going stale and presenting as "site is slow" · 9d69f811
      Aryan Noshirvnai authored
      VITE_DEV_ACCESS_TOKEN/VITE_DEV_REFRESH_TOKEN was a single refresh token
      baked into .env and shared across every consumer (every dev session, every
      test run, every stray curl). Refresh tokens are single-use/rotating by
      design - the instant any one consumer used it, the backend rotated it and
      the file's copy went dead for everyone else, with no way to keep a static
      file in sync with a rotating secret. Confirmed live in the backend log:
      the real browser session was stuck looping GET /auth/me -> 401 -> POST
      /auth/refresh -> 401 on every page load, which is what "still very slow"
      actually was - not a performance bug, an auth bug that looked like one.
      
      Regenerating the pair (done twice already this session) only delays the
      same failure. Removed the mechanism entirely: isAuthenticated's initial
      value now comes straight from whatever's already in localStorage, exactly
      like a real logged-in user. Real username/password login (shipped earlier
      today) replaces the dev shortcut with no such failure mode - log in with
      dev-test-user / StaxDev2026! instead.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      9d69f811
    • Aryan Noshirvnai's avatar
      Stream audio directly with a token query param instead of downloading a blob first · 27f06c50
      Aryan Noshirvnai authored
      Matches the backend fix: every fetchXStreamUrl (library, soundmarks, posts,
      live-location, rooms) used to fetch the entire audio file as a blob before
      handing <audio> a src, since a plain <audio src="..."> can't send an
      Authorization header - so playback couldn't start until the whole file had
      downloaded, and seeking didn't work at all. They now return a direct URL
      (api/client.ts's new buildStreamUrl, token as ?token=) that the browser
      streams natively - playback starts after the first buffered chunk, and
      seeking uses real Range requests. Removed the now-dead objectUrlRef/
      revokeObjectURL bookkeeping from PlayerContext.tsx.
      
      Also adds a General QOL column to the Roadmap page (streaming fix, plus
      grounded gaps found while looking: no volume control, no global error
      boundary, no offline handling, inconsistent loading states, playback state
      not persisted across reloads) and updates test counts.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      27f06c50
    • Aryan Noshirvnai's avatar
      Send a real access token to the Rooms websocket instead of a bare user_id · eac69cde
      Aryan Noshirvnai authored
      Matches the backend fix: connectToRoom() now takes the access token
      (getAccessToken() from RoomView) instead of a client-known userId, since
      the server verifies it before accepting the connection rather than trusting
      whatever id is passed. getCurrentUserId() (api/jwt.ts) is still used for
      local "is this me" UI comparisons only - never sent back as a trust claim;
      updated its comment, which was stale since Channels' own auth fix.
      
      Roadmap updated to reflect both security gaps are now fixed.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      eac69cde
    • Aryan Noshirvnai's avatar
      Fix dev proxy targeting the box's own public IP instead of loopback · 9958e8e1
      Aryan Noshirvnai authored
      vite.config.ts's BACKEND_PROXY_TARGET defaulted to the machine's public IP
      even though vite and the backend always run on the same host - every API
      call round-tripped through Hetzner's network via NAT hairpin instead of a
      plain loopback call. That's the same network path that already caused a
      full outage earlier in this project; it happened to still work here, but
      made every request hostage to cloud routing/firewall behavior it never
      needed to depend on. Default is now 127.0.0.1, override via
      BACKEND_PROXY_TARGET if the backend ever runs elsewhere.
      
      Also documents in .env.example that the dev auto-login token pair is
      inherently one-shot (refresh tokens rotate/single-use) and will go stale on
      its own - that staleness, not this proxy issue, was what actually produced
      "pages take very long to load" (two dead round trips - /auth/me,
      /auth/refresh - before bouncing to /login on every fresh page load).
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      9958e8e1
    • Aryan Noshirvnai's avatar
      Switch login to username/password; Telegram becomes account-linking, not auth · da534d8e
      Aryan Noshirvnai authored
      Login.tsx is now a plain username/password form (with a register toggle)
      instead of the two-step Telegram phone/code flow - completeLogin() and the
      redirect-to-original-destination logic are unchanged, only how tokens get
      obtained. api/auth.ts's requestCode/login are renamed to
      requestTelegramCode/linkTelegram and point at the backend's new
      /auth/telegram/* paths, reflecting that Telegram is for linking an account
      (for chat-scanning music-tagging) rather than signing in. Roadmap updated to
      match.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      da534d8e
    • Aryan Noshirvnai's avatar
      Add /roadmap: the engineering status audit, viewable in-app · 50bce471
      Aryan Noshirvnai authored
      Ports the published roadmap (full feature-by-feature audit: what's
      functional, what's built but unreachable, and the two active security
      gaps in /remix and the Rooms websocket) into the app itself at
      /roadmap, gated behind super_admin like the Admin panel - it names
      specific active vulnerabilities in detail, so it isn't something to
      leave reachable by a plain logged-in user. Linked from the header
      alongside Business/Admin.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      50bce471
    • Aryan Noshirvnai's avatar
      Add real Telegram phone/code login, replacing the dev-only auto-auth gap · be345ade
      Aryan Noshirvnai authored
      Nothing but the dev account could ever use this app - ProtectedRoute and
      RequireRole just showed a static "not authenticated" message with no
      way forward. Adds a real two-step login screen (phone -> code, via the
      backend's existing /auth/request_code + /auth/login, unchanged) and
      wires it in as the actual destination: both guards now redirect to
      /login (preserving the originally-requested page via router state) and
      land back where the user was trying to go, matching a normal auth flow
      instead of a dead end.
      
      Also fixes a real race this surfaced during live testing: the dev-only
      auto-login bootstrap ran in a useEffect, which only fires *after* the
      first render. ProtectedRoute's brand-new <Navigate> redirect renders
      before that effect ever gets a chance to run, so isAuthenticated was
      still false on the very first paint - every fresh dev-mode load bounced
      through /login before the bootstrap could authenticate it, sometimes
      stranding the session there since flipping isAuthenticated true a
      moment later doesn't undo an already-completed redirect. Moved the
      bootstrap into the isAuthenticated state's lazy initializer instead, so
      it runs synchronously before the first render - the same reason a real
      user's already-stored token doesn't have this problem.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      be345ade
    • Aryan Noshirvnai's avatar
      Redesign GeoDrops into live location sharing (was: one-off song pins) · 558c6513
      Aryan Noshirvnai authored
      Replaces the "drop a specific song at this exact point, once" model
      with a live broadcast: share your position and whatever you're
      currently playing, updated automatically as you move or switch songs,
      visible to anyone nearby while you're sharing. Matches the backend's
      GeoDrop -> LiveLocation redesign.
      
      - "Share my live location" toggle: starts watchPosition, pushes an
        update on every meaningful location/song change, plus a periodic
        heartbeat (keeps the row from expiring server-side while nothing's
        changed) - matching the backend's staleness-expiry approach, since a
        closing tab can't reliably notify the server with an authenticated
        request on unload.
      - Nearby list now live-updates on a short poll, not just on demand.
      - New: "Play my geo playlist" - shuffles everyone nearby's current song
        into the shared player's queue (Fisher-Yates, not the common biased
        Array.sort(() => Math.random() - 0.5) shuffle) and starts playing.
      - Only broadcasts a song when it's a real LibrarySong reference
        (Soundmarks/Rooms/Posts-sourced playback uses synthetic negative ids
        for player identity, not something safe to send as song_id).
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      558c6513
    • Aryan Noshirvnai's avatar
      Add Posts: song + remix-reply feed, previously backend-only with no UI · dd72364f
      Aryan Noshirvnai authored
      Posts had full backend support (create, remix as a reply, fetch a
      recursive remix tree) but nothing in the frontend ever called any of
      it - no feed, no way to browse or discover a post at all.
      
      New page at /posts: a feed of recent posts (song + caption + author +
      remix count), a composer to post a song, and a tree view for an
      individual post showing every remix branching off it with a "Remix
      this" action at each node. Playback goes through the shared player via
      the new cross-user post-stream endpoint.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      dd72364f
    • Aryan Noshirvnai's avatar
      Add GeoDrops: build a UI for the previously-unused drop-a-song feature · 93237997
      Aryan Noshirvnai authored
      GeoDrop had full backend support but zero UI anywhere - like a StreetPass
      drop, not a Soundmark: a one-off song pin left at your exact GPS
      position, no owner, no moderation, no persistent place to attach to
      (distinct from Soundmarks' community tier, which is about a named,
      persistent location accumulating votes over time).
      
      New page at /drops: request geolocation (same pattern as Nearby), drop
      a song at your exact position via the existing SongPicker, and see/play
      nearby drops sorted by distance through the shared player.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      93237997
    • Aryan Noshirvnai's avatar
      Stop sending user_id/owner_id to channels endpoints (backend fix) · d9a22bf3
      Aryan Noshirvnai authored
      Matches the backend fix removing the user_id/owner_id impersonation
      hole - createChannel/followChannel/unfollowChannel no longer take an
      id param since the backend derives it from the auth token now. UI
      display (hiding the follow button on your own channel) still uses
      getCurrentUserId() locally, just no longer sends it to the server.
      
      Also adds the first test coverage for the Channels page - there was
      none before this.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      d9a22bf3
    • Aryan Noshirvnai's avatar
      Wire up now-playing, DJ song picking, and pass-aux in the Rooms UI · 68164f7a
      Aryan Noshirvnai authored
      Rooms had chat, reactions, and "request aux" working, but the DJ had no
      way to actually pick a song or hand off the aux, and now_playing_changed
      was never even handled - the core "pass the aux" mechanic wasn't
      reachable from the UI at all. Adds a now-playing card (streams via the
      shared player, same pattern as Soundmarks), a song picker for the DJ
      (reuses the existing SongPicker), a Pass Aux button, and visible
      feedback for server-side errors (e.g. "only the DJ can do that").
      
      Also adds the first frontend test coverage for any social feature -
      Rooms/RoomView had none before this.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      68164f7a
    • Aryan Noshirvnai's avatar
      Fix permanently-blank admin panel and a real-network-call leak in tests · 4957eaf3
      Aryan Noshirvnai authored
      Two compounding bugs, both traced from live "Token expired on Library" /
      "blank Admin panel" reports:
      
      1. AuthContext never recovered from a failed token refresh. isAuthenticated
         only ever got set to true (on mount or dev auto-login); nothing set it
         back to false when apiFetch's own refresh-and-retry also failed and
         silently cleared localStorage out from under it. role stayed null
         forever in that state, and RequireRole renders nothing while role is
         null (to avoid flashing "access denied" during the real initial
         fetch) - so a stale/expired token produced a permanently blank page
         instead of a "not authenticated" message. Now a 401 from /auth/me
         (meaning the retry already failed) flips isAuthenticated back to
         false so the UI recovers on its own.
      
      2. AuthContext captured VITE_DEV_ACCESS_TOKEN/VITE_DEV_REFRESH_TOKEN as
         module-level constants at import time, so every test file's
         vi.stubEnv() calls in beforeEach (all of them except AuthContext's
         own tests, which knew to work around this with vi.resetModules())
         were silent no-ops. With genuinely valid dev tokens now in .env, this
         started making real network calls to the live backend during `npm
         test` and made Nearby.test.tsx flaky (real role resolved to
         super_admin, so the real "Business" nav link collided with a
         soundmark's own tier badge text). Reading the env vars fresh inside
         the effect instead of as frozen constants fixes it for every test
         file at once, not just the ones edited here.
      
      Also regenerated .env's dev tokens via the real auth issuance path
      (_issue_tokens) so they're backed by an actual refresh_tokens DB row,
      not just a bare unregistered JWT.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      4957eaf3
  6. 14 Aug, 2026 1 commit
  7. 12 Aug, 2026 3 commits
    • Aryan Noshirvnai's avatar
      Fix dev API calls being blocked as mixed content over https · 409a624f
      Aryan Noshirvnai authored
      The Geolocation fix made the dev server https://-only, but the backend
      it talks to is still plain http:// - browsers hard-block that as mixed
      content for fetch/XHR/WebSocket with no user override, so every API call
      silently failed once loaded over the required https URL.
      
      Adds a same-origin proxy in vite.config.ts (dev only) so the browser
      only ever talks to https://<dev server>/api/..., with the actual
      http:// hop happening server-side in Node where mixed-content rules
      don't apply. VITE_API_BASE_URL is switched to the relative "/api" for
      dev via .env.development.local (gitignored, not committed); production
      builds are unaffected and still use the real absolute URL from .env.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      409a624f
    • Aryan Noshirvnai's avatar
      Add three-tier Soundmarks (major/business/community) and dark map re-theme · 29363679
      Aryan Noshirvnai authored
      Major locations get one super-admin-set anthem; businesses get an
      owner-managed playlist; community spots stay fully vote-driven with the
      top 3 proposals shown. Suggestions on major/business tiers go through a
      review queue (CRM) instead of applying immediately. Also switches both
      maps from default OSM tiles to CartoDB's free dark basemap with custom
      tier-colored pin markers for a cleaner, more minimal look.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      29363679
    • Aryan Noshirvnai's avatar
      Fix geolocation not working: dev server was on an insecure origin · b2c5ae5b
      Aryan Noshirvnai authored
      Root cause of "won't ask for location permissions": the Geolocation
      API refuses to run at all on a plain http:// origin (only https://
      and localhost count as a "secure context") - Chrome fails immediately
      with PERMISSION_DENIED before ever showing the actual permission
      prompt, which is indistinguishable from a real user decline. The dev
      webapp was served at http://144.76.210.145:5173, so this affected
      every visitor, not just one browser/device.
      
      Fixed by serving the dev server over https:// via a self-signed cert
      (@vitejs/plugin-basic-ssl, zero config). You'll see a one-time "your
      connection isn't private" warning in the browser the first time you
      load it now - click through (Advanced -> Proceed) since it's a
      self-signed cert; after that geolocation works normally. A real
      production deploy will need a proper cert via an actual domain name
      (Let's Encrypt or similar) - self-signed is only acceptable here
      because we're the ones clicking through our own warning.
      
      Also fixed a second, smaller bug found while diagnosing this: the
      insecure-origin failure was being shown to users as "location access
      was denied - allow it in your browser settings," which is wrong and
      unactionable (no browser setting fixes an insecure origin). Nearby.tsx
      now checks window.isSecureContext upfront and shows an accurate
      message instead of letting it fail through as a fake permission
      denial.
      
      Verified live: confirmed the exact failure via a real (non-Playwright-
      granted) browser session hitting the old http:// URL - isSecureContext
      false, getCurrentPosition immediately erroring with "Only secure
      origins are allowed" - then confirmed it resolves cleanly over the
      new https:// URL (isSecureContext true, real geolocation result).
      1 new test for the insecure-origin message; 84 webapp + 144 backend
      tests passing overall.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      b2c5ae5b
  8. 11 Aug, 2026 2 commits
    • Aryan Noshirvnai's avatar
      Add location picker, live map, and song proposals/voting to Soundmarks · 543f0d38
      Aryan Noshirvnai authored
      Location picker (admin panel create/edit form): address-search
      autocomplete backed by the new backend geocode proxy, plus an
      embedded Leaflet/OpenStreetMap map - search, click, or drag the pin
      to set a soundmark's coordinates. Replaces raw lat/lon number inputs.
      
      Map screen + live location (Nearby page): a real map showing a
      live-updating "you are here" dot (tracks the existing watchPosition
      feed) and pins for whatever soundmarks are currently in range,
      alongside the existing text/card view - not a replacement for it.
      
      Song proposals + voting (Nearby page): shows every proposal for the
      detected soundmark with vote counts, a "Propose a song" button
      (reuses the existing SongPicker), and a vote toggle per proposal.
      Soundmarks with no anthem yet now show a "propose one" prompt instead
      of a play button, so there's an actual path to making the first
      proposal for a brand new soundmark.
      
      OpenStreetMap over Google Maps per explicit choice - no API key/
      billing setup required. leaflet + react-leaflet added; the default
      marker icon bundler quirk (broken image paths once bundled - a
      known issue with every bundler) is patched once via src/lib/leafletIcons.ts.
      
      10 new tests (LocationPicker search/selection, SoundmarkMap smoke
      tests, Nearby proposal/vote/propose flows and the "no anthem yet"
      state) - 83 webapp tests passing overall. Verified live end-to-end
      with a real Nominatim geocode search ("Eiffel Tower, Paris") and
      real Chromium geolocation mocking rather than stubbed data - the
      whole loop (create -> geocode -> place pin -> assign anthem -> detect
      via live location -> see it on the map -> view proposals) worked with
      zero console errors.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      543f0d38
    • Aryan Noshirvnai's avatar
      Add Soundmarks: location-tied anthems with role-gated admin panels · 4b0e72d7
      Aryan Noshirvnai authored
      Frontend for the new backend feature - a Soundmark is a curated
      "anthem" tied to a real place, either a super-admin-curated landmark
      or a business's location. Three new surfaces:
      
      - Nearby (Soundmarks nav item): uses the browser Geolocation API
        (getCurrentPosition + watchPosition, so it keeps tracking as you
        move) to find and play the anthem at your current spot, through the
        same shared player used everywhere else in the app.
      - Business panel (/business, business_admin+): soundmarks you own,
        each with a "Change anthem" picker spanning your personal library
        and a new cross-user "public library" search.
      - Admin panel (/admin, super_admin only): full CRUD for every
        soundmark regardless of owner, plus user role management
        (promote/demote business_admin).
      
      AuthContext now fetches the caller's role via /auth/me and exposes
      isBusinessAdmin/isSuperAdmin; a super admin passes both. RequireRole
      gates the two new routes and Layout conditionally shows Business/
      Admin links in the header. PlayerContext gained an optional
      `streamUrl` override on PlayableSong so a soundmark's anthem can
      stream via its own cross-user-safe endpoint instead of the
      personal-library one, without touching the player's core logic.
      
      Caught and fixed a real accessibility bug via testing: the header's
      Business/Admin/Log out controls had their icon aria-hidden and their
      label CSS-hidden on mobile, leaving them with no accessible name at
      all - fixed with explicit aria-labels.
      
      Verified with a real end-to-end Playwright run (not just unit tests):
      logged in as super admin, created a soundmark through the actual UI,
      assigned an anthem, then used Chromium's real geolocation mocking to
      walk into it from the Nearby page and play it through the shared
      player - zero console errors throughout. 82 total tests passing
      (11 new: RequireRole, Nearby, BusinessPanel, AdminPanel, plus
      AuthContext role coverage).
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      4b0e72d7
  9. 10 Aug, 2026 4 commits
    • Aryan Noshirvnai's avatar
      Make lyrics fluid (no navigation) and rows tap-anywhere-to-play · b3a07d39
      Aryan Noshirvnai authored
      Lyrics no longer push to a separate screen with its own back button -
      tapping the lyrics bar crossfades the same central area between cover
      art and lyrics text in place, with the header, title, seek bar, and
      transport controls staying exactly where they are the whole time.
      Queue stays a dedicated screen (jumping to an arbitrary track is a
      genuinely different action), reached via its own icon.
      
      Library rows and the Upload result card now play on tap anywhere in
      the row/card, not just the small icon button - the icon is a status
      indicator inside the same button now, not a separate control.
      
      Verified end-to-end against the real running app with Playwright (not
      just unit tests): tap-to-play on both Library and Upload, the fluid
      lyrics crossfade, queue jump, shuffle/repeat, and re-uploading the
      same file twice correctly staying at one library row instead of
      creating a duplicate. Zero console errors across a full click-through
      of every page at both mobile and desktop viewports.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      b3a07d39
    • Aryan Noshirvnai's avatar
      Redesign FullPlayer to mirror real Spotify (no tabs) · e292025b
      Aryan Noshirvnai authored
      Replaced the Cover/Lyrics/Queue tab switcher with Spotify's actual
      pattern: cover art is always the primary now-playing screen, and
      Lyrics/Queue are separate screens reached via a lyrics preview bar and
      a queue icon respectively, sliding in from the right with their own
      back button (push-navigation, not tab-switching). The lyrics preview
      bar only appears when the track actually has lyrics, matching Spotify
      rather than linking to a dead-end empty screen.
      
      Escape now backs out one level at a time (Lyrics/Queue -> cover ->
      close), and picking a track from the Queue screen returns you to the
      now-playing screen instead of leaving you on the list.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      e292025b
    • Aryan Noshirvnai's avatar
      Add queue view, shuffle/repeat, playback error feedback, visual polish · 3578ac25
      Aryan Noshirvnai authored
      Verified against a real headless browser this round (Playwright) -
      several of these were found by actually looking at the rendered UI,
      not just reasoning about the code:
      
      - Failed plays (bad stream, network error, blocked autoplay) now
        surface a dismissible toast instead of silently clearing the song
        with no feedback. Caught and fixed a real bug here: the toast's
        first version rendered on top of the page header, hiding it - it
        now sits just below it.
      - FullPlayer gains a third "Queue" tab (tap any track to jump to it),
        plus shuffle and repeat (off/all/one) controls in the transport row.
        Repeat-one only affects natural track-end, not the Next button,
        matching standard player behavior.
      - Loading state gets real visual feedback: a pulsing cover art and a
        "Loading…" label in place of the time readout.
      - Visual composition pass: a blurred, dimmed cover-art backdrop fills
        the dead space around the centered album art (Spotify/Apple Music
        convention), the Cover/Lyrics/Queue tab icons are now symmetric, and
        a hairline border separates the scrollable lyrics panel from the
        title block below it so the fade-out text no longer visually bleeds
        into it.
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      3578ac25
    • Aryan Noshirvnai's avatar
      Smooth player transitions, better lyrics view, accessibility pass · 867aa9c8
      Aryan Noshirvnai authored
      - FullPlayer and NowPlayingBar now animate in/out (slide + fade) via
        a shared useMountTransition hook instead of snapping in/out, with
        motion-reduce fallbacks for users who've asked for less motion.
      - Lyrics moved from a small icon toggle into a proper Cover/Lyrics
        tab switcher (real tablist/tab/tabpanel roles, arrow-key navigation,
        crossfade between panels), with larger type, a scroll fade mask, and
        a real empty state for tracks with no lyrics.
      - FullPlayer is now a proper dialog: aria-modal, focus moves to it on
        open and back to the control that opened it on close, Escape closes
        it, and background scroll is locked while it's open.
      - Seek bar reskinned as a real <input type="range"> (keeps native
        keyboard/pointer/AT support) with a progress-fill gradient and a
        hover-revealed thumb, plus aria-valuetext with formatted times.
      - Added a visible focus-visible ring to the shared Button component
        and to the player's own raw buttons (WCAG 2.4.7).
      Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
      Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
      867aa9c8