From 5b11885afb56b979165dbfd356abfed01cf5e994 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 14 Oct 2025 07:16:17 +0000 Subject: [PATCH 1/3] fix: show message instead of empty popover for current checkpoint restore button - Added message display when trying to restore the current checkpoint - Fixed empty popover issue reported in #8646 - Added 'alreadyCurrent' translation key to English locale --- .../chat/checkpoints/CheckpointMenu.tsx | 98 ++++++++++--------- webview-ui/src/i18n/locales/en/chat.json | 3 +- 2 files changed, 52 insertions(+), 49 deletions(-) diff --git a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx index d2fb8606681d..c4e2f63c150a 100644 --- a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx +++ b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx @@ -88,59 +88,61 @@ export const CheckpointMenu = ({
- {!isCurrent && ( -
- -
- {t("chat:checkpoint.menu.restoreFilesDescription")} + {isCurrent ? ( +
{t("chat:checkpoint.menu.alreadyCurrent")}
+ ) : ( + <> +
+ +
+ {t("chat:checkpoint.menu.restoreFilesDescription")} +
-
- )} - {!isCurrent && ( -
- {!isConfirming ? ( - - ) : ( - <> +
+ {!isConfirming ? ( - - - )} - {isConfirming ? ( -
- {t("chat:checkpoint.menu.cannotUndo")} -
- ) : ( -
- {t("chat:checkpoint.menu.restoreFilesAndTaskDescription")} -
- )} + ) : ( + <> + + + + )} + {isConfirming ? ( +
+ {t("chat:checkpoint.menu.cannotUndo")} +
+ ) : ( +
+ {t("chat:checkpoint.menu.restoreFilesAndTaskDescription")} +
+ )} +
-
+ )}
diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index 9ab37b11497a..4527e61ad204 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -161,7 +161,8 @@ "confirm": "Confirm", "cancel": "Cancel", "cannotUndo": "This action cannot be undone.", - "restoreFilesAndTaskDescription": "Restores your project's files back to a snapshot taken at this point and deletes all messages after this point." + "restoreFilesAndTaskDescription": "Restores your project's files back to a snapshot taken at this point and deletes all messages after this point.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Current" }, From 6646f2b25433f3ef1fdce57a8bb7038a2859527a Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 14 Oct 2025 07:20:06 +0000 Subject: [PATCH 2/3] fix: remove duplicate nested div wrapper in CheckpointMenu component --- .../chat/checkpoints/CheckpointMenu.tsx | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx index c4e2f63c150a..aaeb5a43ff97 100644 --- a/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx +++ b/webview-ui/src/components/chat/checkpoints/CheckpointMenu.tsx @@ -101,46 +101,44 @@ export const CheckpointMenu = ({
-
- {!isConfirming ? ( + {!isConfirming ? ( + + ) : ( + <> - ) : ( - <> - - - - )} - {isConfirming ? ( -
- {t("chat:checkpoint.menu.cannotUndo")} -
- ) : ( -
- {t("chat:checkpoint.menu.restoreFilesAndTaskDescription")} -
- )} -
+ + + )} + {isConfirming ? ( +
+ {t("chat:checkpoint.menu.cannotUndo")} +
+ ) : ( +
+ {t("chat:checkpoint.menu.restoreFilesAndTaskDescription")} +
+ )}
)} From 8ed8186a89804a8109f75659eb4e46b987dd358a Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 14 Oct 2025 07:22:52 +0000 Subject: [PATCH 3/3] fix: add missing 'alreadyCurrent' translation key to all locale files --- webview-ui/src/i18n/locales/ca/chat.json | 3 ++- webview-ui/src/i18n/locales/de/chat.json | 3 ++- webview-ui/src/i18n/locales/es/chat.json | 3 ++- webview-ui/src/i18n/locales/fr/chat.json | 3 ++- webview-ui/src/i18n/locales/hi/chat.json | 3 ++- webview-ui/src/i18n/locales/id/chat.json | 3 ++- webview-ui/src/i18n/locales/it/chat.json | 3 ++- webview-ui/src/i18n/locales/ja/chat.json | 3 ++- webview-ui/src/i18n/locales/ko/chat.json | 3 ++- webview-ui/src/i18n/locales/nl/chat.json | 3 ++- webview-ui/src/i18n/locales/pl/chat.json | 3 ++- webview-ui/src/i18n/locales/pt-BR/chat.json | 3 ++- webview-ui/src/i18n/locales/ru/chat.json | 3 ++- webview-ui/src/i18n/locales/tr/chat.json | 3 ++- webview-ui/src/i18n/locales/vi/chat.json | 3 ++- webview-ui/src/i18n/locales/zh-CN/chat.json | 3 ++- webview-ui/src/i18n/locales/zh-TW/chat.json | 3 ++- 17 files changed, 34 insertions(+), 17 deletions(-) diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 4d392ee3bf68..f0d3580b89fd 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -155,7 +155,8 @@ "confirm": "Confirmar", "cancel": "Cancel·lar", "cannotUndo": "Aquesta acció no es pot desfer.", - "restoreFilesAndTaskDescription": "Restaura els arxius del teu projecte a una instantània presa en aquest punt i elimina tots els missatges posteriors a aquest punt." + "restoreFilesAndTaskDescription": "Restaura els arxius del teu projecte a una instantània presa en aquest punt i elimina tots els missatges posteriors a aquest punt.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Actual" }, diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 65934ab5a29c..caca117aa67e 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -155,7 +155,8 @@ "confirm": "Bestätigen", "cancel": "Abbrechen", "cannotUndo": "Diese Aktion kann nicht rückgängig gemacht werden.", - "restoreFilesAndTaskDescription": "Stellt die Dateien deines Projekts auf einen Snapshot zurück, der an diesem Punkt erstellt wurde, und löscht alle Nachrichten nach diesem Punkt." + "restoreFilesAndTaskDescription": "Stellt die Dateien deines Projekts auf einen Snapshot zurück, der an diesem Punkt erstellt wurde, und löscht alle Nachrichten nach diesem Punkt.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Aktuell" }, diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index 30693285db2e..19dd9316421f 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -155,7 +155,8 @@ "confirm": "Confirmar", "cancel": "Cancelar", "cannotUndo": "Esta acción no se puede deshacer.", - "restoreFilesAndTaskDescription": "Restaura los archivos de tu proyecto a una instantánea tomada en este punto y elimina todos los mensajes posteriores a este punto." + "restoreFilesAndTaskDescription": "Restaura los archivos de tu proyecto a una instantánea tomada en este punto y elimina todos los mensajes posteriores a este punto.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Actual" }, diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index d5dae24a7913..aae73951e170 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -155,7 +155,8 @@ "confirm": "Confirmer", "cancel": "Annuler", "cannotUndo": "Cette action ne peut pas être annulée.", - "restoreFilesAndTaskDescription": "Restaure les fichiers de votre projet à un instantané pris à ce moment et supprime tous les messages après ce point." + "restoreFilesAndTaskDescription": "Restaure les fichiers de votre projet à un instantané pris à ce moment et supprime tous les messages après ce point.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Actuel" }, diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index 0ec9cd7c7e93..e343c858aa60 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -155,7 +155,8 @@ "confirm": "पुष्टि करें", "cancel": "रद्द करें", "cannotUndo": "इस क्रिया को पूर्ववत नहीं किया जा सकता।", - "restoreFilesAndTaskDescription": "आपके प्रोजेक्ट की फ़ाइलों को इस बिंदु पर लिए गए स्नैपशॉट पर पुनर्स्थापित करता है और इस बिंदु के बाद के सभी संदेशों को हटा देता है।" + "restoreFilesAndTaskDescription": "आपके प्रोजेक्ट की फ़ाइलों को इस बिंदु पर लिए गए स्नैपशॉट पर पुनर्स्थापित करता है और इस बिंदु के बाद के सभी संदेशों को हटा देता है।", + "alreadyCurrent": "This checkpoint is already current" }, "current": "वर्तमान" }, diff --git a/webview-ui/src/i18n/locales/id/chat.json b/webview-ui/src/i18n/locales/id/chat.json index a2c5377691e9..379033a0fcd6 100644 --- a/webview-ui/src/i18n/locales/id/chat.json +++ b/webview-ui/src/i18n/locales/id/chat.json @@ -164,7 +164,8 @@ "confirm": "Konfirmasi", "cancel": "Batal", "cannotUndo": "Aksi ini tidak dapat dibatalkan.", - "restoreFilesAndTaskDescription": "Mengembalikan file proyek kamu ke snapshot yang diambil pada titik ini dan menghapus semua pesan setelah titik ini." + "restoreFilesAndTaskDescription": "Mengembalikan file proyek kamu ke snapshot yang diambil pada titik ini dan menghapus semua pesan setelah titik ini.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Saat Ini" }, diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index a176be1f2fb6..2a13f1ce2d77 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -158,7 +158,8 @@ "confirm": "Conferma", "cancel": "Annulla", "cannotUndo": "Questa azione non può essere annullata.", - "restoreFilesAndTaskDescription": "Ripristina i file del tuo progetto a uno snapshot catturato in questo punto ed elimina tutti i messaggi successivi a questo punto." + "restoreFilesAndTaskDescription": "Ripristina i file del tuo progetto a uno snapshot catturato in questo punto ed elimina tutti i messaggi successivi a questo punto.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Corrente" }, diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 0e940b17ecac..bc9f54c4e4b9 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -155,7 +155,8 @@ "confirm": "確認", "cancel": "キャンセル", "cannotUndo": "このアクションは元に戻せません。", - "restoreFilesAndTaskDescription": "この時点で撮影されたスナップショットにプロジェクトのファイルを復元し、この時点以降のすべてのメッセージを削除します。" + "restoreFilesAndTaskDescription": "この時点で撮影されたスナップショットにプロジェクトのファイルを復元し、この時点以降のすべてのメッセージを削除します。", + "alreadyCurrent": "This checkpoint is already current" }, "current": "現在" }, diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index 6fa7c5692ac6..199135aa503c 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -155,7 +155,8 @@ "confirm": "확인", "cancel": "취소", "cannotUndo": "이 작업은 취소할 수 없습니다.", - "restoreFilesAndTaskDescription": "프로젝트 파일을 이 시점에 찍힌 스냅샷으로 복원하고 이 지점 이후의 모든 메시지를 삭제합니다." + "restoreFilesAndTaskDescription": "프로젝트 파일을 이 시점에 찍힌 스냅샷으로 복원하고 이 지점 이후의 모든 메시지를 삭제합니다.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "현재" }, diff --git a/webview-ui/src/i18n/locales/nl/chat.json b/webview-ui/src/i18n/locales/nl/chat.json index 2be312228d27..61e05f620fe2 100644 --- a/webview-ui/src/i18n/locales/nl/chat.json +++ b/webview-ui/src/i18n/locales/nl/chat.json @@ -150,7 +150,8 @@ "confirm": "Bevestigen", "cancel": "Annuleren", "cannotUndo": "Deze actie kan niet ongedaan worden gemaakt.", - "restoreFilesAndTaskDescription": "Herstelt de bestanden van je project naar een momentopname die op dit punt is gemaakt en verwijdert alle berichten na dit punt." + "restoreFilesAndTaskDescription": "Herstelt de bestanden van je project naar een momentopname die op dit punt is gemaakt en verwijdert alle berichten na dit punt.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Huidig" }, diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index e60ec330db23..2e74345f6f92 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -155,7 +155,8 @@ "confirm": "Potwierdź", "cancel": "Anuluj", "cannotUndo": "Tej akcji nie można cofnąć.", - "restoreFilesAndTaskDescription": "Przywraca pliki Twojego projektu do zrzutu wykonanego w tym punkcie i usuwa wszystkie wiadomości po tym punkcie." + "restoreFilesAndTaskDescription": "Przywraca pliki Twojego projektu do zrzutu wykonanego w tym punkcie i usuwa wszystkie wiadomości po tym punkcie.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Bieżący" }, diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 3408f3a1aa91..d3d953931a57 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -155,7 +155,8 @@ "confirm": "Confirmar", "cancel": "Cancelar", "cannotUndo": "Esta ação não pode ser desfeita.", - "restoreFilesAndTaskDescription": "Restaura os arquivos do seu projeto para um snapshot feito neste ponto e exclui todas as mensagens após este ponto." + "restoreFilesAndTaskDescription": "Restaura os arquivos do seu projeto para um snapshot feito neste ponto e exclui todas as mensagens após este ponto.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Atual" }, diff --git a/webview-ui/src/i18n/locales/ru/chat.json b/webview-ui/src/i18n/locales/ru/chat.json index 5018f817aff5..248e8dad6302 100644 --- a/webview-ui/src/i18n/locales/ru/chat.json +++ b/webview-ui/src/i18n/locales/ru/chat.json @@ -150,7 +150,8 @@ "confirm": "Подтвердить", "cancel": "Отмена", "cannotUndo": "Это действие нельзя отменить.", - "restoreFilesAndTaskDescription": "Восстанавливает файлы проекта до состояния на момент этой точки и удаляет все сообщения после нее." + "restoreFilesAndTaskDescription": "Восстанавливает файлы проекта до состояния на момент этой точки и удаляет все сообщения после нее.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Текущая" }, diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index 2290a85f6dfe..832b7f517131 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -155,7 +155,8 @@ "confirm": "Onayla", "cancel": "İptal", "cannotUndo": "Bu işlem geri alınamaz.", - "restoreFilesAndTaskDescription": "Projenizin dosyalarını bu noktada alınan bir anlık görüntüye geri yükler ve bu noktadan sonraki tüm mesajları siler." + "restoreFilesAndTaskDescription": "Projenizin dosyalarını bu noktada alınan bir anlık görüntüye geri yükler ve bu noktadan sonraki tüm mesajları siler.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Mevcut" }, diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index d9362ea39dde..f7eae9f975de 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -155,7 +155,8 @@ "confirm": "Xác nhận", "cancel": "Hủy", "cannotUndo": "Hành động này không thể hoàn tác.", - "restoreFilesAndTaskDescription": "Khôi phục các tệp dự án của bạn về bản chụp được thực hiện tại thời điểm này và xóa tất cả tin nhắn sau điểm này." + "restoreFilesAndTaskDescription": "Khôi phục các tệp dự án của bạn về bản chụp được thực hiện tại thời điểm này và xóa tất cả tin nhắn sau điểm này.", + "alreadyCurrent": "This checkpoint is already current" }, "current": "Hiện tại" }, diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index 850f79e63038..63ff5192fba0 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -155,7 +155,8 @@ "confirm": "确认", "cancel": "取消", "cannotUndo": "此操作无法撤消。", - "restoreFilesAndTaskDescription": "恢复文件至此时状态,并清除后续对话记录" + "restoreFilesAndTaskDescription": "恢复文件至此时状态,并清除后续对话记录", + "alreadyCurrent": "This checkpoint is already current" }, "current": "当前" }, diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index 715452977af5..839c72dd4882 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -161,7 +161,8 @@ "confirm": "確認", "cancel": "取消", "cannotUndo": "此操作無法復原。", - "restoreFilesAndTaskDescription": "將您的專案檔案還原到此時的快照,並刪除此點之後的所有訊息。" + "restoreFilesAndTaskDescription": "將您的專案檔案還原到此時的快照,並刪除此點之後的所有訊息。", + "alreadyCurrent": "This checkpoint is already current" }, "current": "目前" },