This commit consolidates several improvements to satisfy SonarCloud Quality Gate and enhance the overall plugin stability:
- Code Quality & Refactoring:
- Reduced duplication to 0% by refactoring SyncManager and SyncStatusView.
- Implemented centralized 'processBatch' logic for multi-file sync operations.
- Fixed security hotspots by replacing legacy atob/btoa with Buffer.
- Added memory safety limits to the diff algorithm to prevent DoS.
- Test Coverage & Reliability:
- Improved SyncManager coverage to 81.8% and GitignoreManager to 92.8%.
- Added comprehensive unit tests for batch operations and complex .gitignore patterns.
- Resolved all ESLint 'unsafe-member-access' and 'unbound-method' warnings in tests.
- Infrastructure & Metadata:
- Consolidated GitHub Actions into a single optimized 'ci.yml' using latest versions (v6-v8).
- Synchronized manifest.json and versions.json to v1.1.0.
- Fixed workflow permission issues identified by CodeQL.
- Implement conflict detection in pushFile and pullFile using SHA comparison.
- Use SyncConflictModal to prompt users for manual resolution ('Use local' or 'Use remote').
- Added unit tests in sync-manager.test.ts to verify conflict handling logic.
- Fixed linting issues related to unhandled promises and mock type safety.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>