From 7d3400ecee118b1ee083d9bb7e5870fe58cdef6f Mon Sep 17 00:00:00 2001
From: Jeff Agapitos <233853744+jeffa-block@users.noreply.github.com>
Date: Sat, 4 Apr 2026 13:53:25 +1100
Subject: [PATCH] feat: add retry and new session buttons to disconnect error
screen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Replace the single 'Go home' button on the Failed to Load Session
screen with:
- 'Retry connection' — clears the error and re-triggers session load
- 'New session' — navigates to hub to start fresh
- Session ID display (selectable) for context recovery
The retry works by adding a retryCount state to useChatStream that
is included in the session load effect's dependency array. Incrementing
it re-runs the effect, which calls resumeAgent again.
---
ui/desktop/src/components/BaseChat.tsx | 32 ++++++++++++++++++--------
ui/desktop/src/hooks/useChatStream.ts | 13 +++++++++--
2 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/ui/desktop/src/components/BaseChat.tsx b/ui/desktop/src/components/BaseChat.tsx
index 6ab1a9c4b065..05e7b5c2c892 100644
--- a/ui/desktop/src/components/BaseChat.tsx
+++ b/ui/desktop/src/components/BaseChat.tsx
@@ -92,6 +92,7 @@ export default function BaseChat({
submitElicitationResponse,
stopStreaming,
sessionLoadError,
+ retrySessionLoad,
setRecipeUserParams,
tokenState,
notifications: toolCallNotifications,
@@ -350,19 +351,30 @@ export default function BaseChat({
{renderHeader && renderHeader()}