Change how file sync's are ended, and add icons to indicate files that are synced#65
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the VS Code extension’s script syncing lifecycle so syncs aren’t automatically ended when the viewer temp file editor tab is closed, and adds UI affordances (decorations + context menu command) to indicate/stop active syncs.
Changes:
- Add a
FileDecorationProviderto mark synced master files with a link badge. - Change
SynchServicesync teardown rules (remove close-document teardown; add explicit “stop sync”, cleanup on viewer unsubscribe/temp deletion; add optional auto-close of viewer temp file when a master is found). - Add a new config key + command/menu contributions for stopping file syncs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscode/SyncedFileDecorator.ts | Adds a file decoration provider to show a “synced” indicator on files. |
| src/synchservice.ts | Refactors sync creation/lookup/cleanup, registers the decorator, adds context key updates, and changes when syncs are removed. |
| src/scriptsync.ts | Adjusts ScriptSync construction and cleanup behavior; adds hasFilesToTrack(). |
| src/interfaces/configinterface.ts | Adds ConfigKey.KeepViewerFileOpen. |
| src/extension.ts | Adds stopFileSync command registration and reorganizes activation code. |
| package.json | Contributes the new command, menus, configuration option, and a color token for synced decoration. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Rider-Linden
approved these changes
Apr 30, 2026
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.
This change alters when file syncs are "closed".
They are now only closed when either
This means you can now close the viewers temp file in the editor without ending the sync.
There is also a config switch to enable automatically closing the temp file if a master file is been found.
Link Icons
Context menus
File Explorer
File Tab