fix: explain file checkpoints require Git in revert notice - #14464
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThe change adds a dedicated Files Reviewed (36 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
…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.
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-disabledwhen snapshots were turned off, but the non-Git case fell through to the genericunavailablestatus. This adds a dedicatednot-a-git-reporevert 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.txtand the user reverted to the message, the new notice appeared andhello.txtstayed on disk.Automated checks: backend revert test (includes the new non-Git state), extension unit suite, typechecks, lint, knip, and the opencode annotation check all pass.