From 90fa66bd39573592cae1f8ca34d45fe2f1114d79 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:39:55 +0000 Subject: [PATCH] feat: add refresh button to simulation page User can now click 'Refresh' to update simulation data (portfolio, signals, trade log) without reloading the page. --- .../src/routes/bot/[id]/simulate/+page.svelte | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/frontend/src/routes/bot/[id]/simulate/+page.svelte b/src/frontend/src/routes/bot/[id]/simulate/+page.svelte index 478a194..cebdc4e 100644 --- a/src/frontend/src/routes/bot/[id]/simulate/+page.svelte +++ b/src/frontend/src/routes/bot/[id]/simulate/+page.svelte @@ -11,6 +11,7 @@ let tokenAddress = $state(''); let klineInterval = $state('1m'); let isRunning = $state(false); + let isRefreshing = $state(false); onMount(async () => { if (!$isAuthenticated && !$isLoading) { @@ -42,6 +43,7 @@ } async function loadSimulations() { + isRefreshing = true; try { const simulations = await api.simulate.list(botId); @@ -58,6 +60,8 @@ } } catch (e) { console.error('Failed to load simulations:', e); + } finally { + isRefreshing = false; } } @@ -105,6 +109,18 @@ ← Back to Chat