Skip to content

Stream playlist import progress to admin UI #200

Description

@guidefari

Problem

When importing a Spotify playlist from /admin/playlists, the UI only shows a queued toast and then goes blind while background enrichment runs.

Current behavior in code:

  • Frontend queues POST /music/playlists/import/spotify and shows Import queued
  • Backend imports the playlist, then forks background link enrichment with Effect.forkDetach
  • No progress or completion state is pushed back to the frontend

Request

Communicate playlist import progress to the frontend in real time via WebSocket or SSE.

Useful progress states could include:

  • queued
  • import started
  • playlist created or updated
  • tracks processed: x / y
  • background enrichment started
  • background enrichment progress: x / y
  • completed
  • failed

Notes

  • I did not find existing WebSocket or SSE plumbing in the app codebase, so this likely needs a fresh realtime path.
  • SSE may be enough if this is only server-to-client progress streaming.
  • The current import flow lives around:
    • apps/www/src/routes/admin/_components/-PlaylistsTab.tsx
    • apps/vps/src/services/music-entity/playlist-tracks.service.ts

Outcome

The admin playlists screen should show live progress for an in-flight import instead of a one-off queued toast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions