Under the hood
Directory sync now treats a new 'detached' journal state the same as 'ended' when stopping
What
The directory-sync git worker's journal reader now stops in response to a new halted === "detached" state, treating it the same way it already treated halted === "ended". It also records a new detached boolean on the stored halt-state object.
Why
This adds a distinct way for directory sync to recognize and halt cleanly when a sync session becomes detached, rather than only recognizing an explicit end.