Skip to content

fix(events): respect include paths in event watchers#197

Open
ldm0 wants to merge 1 commit intomasterfrom
events_include_patsh
Open

fix(events): respect include paths in event watchers#197
ldm0 wants to merge 1 commit intomasterfrom
events_include_patsh

Conversation

@ldm0
Copy link
Copy Markdown
Member

@ldm0 ldm0 commented May 2, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::spawn to accept include_paths and 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.

Comment thread cardinal-sdk/src/event_stream.rs
Comment thread cardinal-sdk/src/event_stream.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cardinal-sdk/Cargo.toml
@@ -170,6 +170,7 @@ impl EventWatcher {
since_event_id: FSEventStreamEventId,
latency: f64,
ignore_paths: Box<[PathBuf]>,
Comment thread cardinal-sdk/src/event_stream.rs Outdated
Comment thread cardinal/src-tauri/src/lib.rs Outdated
@ldm0 ldm0 force-pushed the events_include_patsh branch from 8880ed5 to 4906b62 Compare May 3, 2026 04:06
@ldm0 ldm0 force-pushed the events_include_patsh branch from 4906b62 to 98b50b6 Compare May 3, 2026 04:08
@ldm0 ldm0 requested a review from Copilot May 3, 2026 04:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cardinal/src-tauri/src/lib.rs
Comment thread cardinal/src-tauri/src/background.rs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cardinal/src-tauri/src/lib.rs
Comment thread cardinal/src-tauri/src/background.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants