Skip to content

Compare local vs remote Gist before upload | Show diff preview (#508)#1467

Open
yanrongfei wants to merge 1 commit into
shanalikhan:masterfrom
yanrongfei:feature/issue-508-show-diff-before-upload
Open

Compare local vs remote Gist before upload | Show diff preview (#508)#1467
yanrongfei wants to merge 1 commit into
shanalikhan:masterfrom
yanrongfei:feature/issue-508-show-diff-before-upload

Conversation

@yanrongfei

Copy link
Copy Markdown

Summary

Fixes #508 — Compare local and remote Gist settings before upload; show diff preview and only upload changed files.

Changes

  • Before uploading: fetch the remote Gist and compare each local file's content with the remote Gist file
  • Diff preview: show a dedicated Output Channel listing changed files (with local/remote line counts) and unchanged files
  • User confirmation: display a dialog "Code Settings Sync: Changes detected. Do you want to upload?" with Upload/Cancel buttons
  • Summary output: shows only the files that actually changed (not all files)
  • cloudSettings is always treated as changed (its timestamp is updated on every upload)
  • Graceful fallback: on first upload (no remote Gist yet) or errors, all files are still uploaded as before

Testing

  1. Make a small change to one settings file (e.g. settings.json)
  2. Run the upload command
  3. Verify the diff preview shows only the changed file
  4. Confirm the upload and check the summary matches

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.

1 participant