Skip to content

Queue persistence across page reloads #32

@LoggeL

Description

@LoggeL

Problem

The song queue is lost on page refresh — the biggest day-to-day UX annoyance. Users building up a setlist lose everything if they accidentally reload or navigate away.

Proposal

Persist the queue to localStorage and restore it on load.

What to save:

  • Queue item list (track IDs, metadata, order)
  • Current index and playback position
  • Volume levels (vocals/instrumental)

What NOT to save:

  • Audio buffers (re-fetch from /songs/{id}/ URLs on restore)
  • Processing status (re-poll from backend)

Restore behavior:

  • On page load, check localStorage for saved queue
  • Rebuild queue items from saved metadata
  • Mark all as ready: false, re-verify with backend which are still complete
  • Resume playback position if the track is still available
  • Clear stale entries (tracks deleted server-side)

Edge cases:

  • Song deleted from server between sessions → remove from queue silently
  • Multiple tabs → last-write-wins or single-tab lock

Complexity

Low-medium. Mostly frontend work in usePlayer.ts. No backend changes needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions