Skip to content

fix(vscode): persist snapshot setting per project - #13198

Closed
marius-kilocode wants to merge 1 commit into
mainfrom
fresh-couch
Closed

fix(vscode): persist snapshot setting per project#13198
marius-kilocode wants to merge 1 commit into
mainfrom
fresh-couch

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

The Checkpoints setting was saved through the generic config path, but snapshot was not included in the project-scoped key set. As a result, disabling snapshots from Settings wrote snapshot: false to the global config, where a project-level override could take precedence again after restarting VS Code.

Classify snapshot as project-scoped and add a regression test covering the split. This makes the Settings toggle persist in the workspace kilo.jsonc and remain effective across restarts.

Fixes #13134

const PROJECT_SCOPED_KEYS: ReadonlySet<string> = new Set(["commit_message"])
// global one. Settings that are inherently per-repository (e.g. snapshots and
// commit message conventions) belong here so they don't leak across workspaces.
const PROJECT_SCOPED_KEYS: ReadonlySet<string> = new Set(["commit_message", "snapshot"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Consider cleaning up the stale global snapshot value written by the old code path

Users who disabled Checkpoints before this fix already have snapshot: false persisted in their global config. After this change, the Checkpoints toggle only ever writes project scope, so:

  • Re-enabling snapshots in one project writes snapshot: true to that project's config, but the stale global snapshot: false keeps snapshots disabled in every other project.
  • There is no Settings UI path to unset the global key (the toggle now routes exclusively to project scope), so affected users can only fix it per-project or by hand-editing the global config file.

Not blocking — the per-project toggle self-heals each workspace — but you may want to also send a global unset for snapshot when saving the project-scoped value, or do a one-time cleanup on load.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1

The fix is correct: snapshot is a valid top-level config key in the CLI schema (packages/core/src/v1/config/config.ts), is honored by the snapshot service (config.get()).snapshot !== false), is already tracked in the overlay fieldPaths, and the save path (splitConfigByScopehandleUpdateConfigoverlayUpdate with scope "project") routes it to the workspace config file. The regression test exercises the real implementation and the changeset is user-facing. The single suggestion concerns stale global snapshot: false values left behind by the old code path.

Fix these issues in Kilo Cloud

Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/utils/config-scope.ts 6 Stale global snapshot: false from pre-fix saves is never cleaned up and keeps snapshots disabled in other projects, with no UI path to unset it
Files Reviewed (3 files)
  • packages/kilo-vscode/webview-ui/src/utils/config-scope.ts - 1 issue
  • packages/kilo-vscode/tests/unit/config-scope.test.ts - 0 issues
  • .changeset/project-snapshot-settings.md - 0 issues

Reviewed by kimi-k3 · Input: 67.7K · Output: 9K · Cached: 920.7K

Review guidance: REVIEW.md from base branch main

@marius-kilocode

Copy link
Copy Markdown
Collaborator Author

Closing this PR as superseded by #13195. The project-scoped Checkpoints toggle is not the right fix: the normal Settings toggle should retain its existing user/global behavior. #13195 fixes the actual slow-repository popup bug by preserving the project instance context while persisting snapshot: false, without changing the Settings-panel path.

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.

Snapshots cannot be disabled - Disabling Snapshots setting does not persist and snapshots automatically re-enable

1 participant