Skip to content

Change how file sync's are ended, and add icons to indicate files that are synced#65

Merged
Rider-Linden merged 10 commits into
secondlife:developfrom
WolfGangS:wolfgang/file-link
Apr 30, 2026
Merged

Change how file sync's are ended, and add icons to indicate files that are synced#65
Rider-Linden merged 10 commits into
secondlife:developfrom
WolfGangS:wolfgang/file-link

Conversation

@WolfGangS
Copy link
Copy Markdown
Contributor

This change alters when file syncs are "closed".

They are now only closed when either

  • The user specifically stops a files sync via context menu.
  • The script editor in sl is closed
  • The temp file for the script is removed from disk

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

image

Context menus

File Explorer

image

File Tab

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 FileDecorationProvider to mark synced master files with a link badge.
  • Change SynchService sync 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.

Comment thread src/scriptsync.ts
Comment thread src/extension.ts Outdated
Comment thread src/synchservice.ts Outdated
Comment thread src/synchservice.ts Outdated
Comment thread package.json
Comment thread src/vscode/SyncedFileDecorator.ts Outdated
Comment thread src/vscode/SyncedFileDecorator.ts Outdated
Comment thread src/synchservice.ts
Comment thread src/synchservice.ts Outdated
@Rider-Linden Rider-Linden merged commit 475f12c into secondlife:develop Apr 30, 2026
4 checks passed
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.

3 participants