mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-11-03 13:55:30 -05:00
JobStarted was emitted for every job while JobCompleted, JobFailed and JobCancelled were all gated behind should_emit_events. So any job that opted out of events still announced a start and never announced an end, and the client had a row nothing could clear. That is every ephemeral browse, since should_emit_events is should_persist unless the job is indexing a whole volume. Gating the start the same way makes an event-free job invisible end to end, which is what the flag was for. Also reorders the completion arm. Clients refetch the job list when they see a completion, and the job was removed from running_jobs after the event went out, so a refetch that landed first got the job back in the answer with nothing further coming to clear it. Reading the output, removing, then announcing closes that window.