Skip to content

fix: explain file checkpoints require Git in revert notice - #14464

Merged
marius-kilocode merged 1 commit into
mainfrom
fix-checkpoint-snapshot-creation
Sep 22, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
fix-checkpoint-snapshot-creation

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Reverting a conversation in a folder that is not a Git repository cannot restore workspace files, but the notice only said "No file checkpoint was available". Users could not tell why the restore was skipped.

Why This Change Was Made

Checkpoints are backed by Git. Revert already reported snapshots-disabled when snapshots were turned off, but the non-Git case fell through to the generic unavailable status. This adds a dedicated not-a-git-repo revert status, resolved from the project VCS, so the client can explain the Git requirement instead of guessing.

User Impact

Reverting in a non-Git folder now shows: "Conversation reverted. File checkpoints require a Git repository, so workspace changes were not restored." The message is translated in all supported locales. The "Enable snapshots" action is not offered for this case, because enabling snapshots would not help.

Evidence

Verified in an isolated VS Code dev host against a disposable non-Git workspace: after the agent wrote hello.txt and the user reverted to the message, the new notice appeared and hello.txt stayed on disk.

Revert notice explaining file checkpoints require a Git repository

Automated checks: backend revert test (includes the new non-Git state), extension unit suite, typechecks, lint, knip, and the opencode annotation check all pass.

@kilo-code-bot

kilo-code-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

The change adds a dedicated not-a-git-repo revert status, resolved from ctx.project.vcs, so reverting in a non-Git folder explains the Git requirement instead of falling through to unavailable. I verified the branch ordering (checkpoint → not-a-git-repo → snapshots-disabled → unavailable) preserves existing behavior for Git repos, that the new literal is propagated consistently through Revert.State, Session.Revert, session-import, SessionTable, the generated SDK/client types, the RevertBanner consumer, and all locales, and that the new backend test uses a non-Git tmpdir while the existing snapshots-disabled/unavailable tests use { git: true }, keeping each branch deterministic. No memory-leak or lifecycle concerns: the change adds no listeners, subscriptions, or handles.

Files Reviewed (36 files)
  • .changeset/revert-not-a-git-repo-notice.md
  • packages/client/src/generated/types.ts
  • packages/core/src/session/sql.ts
  • packages/kilo-vscode/tests/unit/revert-checkpoints.test.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/RevertBanner.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/{ar,br,bs,da,de,en,es,fa,fr,it,ja,ko,nl,no,pl,ru,th,tr,uk,zh,zht}.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/sessions.ts
  • packages/opencode/src/kilocode/server/httpapi/groups/session-import.ts
  • packages/opencode/src/session/revert.ts
  • packages/opencode/src/session/session.ts
  • packages/opencode/test/kilocode/session/revert.test.ts
  • packages/schema/src/revert.ts
  • packages/schema/src/v1/session.ts
  • packages/sdk/js/src/v2/gen/sdk.gen.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 8c7babd into main Sep 22, 2026
34 of 35 checks passed
@marius-kilocode
marius-kilocode deleted the fix-checkpoint-snapshot-creation branch September 22, 2026 18:51
hdcodedev pushed a commit to hdcodedev/kilocode that referenced this pull request Sep 25, 2026
…evert

Ports PR Kilo-Org#14464 to the JetBrains plugin. VS Code already differentiated
revert-notice reasons (snapshots disabled, checkpoint unavailable, not a
Git repository), but JetBrains had no workspace status field at all and
always showed a single generic 'Snapshots are off' message regardless of
the actual cause.

- Add workspace to the shared SessionRevertDto and parse/map it in the
  backend CLI data parser and session manager (both the direct decode
  path and the reflective fallback for differently-shaped generated
  models).
- Branch the RevertBanner notice on workspace: hidden when restored,
  a specific message for snapshots-disabled / unavailable /
  not-a-git-repo, and a legacy fallback for older reverts that predate
  this field.
- Add the four new revert.banner.workspace.* bundle keys to the base
  properties file and all locale files, and drop the now-unused
  filesNotRestored key.
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.

2 participants