Skip to content

AH: show better confirmation when there are edits#323050

Merged
justschen merged 2 commits into
mainfrom
justin/pheromosa
Jun 26, 2026
Merged

AH: show better confirmation when there are edits#323050
justschen merged 2 commits into
mainfrom
justin/pheromosa

Conversation

@justschen

Copy link
Copy Markdown
Collaborator
Screenshot 2026-06-25 at 4 42 24 PM

Copilot AI review requested due to automatic review settings June 25, 2026 23:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 MenuEntryActionViewItem to 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

Comment thread src/vs/workbench/contrib/chat/browser/widget/media/chat.css
Comment thread src/vs/workbench/contrib/chat/browser/widget/media/chat.css

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Low

@justschen justschen marked this pull request as ready for review June 26, 2026 02:49
@justschen justschen enabled auto-merge (squash) June 26, 2026 02:50
@justschen justschen merged commit f13669c into main Jun 26, 2026
29 checks passed
@justschen justschen deleted the justin/pheromosa branch June 26, 2026 03:35
@vs-code-engineering vs-code-engineering Bot added this to the 1.127.0 milestone Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants