From ec5c3c32cd2acaec16f0b6b26d2f0e6bb3030e3c 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 cfc5f81af0f7147119c05aaf770ac51de6c67e69..f4d0dcd0a438c1ea201c1ae15e7d830c0abfd8ac 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); -- 2.54.0