From 04780632e8edb9244df73be9ae6fb6a3b6b30a9d Mon Sep 17 00:00:00 2001 From: Developer Date: Sun, 15 Feb 2026 12:50:56 +0000 Subject: [PATCH] fix: show undo/redo buttons when server restart error occurs --- chat/public/builder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chat/public/builder.js b/chat/public/builder.js index 92540cc..a7190f1 100644 --- a/chat/public/builder.js +++ b/chat/public/builder.js @@ -1984,7 +1984,8 @@ function renderMessages(session) { const isOpencodeMsg = msg.cli === 'opencode' || msg.phase === 'build'; const isLatestMessage = latestMessage && latestMessage.id === msg.id; - const shouldShowUndoRedo = isOpencodeMsg && isLatestMessage && (status === 'done' || status === 'error' || status === 'cancelled'); + const isServerRestartError = msg.error === 'Server restart took too long. Please refresh and try again.'; + const shouldShowUndoRedo = isLatestMessage && (status === 'done' || status === 'error' || status === 'cancelled') && (isOpencodeMsg || isServerRestartError); const shouldRenderAssistantCard = msg.reply || msg.error || (status === 'running' && msg.partialOutput) || shouldShowUndoRedo; if (shouldRenderAssistantCard) {