Skip to content

Conversation

@kaplas
Copy link

@kaplas kaplas commented Jan 19, 2026

Hi! I was experiencing with some state problems when dealing with multiple libraries. In my setup, I have a children library and a normal library, and sometimes the app just restored in the "wrong" library, although showing the resume playback pill from another library, and sometimes also forgetting my listening process.

I am not Swift developer at all, do not know the codebase at all, but have 20 years of software development experience, and decided to try to fix these issues with Claude Code. The result of this experiment is in this PR, and I would ask you to please check this out, and make the call yourself as the Real Swift Developer™️, if these changes actually make sense 😅 On a superficial level these do look quite legit, and on my brief testing with an emulator and with a device, the synchronisation issues seemed to decrease. The original situation felt like a race condition, and Claude Code was multiple times referring to these changes fixing a race condition in the initial syncronization.

The part that I am not very much not sure, are the changes to ShelfPlayerKit/Persistence/ProgressSubsystem.swift. I do not completely understand what is happening there, but the change did seem to fix the issue of progress being lost from time to time.

Hopefully these vibecodings of mine are at least remotely helpful for you :)

Issues fixed, according to CC

  1. Race Condition in Connection Synchronization
  2. Incorrect Offline Mode Activation
  3. Library Restoration Not Matching Playback Pill
  4. Race Condition with Multiple Libraries Loading
  5. Resume Pill Showing Before Initial Sync Complete
  6. Progress Entities Deleted During Initial Sync

@kaplas
Copy link
Author

kaplas commented Jan 19, 2026

It seems that #415 might have some conflicts with this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant