fix(events): respect include paths in event watchers#197
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates filesystem event watching so that include paths are honored when filtering FSEvents, ensuring included subtrees are not dropped even when they live under ignored parents.
Changes:
- Extend
EventWatcher::spawnto acceptinclude_pathsand plumb it through all call sites (CLI + Tauri background). - Update event filtering to apply longest-prefix ignore/include precedence (include can override ignore for nested paths) and add a regression test.
- Improve logs to surface include-path configuration/counts during background startup/config changes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| was/src/main.rs | Updates watcher spawn call to pass the new include_paths argument. |
| lsf/src/main.rs | Passes cache include-paths into the event watcher (initial + respawn). |
| cardinal/src-tauri/src/lib.rs | Passes include-paths into the watcher and logs include-path count on startup. |
| cardinal/src-tauri/src/background.rs | Propagates include-paths into watcher spawns and updates watch-config logs/comments. |
| cardinal-sdk/src/event_stream.rs | Adds include-path support to EventWatcher::spawn and implements ignore/include-aware filtering with tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -170,6 +170,7 @@ impl EventWatcher { | |||
| since_event_id: FSEventStreamEventId, | |||
| latency: f64, | |||
| ignore_paths: Box<[PathBuf]>, | |||
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.