Conversation
|
The following comment was made by an LLM, it may be inaccurate: The search found one potentially related PR: fix(watcher): filter ignored paths before publishing events, handle worktree git dirs - This PR also addresses watcher path handling, though it focuses on filtering ignored paths and handling git worktree directories rather than normalizing Windows path separators. It could be related depending on whether there's overlap in the watcher path processing logic. However, this appears to be a different issue (PR #21453 is about filtering ignored paths, while PR #24341 is about normalizing path separators on Windows). No other duplicate PRs found addressing the same issue #17780 or the same path normalization problem. |
|
#21453 is related to watcher processing, but it addresses a different layer:
So the two changes should be complementary rather than duplicates. |
Issue for this PR
Closes #17780
Type of change
What does this PR do?
Watcher events on Windows can arrive with backslash-separated paths while open tabs and cached file tree entries are keyed with forward slashes. This normalizes watcher-side paths before matching open files or loaded file tree nodes. It also refreshes the nearest loaded ancestor for
add/unlinkevents so changes under unloaded child directories still update the visible tree.This intentionally keeps the fix scoped to the watcher invalidation path rather than changing general path normalization behavior.
How did you verify your code works?
bun test --preload ./happydom.ts ./src/context/file/watcher.test.tsfrompackages/appbun test --preload ./happydom.ts ./src/context/file/path.test.ts ./src/context/file/watcher.test.tsfrompackages/appbun typecheckfrompackages/appbun turbo typecheckScreenshots / recordings
N/A, non-UI change.
Checklist