Skip to content

fix(watcher): skip project root when watching files-source dirs#458

Draft
loganj wants to merge 1 commit intomainfrom
fix/watcher-skip-project-root-focus
Draft

fix(watcher): skip project root when watching files-source dirs#458
loganj wants to merge 1 commit intomainfrom
fix/watcher-skip-project-root-focus

Conversation

@loganj
Copy link
Collaborator

@loganj loganj commented Mar 24, 2026

Summary

  • Fixes a bug introduced in fix(watcher): detect file changes for files-type sources and close dead SSE connections #456 where watchProjectSources could add the project root to focusWatched when a type:"files" source has a root-level file (e.g. README.md)
  • filepath.Dir(f) resolves to the project root, which is already shallow-watched by Start() — adding it to focusWatched causes removeFocusWatches to drop that baseline watch, breaking auto-detect for new source directories until server restart

🤖 Generated with Claude Code

Avoid adding the project root to focusWatched when a files-source
entry lives at the root level. The project root is already
shallow-watched by Start(); adding it to focusWatched caused
removeFocusWatches to drop that baseline watch, breaking auto-detect
rescans for new source directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant