Skip to content

feat(settings): add git checkpoint cleanup interval#547

Open
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/add-checkpoint-cleanup-setting
Open

feat(settings): add git checkpoint cleanup interval#547
musnows wants to merge 1 commit into
KunAgent:developfrom
musnows:codex/add-checkpoint-cleanup-setting

Conversation

@musnows

@musnows musnows commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a General settings card for Git checkpoint management with cleanup interval options of 1, 2, 3, 5, and 10 days
  • persist and normalize the new checkpointCleanup.intervalDays setting across main, renderer, and IPC schema validation
  • periodically remove unused Git checkpoint directories from Kun's data directory when no thread data references their workspaceCheckpointId

Changes

  • Cleanup is constrained to <kun dataDir>/git-checkpoints/<checkpointId> directories and skips checkpoint IDs still referenced by thread JSON/JSONL data.
  • Cleanup cadence is tracked in <kun dataDir>/git-checkpoints/.cleanup.json so it does not run on every app launch.
  • settings:set now accepts the new checkpointCleanup payload and rejects unsupported intervals.

Tests

  • npm run test -- src/main/services/git-checkpoint-service.test.ts src/main/settings-store.test.ts
  • npm run test -- src/main/ipc/register-app-ipc-handlers.test.ts src/main/settings-store.test.ts
  • npm run typecheck
  • git diff --check
  • npm run dist:mac:arm64
  • installed /Applications/Kun.app from the arm64 zip and verified http://127.0.0.1:18899/health

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