Files
spacedrive/apps
Jamie Pine 8f2d1dbf3a Watch a source whose index came back from a snapshot
An index becomes browsable two ways and only one of them armed a watch. A
walk finishes and the indexing job watches what it walked. A restart restores
the same index from a snapshot and watched nothing, so the drive browsed
perfectly and reported no changes until it was indexed again.

Measured on the running daemon: one source, /System/Volumes/Data, 2.1M
entries restored, no ephemeral index job this session, and a real file
created on the desktop produced no ResourceChanged on the event bus.

The cache now announces a root when its snapshot restore populates the index,
and the watcher service arms a watch for each. A channel rather than a handle
because the watcher service already holds the cache. Announced once per
source per session, and watch_ephemeral returns early for a root it already
watches, so nothing accumulates a reference count it never sheds.

core.ephemeral_status reports watched roots, and `sd-cli index
ephemeral-cache` prints them even when the list is empty. Empty is the whole
answer here, and reading it took a code walk twice.
2026-08-26 05:15:59 -07:00
..
2026-08-25 22:13:17 -07:00