Skip to content

fix(app): normalize watcher paths on Windows - #17794

Closed
jb-sk wants to merge 4 commits into
anomalyco:devfrom
jb-sk:fix/windows-file-watcher-17780
Closed

jb-sk wants to merge 4 commits into
anomalyco:devfrom
jb-sk:fix/windows-file-watcher-17780

Conversation

@jb-sk

@jb-sk jb-sk commented Mar 16, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #17780

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Watcher updates on Windows could miss open tabs and cached files because normalized paths kept backslashes while the app compared forward-slash paths. This change normalizes watcher paths to forward slashes and refreshes the nearest loaded ancestor directory for add and unlink events inside unloaded subdirectories.

How did you verify your code works?

Ran bun test --preload ./happydom.ts ./src/context/file/path.test.ts ./src/context/file/watcher.test.ts in packages/app.

Screenshots / recordings

Not included. This is not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Use forward slashes for normalized watcher paths so Windows file updates match open tabs and cached files consistently. Also refresh the nearest loaded ancestor for add and unlink events inside unloaded directories.
@jb-sk
jb-sk requested a review from adamdotdevin as a code owner March 16, 2026 12:36
jb-sk added 3 commits March 16, 2026 22:09
Normalize backslashes in file search queries so Windows @mention lookups match forward-slash indexed paths. This keeps the watcher path fix from breaking the prompt mention autocomplete on Windows.
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.

Bug: file watcher paths stop matching open files on Windows

1 participant