feat(files-changed): externalFileStatus overrides for in-project + cross-project deletions (#844) - #307
Merged
Conversation
…oss-project deletions (#844) The filesystem watcher detects external deletions but previously only tracked them for cross-project files. In-project files trusted the server refetch, which didn't always clear the entry (snapshot-based diff still returns the file as 'added'). - Rename crossProjectStatus → externalFileStatus on MergeOpts - Apply the override to normalizedServerDiffs (not just cross-project tool diffs), so in-project files returned by the server get their status overridden when the watcher says they're deleted - Remove the projectPrefix guard in onFsDiffInvalidate so deletion tracking applies to all watched files - Add watch-files sender effect and externalFileStatus signal - 5 new tests covering both in-project and cross-project overrides
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When the filesystem watcher detects an external deletion, the status override now applies to all watched files — not just cross-project ones. Previously, in-project files relied solely on the server refetch, which didn't always clear the entry (the snapshot-based diff still returned the file as
added). This caused deleted files to persist in Files Changed and to be resurrectable via save.Changes
externalFileStatustoMergeOpts. Apply the override tonormalizedServerDiffs(not just cross-project tool diffs), so in-project files returned by the server get their status overridden when the watcher says they are deleted.externalFileStatussignal,onFsDiffInvalidatehandler (noprojectPrefixguard),watch-filessender effect, and passexternalFileStatus()to the merge.Testing
Companion: harmoniqs/amicode#845