AH: show better confirmation when there are edits#323050
Merged
Merged
Conversation
justschen
commented
Jun 25, 2026
Collaborator
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the “Restore Checkpoint” UX in the Chat widget for agent host sessions by adding an inline confirm/cancel affordance when restoring would discard later edits, instead of relying on a modal confirmation dialog.
Changes:
- Add a custom
MenuEntryActionViewItemto implement an inline “Discard Edits” confirmation state with a cancel affordance. - Update checkpoint rendering to decide when confirmation is needed based on whether agent-host checkpoints contain edits for the target request and later requests.
- Add CSS styling for the new confirming UI state (including reduced-motion behavior).
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/widget/media/chat.css | Styles for the restore-checkpoint inline confirmation UI and reduced-motion fallback. |
| src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.ts | New ActionViewItem implementing inline confirm/cancel behavior for restore checkpoint. |
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Wires the custom ActionViewItem and computes when restore needs confirmation in agent host sessions. |
| src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.ts | Exposes RestoreCheckpointActionId as a constant for reuse when customizing the action view item. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.ts | Refines hasEditsInRequest to only report true when the checkpoint actually has edits. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Low
roblourens
approved these changes
Jun 26, 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.