Skip to content
TypeScript

fix(web): Edit from here warns that "Revert files too" also undoes your own edits (#19775)

shivam7116325f03ad
diff --git a/apps/web/src/components/chat/ChatOverlayHosts.tsx b/apps/web/src/components/chat/ChatOverlayHosts.tsx
index 94dad6e78f9..f2ff3b83a9c 100644
--- a/apps/web/src/components/chat/ChatOverlayHosts.tsx
+++ b/apps/web/src/components/chat/ChatOverlayHosts.tsx
@@ -213,11 +213,12 @@ export function RevertConfirmHost(props: {
<AlertDialogTitle>Edit from here?</AlertDialogTitle>
<AlertDialogDescription>
Rewind chat to before this message. Your prompt and attachments return to the composer.
+ “Revert files too” also undoes your own edits.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogClose render={<Button variant="outline" />}>Cancel</AlertDialogClose>
- <Button variant="destructive" onClick={() => confirm(true)}>
+ <Button variant="destructive-outline" onClick={() => confirm(true)}>
Revert files too
</Button>
<Button onClick={() => confirm(false)}>Revert and keep changes</Button>
diff --git a/docs/user/composer.md b/docs/user/composer.md
index 66be9fe4357..39eb55a8c28 100644
--- a/docs/user/composer.md
+++ b/docs/user/composer.md
@@ -149,7 +149,8 @@ into a normal draft.
On web and desktop, choose **Edit from here** beneath a sent message to rewind
the conversation to before that message. Choose **Revert and keep changes** to
-leave workspace files as they are, or **Revert files too** to restore them as well.
+leave workspace files as they are, or **Revert files too** to put the workspace back
+to its checkpoint from before that message. That also undoes edits you made yourself.
File restore is only offered for threads running in a worktree, and it is
refused when another thread or agent session also uses that directory, a folder
inside it, or a folder that contains it, since