[fix] Preserve agent drafts during version restores - #6564
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mmabrouk
marked this pull request as ready for review
September 5, 2026 07:02
Contributor
Railway Preview Environment
|
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.
Context
Reverting an agent version while auto-save was busy could replace the active draft and then roll it back, while a deferred save still held the revert message. A rejected revert could also erase edits made while its request was pending. These paths are new with the version-history feature in release v0.114.8.
Changes
Reject busy reverts before staging configuration and prevent deferred flushes from keeping a revert message. After a failed request, restore the prior draft only when the user has not edited it in the meantime.
Include schemas when deciding whether a historical version differs from the latest, and explicitly clear schemas when the selected version has none. The failure message now asks the user to retry after saving finishes instead of asserting that the server rejected the commit.
Tests
248 targeted tests passed across run-request assembly, auto-save/revert, revision ordering, build-kit persistence, configuration diffs and sidebar ordering. Four concurrency regression cases failed before the relevant guards and passed afterward. Scoped frontend lint, formatting and shared UI TypeScript checks passed. Independent code review found no introduced correctness issue.
Live desktop/mobile validation and the session continuity smoke are outstanding: the release PR preview currently returns Application not found, and the available stages run other versions. No live sandbox validation is claimed.
What to QA
Prepared by the AI agent for release PR #6526. This PR does not change the runner, Daytona, sandbox lifecycle or chat transport.