fix(vscode): preserve revert workspace status - #13104
Merged
Merged
Conversation
johnnyeric
force-pushed
the
johnnyeric/fix-revert-workspace-status
branch
from
August 13, 2026 11:32
533b12f to
b9d800d
Compare
johnnyeric
force-pushed
the
johnnyeric/fix-revert-workspace-status
branch
from
August 13, 2026 11:40
b9d800d to
cb8ee4f
Compare
johnnyeric
marked this pull request as ready for review
August 13, 2026 11:42
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge lgtm — the schema additions match the surrounding conventions ( Files Reviewed (8 files)
Reviewed by kimi-k3 · Input: 211.8K · Output: 7.9K · Cached: 416.4K Review guidance: REVIEW.md from base branch |
chrarnoldus
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #13083
Context
Fresh reverts returned an explicit workspace restoration outcome from the backend, but the follow-up
session.updatedevent encoded through the legacy session contract silently droppedrevert.workspace. VS Code then replaced its current session state with that stripped event and displayed the fallback for an earlier/legacy revert.This preserves the actual restoration outcome so current reverts are no longer misclassified.
Implementation
Add the optional
workspacerestoration outcome to both current and V1 revert schemas, regenerate the affected API/client types, and add focused encoding and generated-contract regressions. The snapshot implementation is intentionally unchanged because direct fresh-file restoration already passes and is separate from the confirmed serialization defect.Screenshots / Video
Before
After
How to Test
Manual/local verification
Agent-executed:
bun test test/legacy-event.test.ts test/revert.test.tsinpackages/schema— 4 passedbun test tests/unit/revert-checkpoints.test.tsinpackages/kilo-vscode— 7 passedReviewer test steps
bun run extension:isolated:clean -- <test-folder>.workspace.Blocked checks and substitute verification
Checklist