Skip to content

fix: prevent rejected pending edits from reporting success#12324

Open
danyalahmed1995 wants to merge 1 commit intocontinuedev:mainfrom
danyalahmed1995:fix/issue-12269-pending-edit-followup-desync
Open

fix: prevent rejected pending edits from reporting success#12324
danyalahmed1995 wants to merge 1 commit intocontinuedev:mainfrom
danyalahmed1995:fix/issue-12269-pending-edit-followup-desync

Conversation

@danyalahmed1995
Copy link
Copy Markdown

@danyalahmed1995 danyalahmed1995 commented May 7, 2026

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

  • Ran npm.cmd --prefix gui test -- src/redux/thunks/handleApplyStateUpdate.test.ts
  • Ran git diff --check

Notes

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.

  • Bug Fixes
    • Added accepted to ApplyState and propagated it through VS Code diff (processDiff, vertical handler/manager) to webview updates.
    • Updated GUI session state to store accepted; only mark a closed edit as successful when it was accepted.
    • Adjusted handleApplyStateUpdate to require accepted (and a non-canceled tool call) before logging success or continuing the flow.
    • Added a regression test to ensure rejected closed edits are not treated as successful.

Written for commit d395e72. Summary will update on new commits.

Fixes continuedev#12269

Prevents rejected pending edit closures from being treated as successful edit applications.

Adds focused regression coverage for the false success path.
@danyalahmed1995 danyalahmed1995 requested a review from a team as a code owner May 7, 2026 13:34
@danyalahmed1995 danyalahmed1995 requested review from sestinj and removed request for a team May 7, 2026 13:34
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

@danyalahmed1995
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Responding with a follow-up when AI suggests an edit results in desync

1 participant