From b74d45c62148e1c9e944bcd0f215243786963365 Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Tue, 3 Mar 2026 09:28:17 +0800 Subject: [PATCH] fix: keep terminal route mounted across page switches Keep the Terminal component mounted and toggle visibility via CSS so tab state and WebSocket sessions persist when navigating between sidebar pages, while preserving existing per-tab close and full teardown cleanup behavior. Co-Authored-By: Claude Opus 4.6 (1M context) --- dashboard/frontend/src/App.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dashboard/frontend/src/App.svelte b/dashboard/frontend/src/App.svelte index 3d3a533..68bf340 100644 --- a/dashboard/frontend/src/App.svelte +++ b/dashboard/frontend/src/App.svelte @@ -146,8 +146,6 @@ {:else if page === "files" && hasPageAccess("files")} - {:else if page === "terminal" && hasPageAccess("terminal")} - {:else if page === "openclaw" && hasPageAccess("openclaw")} {:else if page === "chat-digest" && hasPageAccess("chat-digest")} @@ -162,9 +160,15 @@ {:else if page === "info-engine" && hasPageAccess("dashboard")} - {:else} + {:else if page !== "terminal"} {/if} + + {#if hasPageAccess("terminal")} +
+ +
+ {/if}