Expand description
Filesystem watcher for directories a Media pane is pointed at — detects
new/changed media files (e.g. a freshly-downloaded ComfyUI render
landing in a project’s clips/ folder) and pushes a per-block “a
matching file changed” wake signal so panes update without a manual
reload.
Migrated onto the shared fs_watch::FsWatchPool
(SPEC_SHARED_FS_WATCHER_FRAMEWORK_2026_08_07.md), alongside
editor_file_watcher.rs in the same PR. Directory-mode sibling of that
file: that one watches individually-opened files (one entry per open
tab); this one watches whole directories directly, filtered by a
per-subscriber extension set, since a Media pane’s job is “show me the
latest render in this folder,” not “watch this one exact file.”
Spec: docs/specs/SPEC_MEDIA_PANE_2026_07_26.md
Structs§
Constants§
- DEBOUNCE 🔒
- EVENT_
MEDIA_ FILE_ CHANGED - MPS event fired when a file matching a Media pane’s extension filter is
created/modified inside a directory that pane is watching. Scoped
per-block (
block:<id>) viaMuxEvent::scopes, matchingEVENT_EDITOR_FILE_CHANGED’s pattern. Payload is just the changed file’s path — a wake signal, not content; the frontend re-fetches viaGET /agentmux/stream-local-file.
Functions§
- publish_
media_ 🔒file_ changed - Publish
EVENT_MEDIA_FILE_CHANGED, scoped to every block watching the changed file’s directory with a matching extension. Mirrorspublish_editor_file_changed’s per-block scoping — never a global broadcast.
Type Aliases§
- Debounce
Gens 🔒 - Per-file debounce generation counters, same collapsing-burst-writes
purpose as
editor_file_watcher.rs’s, keyed by the full changed-file path (not the directory) so unrelated files in the same watched directory debounce independently.