From d35ca869ecfbb467dfadc54b39ecfcaeff26349d Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Feb 2026 00:29:42 -0800 Subject: [PATCH] Prompt before reverting thread checkpoint - Add a confirmation dialog before checkpoint revert - Warn that newer messages and turn diffs will be discarded - Cancel revert when the user does not confirm --- apps/web/src/components/ChatView.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index cfc5f81af0..f4d0dcd0a4 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1533,6 +1533,16 @@ export default function ChatView() { setThreadError(activeThread.id, "Interrupt the current turn before reverting checkpoints."); return; } + const confirmed = await api.dialogs.confirm( + [ + `Revert this thread to checkpoint ${turnCount}?`, + "This will discard newer messages and turn diffs in this thread.", + "This action cannot be undone.", + ].join("\n"), + ); + if (!confirmed) { + return; + } setIsRevertingCheckpoint(true); setThreadError(activeThread.id, null);