Problem
state.app is a process-global mutable AppState read and written directly by the desktop UI, remote API threads, and detached feature workers. Synchronization is feature-specific and incomplete.
For example, podcast workers rewrite results and result_count under a private mutex, while the UI renderer and remote poster endpoint read/copy those fields without that mutex. Jellyfin authentication and catalog workers follow a similar publish/read pattern. Copying a live buffer is not a synchronization boundary.
Acceptance criteria
Relevant files: src/core/state.zig, src/services/podcasts.zig, src/services/jellyfin.zig, and src/services/remote_stream.zig.
Problem
state.appis a process-global mutableAppStateread and written directly by the desktop UI, remote API threads, and detached feature workers. Synchronization is feature-specific and incomplete.For example, podcast workers rewrite
resultsandresult_countunder a private mutex, while the UI renderer and remote poster endpoint read/copy those fields without that mutex. Jellyfin authentication and catalog workers follow a similar publish/read pattern. Copying a live buffer is not a synchronization boundary.Acceptance criteria
Relevant files:
src/core/state.zig,src/services/podcasts.zig,src/services/jellyfin.zig, andsrc/services/remote_stream.zig.