Removes the eslint-disable comment and uses the standard setTimeout
which is properly typed in the DOM lib and satisfies the obsidianmd
lint rule requiring window-prefixed timer functions to use bare form.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract adapter variable and loadWith() helper in gitignore hidden-file tests
- Hoist shared ArrayBuffer constants in path.test.ts
Reduces new_duplicated_lines_density from ~78%/46% to near 0%.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move repeated beforeEach mock initialization into createSyncManagerMocks()
helper to eliminate ~45 lines of copy-paste across binary and hidden test files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use FileSystemAdapter.list() recursively to discover hidden files (e.g. .claude)
- Fix ensureParentDirs to use adapter.mkdir() for hidden directory creation
- Expand BINARY_EXTENSIONS with modern image, audio, video, archive, and design formats
- Exclude .agents/** from ESLint to prevent project-service parse errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move contentsEqual to src/utils/path.ts (shared by sync-manager + SyncStatusView)
- Replace private isBinary in both files with isBinaryPath from path.ts
- Extract fileItemCallbacks() in SyncStatusView to remove duplicate callback objects
- Create tests/services/service-test-helpers.ts with shared testConnection,
getRepoGitignores, getFile error handling, getLastRequestCall helpers
- Refactor github/gitlab service tests to use shared helpers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jsdom v29 uses exports field for types, incompatible with moduleResolution
"node" in CI — adding @types/jsdom provides standalone type declarations.
Cast el to HTMLInputElement directly instead of instanceof window.HTMLInputElement
to avoid unresolvable type narrowing across jsdom window context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Render checked files incrementally below progress bar during refresh
- Progress bar now shows X/Y count and percentage
- Remove fileStatus.file guard from push/remove for unsynced files
- Fix canPush/canDelete in action bar to include hidden (string-path) files
- Fix lint: use pre-declared vi.fn() to avoid unbound-method errors
- Fix test import path and mockSettings typing for sync-manager-mapping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds comprehensive UI component test coverage with 54 new test cases across three components to close issue #23. Includes JSDOM setup polyfills and tooltip mock utilities for DOM-dependent component testing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: use shared obsidian plugin workflow and update obsidian version
* Add quality gate status badge to README
Added a quality gate status badge to the README.
* refactor: address SonarCloud issues and reduce code duplication
---------
Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
* chore: update GitHub Actions to latest versions and increase test coverage for batch operations
* fix: resolve linting errors in batch tests
* chore: consolidate GitHub workflows into unified ci.yml and allow sonar failure
* fix: include missing test coverage and logic improvements
---------
Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
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.