fix: prevent rejected pending edits from reporting success#12324
Open
danyalahmed1995 wants to merge 1 commit intocontinuedev:mainfrom
Open
fix: prevent rejected pending edits from reporting success#12324danyalahmed1995 wants to merge 1 commit intocontinuedev:mainfrom
danyalahmed1995 wants to merge 1 commit intocontinuedev:mainfrom
Conversation
Fixes continuedev#12269 Prevents rejected pending edit closures from being treated as successful edit applications. Adds focused regression coverage for the false success path.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Fixes #12269
Summary
This PR fixes the pending edit desync case described in the issue.
If a user sends a follow-up while an edit is still pending, the pending diff can be closed without the edit actually being applied. In that case, Continue should not treat the edit as successful, because the file on disk has not changed.
This change carries the accept/reject result through the pending edit flow and only reports edit success when the edit was actually accepted/applied.
Testing
npm.cmd --prefix gui test -- src/redux/thunks/handleApplyStateUpdate.test.tsgit diff --checkNotes
I was not able to run a full live VS Code extension repro in my local setup, so I added focused regression coverage for the false success path.
Summary by cubic
Prevents pending edits that were rejected or auto-closed from being reported as successful by carrying an explicit acceptance flag through the diff flow. Fixes #12269.
acceptedtoApplyStateand propagated it through VS Code diff (processDiff, vertical handler/manager) to webview updates.accepted; only mark a closed edit as successful when it was accepted.handleApplyStateUpdateto requireaccepted(and a non-canceled tool call) before logging success or continuing the flow.Written for commit d395e72. Summary will update on new commits.