firstsun-dev_git-files-sync/tests/services
ClaudiaFang d8e3663b8f perf(delete): batch-commit remote-only file deletion
Follow-up to the push-all batching work: batch-deleting remote-only
files via the sync status panel's checkbox multi-select was still N
separate commits (SyncStatusView.performRemoteDeletion looped
gitService.deleteFile once per file).

- Add optional GitServiceInterface.deleteBatch, mirroring pushBatch.
  GitHub/Gitea implement it via the git blob->tree->commit->ref Data
  API, reusing resolveGitHubStyleBaseTree/resolveBaseTree and
  commitGitHubStyleTree (widened its tree-item sha type to
  string | null -- a null sha removes that path from the resulting
  tree, GitHub's way of expressing a delete at the tree level).
  GitLab implements it via the same Commits API endpoint pushBatch
  already uses, with action: 'delete' entries.
- SyncStatusView.performRemoteDeletion now calls deleteBatch once per
  chunk (MAX_BATCH_PUSH_SIZE, reused from the push work) when the
  provider supports it; a failed chunk marks every path in it as
  failed rather than dropping results silently. The original per-file
  loop is preserved verbatim as performRemoteDeletionSequential, the
  fallback for providers without deleteBatch.

Local deletion is unaffected -- it's a local vault operation, not a
git commit.

Evidence: npx eslint . -> 0 errors; npm run build -> clean;
npx vitest run -> 339/339 passed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 10:24:22 +00:00
..
git-service-base.test.ts perf(push): batch-commit push-all files + SHA-based diffing 2026-07-14 09:58:06 +00:00
gitea-service.test.ts perf(delete): batch-commit remote-only file deletion 2026-07-14 10:24:22 +00:00
github-service.test.ts perf(delete): batch-commit remote-only file deletion 2026-07-14 10:24:22 +00:00
gitlab-service.test.ts perf(delete): batch-commit remote-only file deletion 2026-07-14 10:24:22 +00:00
service-test-helpers.ts fix(sync): clearer branch-not-found errors and connection test 2026-07-05 04:57:47 +00:00