Skip to content

Fix misc playlist issues#13701

Merged
raymondjacobson merged 8 commits intomainfrom
rj-playlist-fix
Feb 13, 2026
Merged

Fix misc playlist issues#13701
raymondjacobson merged 8 commits intomainfrom
rj-playlist-fix

Conversation

@raymondjacobson
Copy link
Member

Add playlist update locking mechanism to prevent optimistic re-fetching from clobbering pending updates.

Tested:

  • Repeated adding and removing tracks in 1 tab
  • Repeated adding and removing tracks in 2 tabs concurrently. If doing two tabs, it's still possible to get into weird states, but it's a much rarer edge case where you're adding multiple tracks in multiple tabs before any of them confirm.

A simpler solve would be to just not refetch before update while something is in the confirmer, but that isn't super great because we handle updates async and still could bite you if you're on the add tracks to playlist menu and just clicking add repeatedly.

Fixes two additional bugs:

  • We don't render the playlist name until the artwork loads. This was from an old way of doing this and was causing issues loading playlists entirely
  • Playlist library was not getting created from a fresh account that had no library and was making playlists. Add a couple saga helpers to fix, for now since all that logic still lives in saga land.

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

⚠️ No Changeset found

Latest commit: 6818ffc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@raymondjacobson raymondjacobson changed the title Fix misc playlist issue Fix misc playlist issues Feb 13, 2026
Copy link
Contributor

@rickyrombo rickyrombo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so iiuc we grab a mutex, do our operation, and the next operation will wait for that mutex before doing its operation, at which point even if it refetches it'll be up to date?

@raymondjacobson
Copy link
Member Author

so iiuc we grab a mutex, do our operation, and the next operation will wait for that mutex before doing its operation, at which point even if it refetches it'll be up to date?

yeah, but the mutex lets go right when we insert the change into the confirmer. i don't know if i like it though, doing another pass at the simpler solve of just not fetching when we have optimistic state.

@raymondjacobson raymondjacobson merged commit 986793c into main Feb 13, 2026
12 checks passed
@raymondjacobson raymondjacobson deleted the rj-playlist-fix branch February 13, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants