fix(local-replica): Addresses the external-file-change regression described in #396. - #398
Open
Heinz217 wants to merge 1 commit into
Open
Conversation
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.
Changes
overleaf-workshop.localReplica.syncOnFileChange.enabled.localWatcher.onDidChangeto detect modifications made by external tools.Rationale
Commit
debdcb5replaced file-system change events withonDidSaveTextDocumentto prevent unwanted synchronization caused by Git operations and build tools (#299 and #323).However, changes made outside the VS Code editor, such as edits from scripts or AI coding tools, no longer produce an editor-save event and therefore are not uploaded.
This change provides an explicit opt-in for users who need external-file synchronization while preserving the current safer behavior by default. When the option is enabled, changes made by Git or build tools may also be synchronized.
This PR only restores the missing external-file-change trigger. It does not change the
bypassCache, OT conflict handling, or merge implementation. The Windows path comparison handled separately by #397 is also outside the scope of this PR.Testing
npm run compile— passednpm run lint— passed with two pre-existing warningsgit diff --check— passed