Skip to content

agent_ui: Improve UX for discarding partial edits#46752

Merged
danilo-leal merged 5 commits intomainfrom
refine_interrupted_edit_ui
Jan 14, 2026
Merged

agent_ui: Improve UX for discarding partial edits#46752
danilo-leal merged 5 commits intomainfrom
refine_interrupted_edit_ui

Conversation

@danilo-leal
Copy link
Member

Builds on top of #46735

This PR refines the design for the discarding partial edits UX. When the user interrupts a generation midway through an edit, the UI will show a knockout warning icon in the file icon as well as a trash icon button to clean up/restore the file to its original content. Then, as soon as you click on that button, the file gets reverted and the button is gone. Here's the result:

Screenshot.2026-01-13.at.9.01.mp4

In the video, I show these scenarios:

  1. Interrupting an edit while there isn't yet a revealed diff: in this case, there's no need to expose a "discard interrupted edits" button; no edits have actually been applied yet
  2. Interrupting an edit midway through it: this is the key UX here, where we want the quick button to revert the file back to the state before the interrupted edit
  3. Trying to perform an edit while with a dirty file: this PR doesn't touch this state but thought of illustrating in the video as an additional error state

Release Notes:

  • Agent: Improved the UX for discarding partial edits by allowing the user to quickly restore the file to its original content.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 14, 2026
@danilo-leal danilo-leal merged commit 1d366b3 into main Jan 14, 2026
25 checks passed
@danilo-leal danilo-leal deleted the refine_interrupted_edit_ui branch January 14, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant